Hello there,
Context:
I have two local connections that I am patching when the phone gets internet.
first collection contains general information about a family. second collection contains information about the family's members.
during data collection I assign a serial number to each family and use the same one to its members.
to patch the colelctions to SharePoint, I go through a first ForAll loop and inside a go again to a second ForAll loop.
my problem:
becuase the data in the first colelction is too much (around 70 columns) it seems that it's taking a bit of time to update the first SharePoint list which is resulting with wrong Serial Number assigned to the family members (the previous instead of the new)
my question:
can I add dealy to the code so I give SharePoint a second before patching the second collection
other suggestions are welcome, and here is a snippet of the code I am using
thanks,
Alaa
ForAll(
LocalCAT, Patch(CAT, Defaults(CAT),
{
HHID: First(SortByColumns(CAT,"HHID",Descending)).HHID + 1,
... the rest of the fields (around a 70 fields)
});
ForAll(
Filter(
LocalHouseholdMembers,
HHID = LocalCAT[@HHID]
),
Patch(HouseholdMembers, Defaults(HouseholdMembers),
{
HHID: First(SortByColumns(CAT,"HHID",Descending )).HHID,
... the rest of the fields
}
)
)