My team wants to create a no-code/low-code site to display some table data that can also be edited/created so I'll be using a gallery table. The end goal would be where the user can select what columns they want to see (we have 30+) and then the table is created from the JSON a GraphQL endpoint returns. Is that possible in PowerApps? Everything I'm seeing is tables created with hard coded columns and column names in a gallery table based on a data source (usually SQL or SharePoint List). Thanks.
Solved! Go to Solution.
Depending how far you want to take this, you should be able to do much of this with Power Apps. You can exploit the Visible and FieldDisplayName properties of a DataTable to dynamically control the name and whether a particular column displays or not.
It sounds like you understand the primary limitation though - the schema has to be known during app construction to properly set it up. You'll build the table with ALL possible columns, and then display only those you want. The custom connector to the Graph API has to be defined in advance, not dynamically. If those limitations still fit your use case, then have at it.
Hope that helps,
Bryan
Depending how far you want to take this, you should be able to do much of this with Power Apps. You can exploit the Visible and FieldDisplayName properties of a DataTable to dynamically control the name and whether a particular column displays or not.
It sounds like you understand the primary limitation though - the schema has to be known during app construction to properly set it up. You'll build the table with ALL possible columns, and then display only those you want. The custom connector to the Graph API has to be defined in advance, not dynamically. If those limitations still fit your use case, then have at it.
Hope that helps,
Bryan
If I'm understanding you correctly, I'd have to create the full table with all 30+ columns and column names, then send the request for only certain columns of data, and when receiving the response, perhaps set visibility of a column based on all empty values in that column?
@aec2018 wrote:If I'm understanding you correctly, I'd have to create the full table with all 30+ columns and column names, then send the request for only certain columns of data, and when receiving the response, perhaps set visibility of a column based on all empty values in that column?
We are close to understanding the same thing. In your case, you need to make sure your app "knows" about and can handle all columns it will receive, even if they aren't displayed. Power Apps relies on knowing the schema before runtime, so if that were to change later the app would probably error out. And yes, the visibility of labels and other controls can be made dependent on the data that comes back to the app.
Make sense?
Yeah, it makes sense. It's not a truly "dynamic" table being created the way, let's say, React would. It's a hard coded table with a pre-defined schema and just some show/no show logic for each column. It's kind of what I figured would be done with PowerApps since it's meant to be low maintenance. Thanks for your input, I think it really puts me on the right track.
User | Count |
---|---|
168 | |
96 | |
77 | |
72 | |
59 |
User | Count |
---|---|
210 | |
167 | |
97 | |
94 | |
78 |