I have a checkbox in a gallery. The data source bound to it data type is integers. When I checked the checkboxes = true in the gallery and open another screen from a button from the main screen then when I return to the main screen, the checkboxes in the gallery get resetted = false. But it happens one the first time. The second time I open the screen from the button and return to the main screen, the checkboxes don't get reset anymore.
This does not happen in my development envonment, it happens when I publish the App and open it from the Production environment.
Please some help or workaround to avoid the behavior.
Solved! Go to Solution.
Proud to be a Flownaut!
Hello @MidwayC11, here is what I had done when needing to bulk update.
Step 1)
In the first gallery (main gallery) I added a checkbox,
The checkbox I had made: OnCheck =
Collect(BulkUpdate, ThisItem)
BulkUpdate is a callection I will use to store the records I want to update.
Step 2)
I have OnUncheck =
Remove(BulkUpdate,ThisItem)
This will make only the checked items be added to UpdateBulk Collection. And the user can uncheck the box to remove the item from collection in real time.
Step 3)
I have only added the second gallery to show what is going to be BulkUpdated.
Step 4)
Add a button to do the BulkUpdate.
This can be done a few ways, for example with the Patch Command. For me I actually used a Flow to write the changes. I am more familiar with Flow and for me it was easier to write changes to the Data Source as I was using CDS and lots of lookup field.
Thanks, and have a great day.
--Josh
Proud to be a Flownaut!
If you have a checkbox in a gallery based on the data source, selecting and unselecting will not change the datasource value. you need to do a patch or updateif as the oncheck or uncheck action occurrs
Thanks for your reply. What I'm trying to do here is bulk update the gallery. So when the user checks a bunch of check boxes then they click a button to "submit" all the updates to the data source and that is just fine. The "thing"" is that the user checks some check boxes (before submitting the changes) then they decide to click an icon within the gallery that opens another screen to check details of the single item, that's when the "checked" checkboxes get unchecked when they return to the main screen.
I'm trying to find out why is this behaviour happening
Proud to be a Flownaut!
Hi @Jcook ,
Can you please share more details about your app? Did you follow below steps to bulk update records in gallery?
Regards,
Mona
Hello @MidwayC11, here is what I had done when needing to bulk update.
Step 1)
In the first gallery (main gallery) I added a checkbox,
The checkbox I had made: OnCheck =
Collect(BulkUpdate, ThisItem)
BulkUpdate is a callection I will use to store the records I want to update.
Step 2)
I have OnUncheck =
Remove(BulkUpdate,ThisItem)
This will make only the checked items be added to UpdateBulk Collection. And the user can uncheck the box to remove the item from collection in real time.
Step 3)
I have only added the second gallery to show what is going to be BulkUpdated.
Step 4)
Add a button to do the BulkUpdate.
This can be done a few ways, for example with the Patch Command. For me I actually used a Flow to write the changes. I am more familiar with Flow and for me it was easier to write changes to the Data Source as I was using CDS and lots of lookup field.
Thanks, and have a great day.
--Josh
Proud to be a Flownaut!
User | Count |
---|---|
262 | |
110 | |
89 | |
54 | |
44 |