I have a gallery where user can Insert , Update and Delete an Item .
When user hits save button all rows in the Gallery to be saved back to sharepoint list ( If it is an insert on the gallery using + button insert a new line in sharepoint list , If deleted delete that line from sharepoint list , If updated , update that line in sharepoint list ) .
How to achieve this requirement.
Details on the screen attached .
Hi @avi2017 :
Could you tell me:
Sorry, I am confused about your question. If you can provide more details, I may be able to provide more specific soltuion.
I'v made a test for your reference:
1\ My SharePoint list-LIST6
2\ Set app’s OnStart property to:
ClearCollect(AAA,LIST6) // AAA is my test collection ,LIST6 is my sharepoint list
3\ Add a blank gallery control ‘gallery1’ to screen1 and set its Items property to:
4\ Insert four textinput controls into ‘gallery1’ (TextInput3/TextInput3_1/TextInput3_2/TextInput3_3)
6\ Add a Add Icon control to screen1 and set its onselect property to:
7\ Insert trash Icon control into ‘gallery1’ and set its onselect property to:
9\ The result are as follow:
No need to submit changes, all changes in the gallery will be immediately submitted to the SharePoint list.
Thanks a lot for the reply. Part of my requirement works with the logic mentioned in your reply . Most of the times my need is to copy all employees from existing company code and add/delete/modify copied employees and save those employees in new company code
For example in LIST6 max value of company code is 80000000002 , then i add 1 to 80000000002 and next company code is 80000000003
When i select company code 8000000002 in the drop down list . All employees from company code 8000000002 will show up in Gallery where insert/delete/modify employes and when SAVE button is pressed or on action those employees in the Gallery should save into COLLECTION and finally into LIST6
Below mentioned is how LIST6 is
so when company code 80000000002 is selected below employees will be visible in Gallery
I can insert/modify/delete employees from the Gallery but when it gets saved to COLLECTION or LIST6 it should consider those as new entries to LIST6 with COMPANY CODE 800000000003 and after save LIST6 should look like as below
|Company Code||EMPLOYEEE#||NAME||INTEREST||BONUS AMOUNT|
Hi @avi2017 :
Has the problem been solved?
Is there anything else I can help?
In addition,Since the ‘company code’ is a field in the data source, I think there is no need to use collection. I suggest you directly set the gallery's items property to:
Filter(LIST6,'Company Code'=YourDropdown.seleceted.'Company Code')
Check out new user group experience and if you are a leader please create your group
Check out how to claim yours today!
Test your skills now with the Cloud Skill Challenge.