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 Automate / convert custom object...
Power Automate
Suggested Answer

convert custom object variable into datatable

(1) ShareShare
ReportReport
Posted on by 67
Hi ,
 
My use case - using  Dataverse am reading values in power automate desktop of that particular table ,there are mutiple rows in it but for reference I have attached single row data.
 
I want to loop through name , value data ........but I guess we cant loop through custom object variable .....can we convert it into datatable or any other method because I want to loop through name and value column .......Note - I cant use excel.
I have the same question (0)
  • Suggested answer
    Haque Profile Picture
    3,653 on at
    Hi @NA-03061633-0,
     

    In Power Automate Desktop (PAD), when you retrieve multiple rows from a Dataverse table, the output is typically a custom object or JSON array, which cannot be directly looped over like a DataTable.

    To loop through multiple rows (name, value) from Dataverse in PAD - let's follow these steps:

    1. Parse the JSON response: The Dataverse connector usually returns data as JSON. Use the "Parse JSON" action or Set Variable with expressions to convert the JSON string into a list/array variable.
    2. Convert JSON array to a PAD List or DataTable: You can loop through the JSON array by using a For Each loop on the array elements. Each element will be a JSON object representing a row with fields like name and value.
    3. Extract fields inside the loop: Inside the loop, access each row’s properties (e.g., CurrentItem["name"], CurrentItem["value"]). You can then process or store these values as needed.
    4. Optional: Build a DataTable: If you want to work with a DataTable, initialize an empty DataTable with columns name and value. In the loop, add each row’s data to the DataTable using the Add DataRow action. This lets you manipulate or export the data easily later.
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard