
Announcements
Hello,
im facing an issue to patch items when using lookup functions. As data source im using SharePoint lists. In my application im using lookup functions over SharePoint column type Number. Therefore i think that it should be working even when lists has more then 5000 items. However im still facing this error which causing me troubles to patch items.
I have multiple buttons where i use similar code but this is the code which caused me issues recently:
Code sample 1:
UpdateIf(collSelectedItems, true, {Stav: "Schváleno"});
Patch(List_Zadosti, collSelectedItems);
ForAll(collSelectedItemsKalendar As temp2,
Patch(List_Kalendar,LookUp(List_Kalendar,ID = temp2.ID),{Stav: "Schváleno"}));
Clear(collSelectedItems);
Clear(collSelectedItemsKalendar);
Concurrent(
ClearCollect(collZadosti,Sort(Filter(List_Zadosti, Schvalovatel = manager_email || Schvalovatel = varPrihlasenyUzivatel), Created, SortOrder.Descending)); //upraveno 24.7.
ClearCollect(collZadosti, ShowColumns(collZadosti, "Datum", "DatumDo", "Osoba","Stav","ID", "Schvalovatel", "ID_x0020__x017e__x00e1_dosti", "Pozn_x00e1_mka", "Po_x010d_et_x0020_dn_x016f_", "Typ" )),
ClearCollect(collKalendar,Sort(List_Kalendar, Datum, SortOrder.Descending)); // změněno 24.7.
ClearCollect(collKalendar, ShowColumns(collKalendar, "ID", "HodnotaDne", "Datum", "Osoba", "Stav", "Schvalovatel", "PulDen", "Typ", "Po_x010d_et_x0020_dn_x016f_", "Pozn_x00e1_mka", "ID_x0020__x017e__x00e1_dosti", "Title")));
Set(varCheckBoxAll, false);
UpdateContext({varShowZPDialogSchvalitVse:false});
UpdateContext({varShowZPDialogHTMLScreen:false});
Reset(Gallery_ZadostiPodrizenych);
Set(varZaznamZadostiPodrizenych, Blank())
Here im sending another code which caused me this issue:
Code sample 2:
Patch(List_Kalendar,LookUp(List_Kalendar,ID = varZaznam.ID ),{Stav: "Zrušeno"});
Patch(
List_Zadosti,
LookUp(
List_Zadosti,
'ID žádosti' = varZaznam.'ID žádosti'
)
,
{'Počet dnů': Value(LookUp(List_Zadosti, 'ID žádosti' = varZaznam.'ID žádosti', 'Počet dnů')) - varZaznam.HodnotaDne},
{Stav: If(Value(LookUp(List_Zadosti, 'ID žádosti' = varZaznam.'ID žádosti', 'Počet dnů')) - varZaznam.HodnotaDne = 0, "Zrušeno", varZaznam.Stav)}
);
If(
varZaznam.'Typ žádosti' = "Dovolená",
Patch(
List_Balance,
LookUp(
List_Balance,
UserProfile.Email = varZaznam.Osoba.Email
)
,
{Vacation: Value(LookUp(List_Balance, UserProfile.Email = varZaznam.Osoba.Email, Vacation)) + varZaznam.HodnotaDne}
)
,
false);
In second sample im aware that im using lookup function for Person or group column type, however list where im using it contains only 100 items. Therefore im not seeing this as an issue.
Can someone help me to identify, what may caused me this error message in my code? Im ready to put some more information if needed.
Thank you in advance
Regards,
Jakub