Introduction
There are times when you need a table or list of records that aren't necessarily stored in any data source. An example of that is a left navigation menu. You can use separate buttons for each menu option but maintaining that becomes a problem. You will have to adjust the X and Y position of all of them, especially if it is a flyout menu.
Tip - Table function
The easiest way to create an ad hoc list of records is to use the Table function. For example, to create a filter menu that filters records based on their status, use the Table function to create a gallery/list of the statuses.
To illustrate this, here is a quick example:
The Items property of the horizontal gallery is:
Table(
{Value: "A"},
{Value: "B"},
{Value: "C"},
{Value: "D"},
{Value: "E"},
{Value: "F"},
{Value: "G"},
{Value: "H"},
{Value: "I"},
{Value: "J"},
{Value: "K"},
{Value: "L"},
{Value: "M"},
{Value: "N"},
{Value: "O"},
{Value: "P"},
{Value: "Q"},
{Value: "R"},
{Value: "S"},
{Value: "T"},
{Value: "U"},
{Value: "V"},
{Value: "W"},
{Value: "X"},
{Value: "Y"},
{Value: "Z"}
)
To read more the Table function, click here.
There are other ways ad hoc tables can be created. Taking the above scenario as an example, a simpler way to do that is to use the following as the Items property:
[
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z"
]
Stay tuned for the remaining 6 tips!
Recent articles
- A-Z: 26 tips! Learn how to improve your Power Apps!
- Add Picture vs Camera Control – Who is the winner?
- Background images for Power Apps screens – the right way!
- Combo box or Dropdown? - Who is the winner?
- Delegation in Power Apps – How to identify and test!
- Edit vs Display – Which is the better form?
- Formulas – How to learn the 170+ Power Apps formulas?
- Galleries vs Data Tables – How to pick between the two in Power Apps?
- Hyperlinks – How to launch web pages & apps in Power Apps!
- Icons – How to increase performance!
- Jump start – How to speed up Power Apps dev with components!
- Keyboard – How to control the keyboard type on mobile
- LastSubmit – How to fetch the last submitted record in Power Apps
- Media controls in Power Apps – How to improve user experience!
- New screens – How to speed up Power Apps dev using templates!
- OnStart – How to optimize app loading experience!
- Phone camera – How to switch cameras on Power Apps mobile!
- Quotes – Should you use single or double in Power Apps?
- Reset – How to reset a Power Apps gallery?
- SaveData – How to persist your Power Apps sessions!
You could also generate the letters of the alphabet in a Table with the following formula:
Split(Concat(Sequence(26, 97), Char(Value) & ” “), ” “)
97 is the ASCII value for the letter “a”
I am using a blank character to concatenate and split on but you could use any separator character you like.
Thanks.
You could also start your sequence at 65 if you want all the capital letters of the alphabet in your Table.