I have a collection which is created onvisible of a screen. When i try to patch this collection to SharePoint list, it saves them however all the values are blank.
In preview mode of collection i can see value. However when the form is submitted, values are stored as blank. Is there any problem in my form OnSuccess property.
May i know why this happens?
Screen OnVisible
ClearCollect(
yourSOEditCollection,
Filter(
'SO Details',
System_List_ID = varedititem.ID
)
);
Add button OnSelect
If(
CountRows(SO_Gallery_1.AllItems) < 3,
Patch(
yourSOEditCollection,
Defaults(yourSOEditCollection),
{
Name: "",
Email: "",
Designation: "",
Contact: "",
RandID: Rand(),
System_List_ID: varedititem.ID
}
),
Notify(
"You can only add upto 3 rows",
NotificationType.Warning
)
)
Edit icon inside Gallery OnSelect
UpdateContext({varEditItem: ThisItem.RandID})
Save icon inside Gallery OnSelect
If(
varEditItem = ThisItem.RandID,
Patch(
yourSOEditCollection,
ThisItem,
{
Title: TextInput4_12.Text,
'SO Email': TextInput4_13.Text,
'SO Designation': TextInput4_14.Text,
'SO Phone': TextInput4_15.Text
}
);
UpdateContext({varEditItem: Blank()})
)
Form OnSuccess
ForAll(
yourSOEditCollection As EDITITEM1,
Patch(
'SO Details List',
Defaults('SO Details'),
{
Title: EDITITEM1.Name,
'ACSO Email': EDITITEM1.Email,
'ACSO Designation': EDITITEM1.Designation,
'ACSO Phone': EDITITEM1.Contact,
System_List_ID: EDITITEM1.System_List_ID,
RandID: EDITITEM1.RandID
}
)
);