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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard