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 / How to Display JSON Re...
Power Apps
Answered

How to Display JSON Results in Vertical Gallery

(1) ShareShare
ReportReport
Posted on by 20

How to parse this output to show in 2 different columns in a power app gallery.

affanain_1-1719170140857.png

 

This output is generated by:
ClearCollect(
PredictionResults,
tasks_estimator.predicttask({
base_item_code: Concat(FilteredDataTable, ProductCode & ":"),
customer: customername,
offering_category: ProjectTypeDropdown.Selected.Value
})
);

 

I'm using these formulas in my labels of vertical gallery :

First(ThisItem.predicted_task_names).Value

 

But I want all the predictions. Whenever I change my formulas, it gives this type of errors:

affanain_2-1719170219152.png

 

Categories:
  • Sunil Kumar Pashikanti Profile Picture
    2,338 Super User 2026 Season 2 on at

    Hi @affanain,

     

    Why are you using First function, it always gives the first item from the collection.

     

    First(ThisItem.predicted_task_names).Value - Use this only if you need to display the first item from the collection.

     

    Can you try with below code?

     

    ThisItem.predicted_task_names.Value

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

    Sunil Pashikanti - Tech Blog: PowerApps

  • affanain Profile Picture
    20 on at

    Hi @SunilPashikanti,

    Thanks for the reply. I just showed the results of First(ThisItem.predicted_task_names).Value, that this is working fine. However, when I'm trying to use 

    ThisItem.predicted_task_names.Value

     I get the error:

    affanain_0-1719209400329.png

     

  • Verified answer
    royg Profile Picture
    on at

    Hi @affanain,

    Based on the inputs you provided, you have an array of objects (in your example there's 1 item in that array), the items have 2 properties: predictedTaskHours and predecitedTaskNames which are both nested arrays.

    It seems like you want to display a nested gallery inside the top gallery that displays 2 columns side by side with the data in the 2 nested arrays (taskNames/predictedHours).

    If both arrays have the exact same number of items, you could do something like this to display the nested gallery with 2 columns, set the nested gallery Items property to:

    ForAll(Sequence(CountRows(ThisItem.predicted_task_names)),
    {
     TaskName: Index(ThisItem.predicted_task_names, Value).Value,
     PredictedHours: Index(ThisItem.predicted_task_hours, Value).Value
    })

    Let me know if that helps

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard