It is currently possible, and quite useful, to create global of screen variables containing a record (or what us, old-timers, used to call a data structure):
UpdateContext({MyRecord:{Id:1, Description: “Some text”, “IsCompleted”:false}});
We can then refer to a specific attribute of this variable in functions:
Label.Color = If(MyRecord.IsCompleted, Black, Red)
However, it is not possible to update only one attribute of the variable without recreating the complete record, which is a pain when the record contains many attributes. Possible solutions could be :
UpdateContext({MyRecord.IsCompleted : true})
Patch(,MyRecord,{IsCompleted : true}) //note that the first parameter of patch is omitted
UdpateRecord(MyRecord,{IsCompleted : true}) //New function