web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Can ShowColumns select...
Power Apps
Answered

Can ShowColumns select fields of related tables?

(0) ShareShare
ReportReport
Posted on by 379

From Dataverse, I am trying to bring back columns of related tables in a single query. Sort of the equivalent of an ODATA $expand clause.  Does ShowColumns have a syntax that allows that?

 

Power Apps "Explicit Column Selection" is somehow doing this. For example, in a table of 'Paperwork' that has a Lookup column to a table of Jobs, PowerApps generates a query that pulls in non-key fields of Jobs (because I use those columns later in the app):

 

.../api/data/v9.0/$metadata#ccs_opspaperworksets(ccs_opspaperworksetid,ccs_paperworkset,ccs_shiftdate,  
..., ccs_Job(ccs_jobid,ccs_jobsearchdescription,ccs_jobno,ccs_jobcustomername

Note the field expansion on the relationship field ccs_Job.

 

When I need to resort to ShowColumns, how can this be reproduced?

 

Categories:
I have the same question (0)
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @LenC 

    AddColumns() is the function for obtaining a value from another table with a matching field.

  • Verified answer
    Len C Profile Picture
    379 on at

    I did observe that ShowColumns can pull back fields from related data. The resulting queries and results do not look exactly the same on the wire, but PowerApps sees the data. 

     

    As an example, here, I traverse from the primary table, 'Status Reports' to a field of a related (lookup) table:

     

    AddColumns('Status Reports', "Job Search Description", ThisRecord.Job.'Search Description')

     This statement kept the columns that Explicit Column Selection settled on (unlike ShowColumns()).

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard