cancel
Showing results for 
Search instead for 
Did you mean: 

Ability to execute Reset on a group

Maybe i'm doing this wrong, but I'm not using forms in complex scenarios so i can used the patch function.   I normally group input controls so I can move/hide them, but when I need to reset them,  I need to specify each one.   suggest the Group function be updated to execute on a group

Status: Under Review

Thanks for the suggestion. One clarification, do we need to reset some but not all of the fields for a datasource?  Or is it enough to reset all fields for the datasource to be patched?

Comments
TheBusinessPM
Microsoft

Agree and second this.  I have grouped 7 controls that I'd like to reset en masse to their default values - being able to do this Reset(GroupName) opposed to 7x Reset(ControlXX) would be so much easier.

aorth
Power Apps
Status changed to: Under Review

Thanks for the suggestion. One clarification, do we need to reset some but not all of the fields for a datasource?  Or is it enough to reset all fields for the datasource to be patched?

Anonymous
Not applicable

Some of the items might be indirectly tied to the datasource (one reason to use a Patch function over the native form),  so the reset would need to reset all fields in a Group.

Anonymous
Not applicable

This would be a very nice convenience to have. I currently have to reset 12 controls individually, but it would make for much cleaner code to reset the group. 

Rivius
Resolver III

I too would like this to make things easier. 

I did find a different way to do it that I like rather than a bunch of Reset lines. 

 

Example with 9 text box controls, code is in the OnSelect property of a refresh icon:

ForAll(
    [
        txtRMILEEEID,
        txtRMILEActivityNo,
        txtRMILEResourceCN,
        txtRMILEName,
        txtRMILEHours,
        txtRMILEHubCity,
        txtRMILEHubState,
        txtRMILEJobLoc,
        txtRMILEBargeName
    ],
    Reset(ThisRecord.Value)
)

 I found that mixing control types doesn't work (adding a checkbox or combobox resulted in a compatibility error with the table but making another table and keeping similar controls together works (all text controls, all comboboxes etc.))

 

It's extra lines but may help organizing the code and the concept of iterating through controls is kinda cool I think.

Invictus_LHP
New Member
Hey @Rivius Have you tried creating a context when clicking a reset button? For example: UpdateContext({Reset_All: true}) Then with your group selected go into the Advanced options, under Reset, write an if statement: If(Reset_All,true,false)
Invictus_LHP
New Member
Hey @Rivius Have you tried creating a context when clicking a reset button? For example: UpdateContext({Reset_All: true}) Then with your group selected go into the Advanced options, under Reset, write an if statement: If(Reset_All,true,false)