Announcements
Hi guys,
I've made a gallery as shown. This is temp table, and when I click the add button that will create a new row of text input in temp table. But how to delete the last row of temp table and how to save the all text input to sharepoint.
Hi @kit1128 ,
To Remove the last item in a collection
Remove( ItemsCollection, Last(ItemsCollection) )
To add to a SharePoint list
Patch( YourSharePointListName, Defaults(YourSharePointListName), { CollectionField1:SharePointField1 CollectionField2:SharePointField2 CollectionField3:SharePointField3 } )
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
HI @WarrenBelz ,
Thank you for reply, but under different scenario, the number of added rows will be different. So what other methods can save the data?
You just need to wrap a ForAll around the Patch
ForAll( ItemsCollection, Patch( YourSharePointListName, Defaults(YourSharePointListName), { CollectionField1:SharePointField1 CollectionField2:SharePointField2 CollectionField3:SharePointField3 } ) )
Hi @WarrenBelz
Thank you for reply, I've some problem in add button, Although it added a new row in temp table, how can add the text of text box in temp?
You will have to explain in a bit more details here. Which text box are you trying to add with the button. You are currently sending the number of rows.
HI@WarrenBelz ,
As I want to do add a Text input control dynamically within the screen when you click the Button control. So, I consider take a try to embed the Text input control into a Gallery control. But How to access the data or content in those dynamic controls? Using the same example, the text input, how do I access the content of the the first, second, third, Fourth textfield text that are generated dynamically?
The onvisible property of the screen
The Add button control
Collection
Thanks @kit1128 ,
I am still a little unsure on exactly what you want, but if you are putting a Text Input into the gallery and want to write them all to separate records, go back to my second post with the ForAll, but Patch Gallery.Selected.TextFieldName
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 232 Super User 2026 Season 2
WarrenBelz 202 Most Valuable Professional
Mohsin Ali 122