Hi,
I have a gallery on my app that the user looks at a collection and by looking at its unique PID they then give the row a HID and saves via this code. However if i also save the variable to another collection (colFinalHoleData) and press the button twice it creates two entries, how do i get it to look in the collection check if there is an entry already and patch if the PID is already there?
Set(varItem,
{ID: HID.Text,
Status: "Started",
PID: PID.Text,
EL: GalEL.Text,
Easting: HoleGalEastings.Text,
Northing: HoleGalNorthings.Text,
HoleCompletedDate:Text(Today(), "[$-en]dd/mm/yyyy")
}
);
Patch(
colData,
HOLEIDGallery.Selected,
{
HoleID: HID.Text,
Status: "Started",
PEGID: PID.Text,
EL: GalEL.Text,
Easting: HoleGalEastings.Text,
Northing: HoleGalNorthings.Text,
HoleCompletedDate:Text(Today(), "[$-en]dd/mm/yyyy")
}
);
SaveData(
colHOLEData,
"SavedHOLEData"
);
Collect(
colFinalHOLEData,
varItem
);SaveData(
colFinalHOLEData,
"SavedFinalHOLEData"
);
The collection that creates doubles is colFinalHOLEDATA, i take it i use an IF statement and do i use a lookup code? I cant figure it out with the variable varitem?