Hi,
In my Gallery i gave a Collection for Items.
I edit an Item From that Gallery selected.
After patch i cant refresh a Collection.
How to update a Collection after Update an item?
Thanks,
Dhinesh
Solved! Go to Solution.
I assume you are patching the original data source. If you are then there are only two options.
1) Apply the same Patch/Update to the collection that you are applying to the data source.
2) Re-run whatever code you ran to create the collection to begin with. Make sure to use a Clear() or ClearCollect as the first statement or you'll get duplicates.
I assume you are patching the original data source. If you are then there are only two options.
1) Apply the same Patch/Update to the collection that you are applying to the data source.
2) Re-run whatever code you ran to create the collection to begin with. Make sure to use a Clear() or ClearCollect as the first statement or you'll get duplicates.
Hi @Pstork1,
Yes , still am updating a DataSource. Now am updating a collection. Working fine.
Thanks,
Dhinesh
Hello,
Whenever possible, I recommend using a form in "Edit" mode to update the source.
In the "OnSuccess" property, you can put the following formula:
Collect(MyCollection, MyForm.LastSubmit)
It will just add the new record to the collection after updating the source.
I had the same problem, here's how I solved it:
Considering my gallery is based on Collection, my form is based on Item=Lookup(datasource). When I submit the form, I do
// update data source record
SubmitForm(Form);
// update collection record; best to do this OnSuccess of the Form
Patch(Collection, Gallery.Selected, { field1: Form.LastSubmit.field1, field2: Form.LastSubmit.field2});
Note that I specified the fields to updates.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
190 | |
95 | |
65 | |
64 | |
58 |
User | Count |
---|---|
243 | |
163 | |
94 | |
82 | |
80 |