Is it possible to set more than one variable at a time?
e.g.
updatecontext({VarTemp1: 1, VarTemp2: "Test"})
or does every variable have to be set individually?
Thanks for any assistance in advance.
Solved! Go to Solution.
Hi @ICM,
According to https://docs.microsoft.com/en-us/powerapps/functions/function-updatecontext:
UpdateContext( { ContextVariable1: Value1 [, ContextVariable2: Value2 [, ... ] ] } )
ContextVariable1 - Required. The name of a context variable to create or update.
Value1 - Required. The value to assign to the context variable.
ContextVariable2: Value2, ... - Optional. Additional context variables to create or update and their values.
It should be supported to create multiple context variables in one formula.
Example:
UpdateContext( { Name: "Lily", Score: 10 } )
Creates or modifies the context variables Name and Score, setting their values to Lily and 10 respectively. Name has the value Lily, and Score has the value 10.
Regards,
Mona
@ICM wrote:Is it possible to set more than one variable at a time?
e.g.
updatecontext({VarTemp1: 1, VarTemp2: "Test"})
or does every variable have to be set individually?
Thanks for any assistance in advance.
If you try putting your code (with uppercase UpdateContext) on a button and place 2 text boxes with the Text property set to VarTemp1 and the other to VarTemp 2 what happens when you push the button?
Hi @ICM,
According to https://docs.microsoft.com/en-us/powerapps/functions/function-updatecontext:
UpdateContext( { ContextVariable1: Value1 [, ContextVariable2: Value2 [, ... ] ] } )
ContextVariable1 - Required. The name of a context variable to create or update.
Value1 - Required. The value to assign to the context variable.
ContextVariable2: Value2, ... - Optional. Additional context variables to create or update and their values.
It should be supported to create multiple context variables in one formula.
Example:
UpdateContext( { Name: "Lily", Score: 10 } )
Creates or modifies the context variables Name and Score, setting their values to Lily and 10 respectively. Name has the value Lily, and Score has the value 10.
Regards,
Mona
User | Count |
---|---|
193 | |
127 | |
88 | |
48 | |
42 |
User | Count |
---|---|
278 | |
162 | |
136 | |
81 | |
78 |