Hi all,
I had a question about gallery usage with the ForAll feature. I have an auto-created gallery that is populated by a different record. I associated this new gallery with a checkbox for each item. I want all the checkboxes to uncheck if the user clicks the "close" button. That way if the gallery is reopened, all the checkboxes are fresh. This is a little hard to describe, so attached below is a picture of what I mean:
As you can see, I am trying to use the "ForAll" feature with the gallery on the OnSelect feature of the "close" button in order to reset the values of the checkboxes to false. However, this does nothing to the values and I am not getting an error returned from the code. Does anybody have any ideas on how I can achieve this?
Thanks,
Farhan
Solved! Go to Solution.
Hi @farhandsome ,
Could you please share a bit more about your scenario?
Do you want to reset the Checkboxes within your Gallery when you press the "Close" button?
Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please consider take a try with the following workaround:
Set the OnSelect property of the "Close" button to following:
UpdateContext({PkgQty: false});
Set(IsReset, false);Set(IsReset, true)
set the Reset property of the Checkbox within the Gallery to following:
IsReset
Please consider take a try with above solution, then check if the issue is solved.
Best regards,
You could try using a context variable in the Reset property of the checkbox e.g. varReset
Then on the Save button update the variable. This will trigger the default for the checkbox e.g. false or blank.
UpdateContext({varReset: true});
UpdateContext({varReset: false}),
Hi @farhandsome ,
Could you please share a bit more about your scenario?
Do you want to reset the Checkboxes within your Gallery when you press the "Close" button?
Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please consider take a try with the following workaround:
Set the OnSelect property of the "Close" button to following:
UpdateContext({PkgQty: false});
Set(IsReset, false);Set(IsReset, true)
set the Reset property of the Checkbox within the Gallery to following:
IsReset
Please consider take a try with above solution, then check if the issue is solved.
Best regards,
Fantastic, this worked like a charm. I think I realize my mistake in using For All. Yes you are correct in your thinking: I want to reset the boxes when I push the close button.
This is just the first step for this project, I'm sure I will have many more questions as issues arise! But thank you for this.
Another question - is it possible to set the displaymode based on if atleast one of the checkboxes is selected? I'd like to add a "start" button as well, but I want it to be disabled until the user selects atleast one of the checkboxes.
User | Count |
---|---|
256 | |
108 | |
97 | |
51 | |
39 |