Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Table Headers in Components Fed by Input Parameters

(0) ShareShare
ReportReport
Posted on by
I've been developing a Power Apps component that acts as a "wrapper" or "widget", similar to a dashboard tile.  Essentially, it has (in addition to headers, footers, etc.) a center content header that displays a table.  So... the table itself exists in the component.  However, to make the component reusable in multiple apps, the table content is provided via an input variable (table-type) defined in the component.  That works great.  Now on to the problem:
 
Because each app can need different column headers in that table, the column headers are also fed-in via input variables (text-type).
 
Because each app can need to show/hide individual columns (some apps may need more columns, some less), the "visible" property of each table column is also fed-in via input variables (boolean-type).
 
So, I have input variables like this:
'ContentTable' <table>
Column1Header <text>
Column1Visible <boolean>
Column2Header <text>
Column2Visible <boolean>
...
 
All of those input variables are assigned to the appropriate places in the table control in the component.  When I create a test app, and add the component, I can define all of those parameters and it works... initially.  However, if I switch screens and then come back to this screen, the table data still shows, but SOME columns that should be visible are no longer showing.  SOME column headers are showing as the default value, not my defined value.  If I check the parameters that define the visibility and headers, they ARE still set to the proper values (even some test text labels prove this)... but the table isn't respecting those values.  So... for a column that is supposed to be showing, I check that property's visible property and it's showing as "true", but the column isn't visible.  If I change the value to false and then back to true, the column appears.  For a header value, I start editing the (correct) value, and as soon as I make a change, the column's heading changes.
 
The only thing I can think of is that there is a bug in Power Apps where tables in components have some sort of polling or timing issue.  Part of the rendering works as it should, but part doesn't.  Maybe there are too many input variables and Power Apps just has a hard time polling everything in time before it draws the table.  IDK.  Any suggestions on how to overcome this?
 
My backup plan (which I don't really *want* to use, but I will if I have to) is to leave the table completely out of the component, and use output variables from the component to tell the app where (and what size) to add the table from the app side (over the top of the component).
Categories:
  • narayan225 Profile Picture
    narayan225 2,390 on at
    Table Headers in Components Fed by Input Parameters
    I have not worked on this myself but it seems like the table in the screen works once you make changes.
     
    To get around this, you can try and maybe set the necessary table data (column and their property) on the OnVisible property of the screen.
    This might trigger the table to update based on the available data and it should show up properly in the screen.
     
    Hope this helps.
    Cheers!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard