In Power Apps, there are two types of controls for displaying a list of data: “Gallery” and “Data Table”.
I have always used “Gallery” only, but this time I had a chance to use “Data Table”, so I will write down how to use it and how it differs from Gallery.
Data Table
The Data Table control is a control that can display data in a table format like Excel.
- Single selection (multiple selections are not allowed)
- Column width changeable (not saved)
- Hyperlinks can be displayed and transitions made with a click
- It automatically gives you a header.
- Scroll bars appear in two directions (vertical and horizontal)
Basic Usage
Data selection is also possible
Use with the “Gallery”
Similarly, there is a “gallery” control that lists data.
- No detailed UI settings, large amount of information to display: data tables
- Detailed UI settings, but not too much information to display: Gallery
The following is a slightly more detailed look at the differences between the two.
Scrollbar display differences
- Gallery: Vertical or Horizontal
- Data tables: vertical and horizontal
Data table looks good when displaying data with a lot of information both horizontally and vertically.
The gallery could also be made scrollable vertically and horizontally, so the above requirements could be met in the gallery.
Fine-tuning of appearance
The fine-tuning of the look and feel is by far the better part of the gallery.
If you want to display the listed data with some degree of aesthetics, a gallery would be better.
Add Column -> Data Table can’t use LookUp?
I want to add a column to the Power Apps screen and display the employee number as well! When it comes to,
If you want to do some processing for each listed data, the gallery is more flexible.。
Data table does not allow external access to Items
It seems that the data table does not allow access to the listed data from the outside.
Loop processing can also be realized by combining the ForAll function and the AllItems property, but the data table does not have a property that corresponds to this AllItems property.
This would affect performance because it throws (I think it throws) REST twice.
Conclusion
Therefore, as mentioned at the beginning of this section, when considering the use of Gallery and Data Table, it is recommended to consider the following
Data Table” when handling data with a large amount of information to be displayed without detailed UI settings and without access to each data,
If you want detailed UI settings or access to each data, or if you handle data with a small amount of information to be displayed, use “Gallery”,
It’s just a feeling, but I think the display speed is faster with the data table.
コメント