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 Automate
Answered

Pivoting data

(0) ShareShare
ReportReport
Posted on by 11

Hi all,

 

Using FetchXML, I am able to retrieve data about a particular record from various tables. The output of the FetchXML query will be a single record, with various columns. What I'm trying to do is find a way to render this data within a Power App Gallery, however, without necessarily knowing *what* the columns will be.

 

Essentially, my goal is to do the following:

 

  1. Invoke a Power Automate flow from Power Apps, with relevant identifying information passed along.
  2. Retrieve a record from a Dataverse table, which will contain a FetchXML query definition as well as the name of the Dataverse table that the query is being executed against, and then execute that query using the "List Rows" Dataverse call. (note - if for whatever reason the table can't be dynamic, I can probably make this work by just setting the table to a fixed value).
  3. Return that record back to the Power App.
  4. Somehow transform that record from a single row into a set of rows, using a Pivot operation. Essentially, create a new table with two columns, Key and Value, where Key would be the name of the original table's column, and Value would be the value in that column from the original table.

That last step is the one that I am struggling with. I've looked into options within Power Automate, as well as within Power Apps, and I can't find any convenient way to do this. Any assistance would be appreciated. Thanks!

Categories:
I have the same question (0)
  • Verified answer
    kramaswamy1984 Profile Picture
    11 on at

    Found this blog post, which addresses my question. Though IMO there really *should* be something built-in that does this.

     

    https://immersivecoder.com/2021/08/29/transpose-table-columns-using-power-automate-with-example/ 

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard