Hi community,
i have save button in my app and i want it to save into two separate SPO lists,
NeedToSave and VarStatus are two variables that evaluate whether the user made changes that need to be saved and then save it.
it should save to either one of them or to both based on the varailables evaluated to true.
but only the first part of the formula is working and saving to the VP Weekly Status table, the other part is not saved although the VarStatus variable is true.
when taking the second part of the formula into a separate button (not withon an if statement) it works just fine.
any ideas?
my formula:
If(NeedToSave,
ClearCollect(
UpdatedItems,
ItemsGallery.AllItems
);
ForAll(UpdatedItems, Patch(
'VP weekly status',
LookUp('VP weekly status',ID=UpdatedItems[@ID]),
{Report_Items:TextInput3.Text},
{Week:WeekValVP},
{DataType:{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: ItemType,
ID:ItemsGallery.Selected.ID
}}
)),
varStatus,
ForAll(
Gallery2_1.AllItems,
Patch(AccountsWeeklyStatus,ThisRecord,{Status:{ Value:LblUpdatedStatus_1.Text},'Status Description':TxtStatusDesc.Text}))
)