Hi
I need to create some kind of array so I can set text using its values:
MyArray={1:"one",2:"two"}
Set(val1, 1)
And then set text field to MyArray[val1]
Is it possible in Powerapps?
Thanks
Your array is simply a
Table({Color:"red"}, {Color:"green"}, {Color:"blue"})
In your case I would operate with a Collection that holds your styles.
You can also take a look at this component https://powerusers.microsoft.com/t5/Canvas-Apps-Components-Samples/PPOC2020-Company-Color-Scheme-Loo... which allows you to story color styles in a collection that then can be called via Lookup(...)
PowerApps does not support "arrays", for GA or beyond, because it cannot encourage nor accomodate random access into data. The closest data structure in PowerApps would be a single-column table. Still, it's a table, just like SQL tables for example, and as such it is not indexable by row index, i.e. there is no random access. You can think of columns as homogeneous vertical arrays of named values.