Forum Discussion
How to Update a Field through a button's OnSelect Event
You would need to set the value of the field you want to change to a variable and then set that variable with the OnSelect event.
Depending if you need this across multiple pages you can use either a local (context) or global variable.
To set a local variable you can use UpdateContext( { ContextVariable1: Value1 } ) or like these 2 examples: UpdateContext( { CountNumber: 1 } ) or UpdateContext( { Name: "John"} )
To set a global variable you can use Set( VariableName, Value ) or like these 2 examples: Set( CountNumber, 1 ) or Set( Name, "John" )
To use show either of the above variable types is as easy as putting the variable name in the text property of the object you want to use.
See these pages for more:
https://docs.microsoft.com/en-us/powerapps/functions/function-updatecontext
https://docs.microsoft.com/en-us/powerapps/functions/function-set
Thanks I will read that tomorrow AM. That would mean, I am assuming that the variable needs to be initialized to the existing value of the status field when the form is loaded.
I will study it and mark this as the solution once I have it working.