Hello everyone,
I have a scenario where I'd like to create or update all the checkbox Item at the same time. However, the challenge over here is with the creation part, what I'm looking for is a way to first look if the checkbox item value is inserted in the database if it is in the database then update the record otherwise create the new record in database.
I have read this blog post, it helped me alot. But I'm still looking for a comprehensive solution where it first check if the record is created in database then do update or create it in a bulk. Would appreciate the help. Thank you
https://powerapps.microsoft.com/ru-ru/blog/bulk-update-using-forall-and-patch/
Solved! Go to Solution.
Hi @imaliasad
For existing data which can be populated in Gallery you can try as follows:
ForAll( Gallery1.AllItems, Patch( TestUpload, // YOUR SHAREPOINT LIST LookUp( TestUpload, ID = Value(lblTestID.Text) // lblTestID.Text is mapped to SP List Item ID ), { myStatus: If( chkStatus.Value = true, // chkStatus is the check box check/uncheck "Y", // value you want to update back in the list "N" ) } ) )
For New Item as mentioned in the example (per your query), create a new form and add record. It can be achieved as follows:
NewForm(Form1);
Navigate(Screen2, none)
Set the datasource of Form to the SP List
on submit write below code
SubmitForm(Form1)
onsuccess property of the Form1, you can call Back() method to go back to gallery
Thanks.
Hi @imaliasad
For existing data which can be populated in Gallery you can try as follows:
ForAll( Gallery1.AllItems, Patch( TestUpload, // YOUR SHAREPOINT LIST LookUp( TestUpload, ID = Value(lblTestID.Text) // lblTestID.Text is mapped to SP List Item ID ), { myStatus: If( chkStatus.Value = true, // chkStatus is the check box check/uncheck "Y", // value you want to update back in the list "N" ) } ) )
For New Item as mentioned in the example (per your query), create a new form and add record. It can be achieved as follows:
NewForm(Form1);
Navigate(Screen2, none)
Set the datasource of Form to the SP List
on submit write below code
SubmitForm(Form1)
onsuccess property of the Form1, you can call Back() method to go back to gallery
Thanks.
User | Count |
---|---|
142 | |
136 | |
78 | |
74 | |
73 |
User | Count |
---|---|
230 | |
177 | |
68 | |
67 | |
59 |