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 / how to display in gall...
Power Apps
Unanswered

how to display in gallery or data table the json format

(0) ShareShare
ReportReport
Posted on by 55

how can i display to the gallery separated by id, transactiondate, time in and time out.

 

this is the sample of json from the powerautomate respond

 

cha143_0-1716432357862.png

 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at

    Hi @cha143 ,

     

    Please try to use parsejson function.

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-parsejson

     

    Best Regards,

    Wearsky

  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    Hi @cha143 ,

    I assume there is a JSON string:

    Set(jsnString,"[{""Column1"":""1"",""Column2"":""1"",""Column3"":""1"",""Column4"":""1""}]");

    The code should be:

    Set(jsnString,"[{""Column1"":""1"",""Column2"":""1"",""Column3"":""1"",""Column4"":""1""}]");
    Set(myJSONObject, ParseJSON(jsnString));
    ClearCollect(
     coljson,
     ForAll(
     Table(myJSONObject),
     {
     Column1:Text(ThisRecord.Value.Column1),
     Column2:Text(ThisRecord.Value.Column2),
     Column3:Text(ThisRecord.Value.Column3),
     Column4:Text(ThisRecord.Value.Column4) 
     }));

     

  • cha143 Profile Picture
    55 on at

    hi,  the json is from powerautomate powerapps respond. i dont have exact json string values they are all from the response of powerautomate

     

    cha143_0-1716441217755.png

     

     

    and this is the value of the response 

     

    {"resultType":"JsonValue","value":[{"id":"1309","transactiondate":"2022-06-08","timein":"2022-06-08T08:35:42.18","timeout":"2022-06-08T18:21:27"},{"id":"1309","transactiondate":"2022-08- 09","timein":"2024-04-09T10:14:15","timeout":"2024-04-09T21}]

  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @cha143 ,

     

    Try this

    vxiaochenmsft_0-1716443196592.png

    vxiaochenmsft_1-1716443206588.png

    ForAll(var.value,{id:Text(ThisRecord.id),transactiondate:Text(ThisRecord.transactiondate),timein:Text(ThisRecord.timein),timeout:Text(ThisRecord.timeout)})

    vxiaochenmsft_2-1716443228154.png

     

    Best Regards,

    Wearsky

  • cha143 Profile Picture
    55 on at

    thank you so much. this solved my problem

  • cha143 Profile Picture
    55 on at

    one thing , how can i filter the transaction data that can only see the date only the current yr. ( all transaction data will be year 2024 only) and can i  convert the value as text so i can display it on textbox?

  • cha143 Profile Picture
    55 on at

    hi sir @v-xiaochen-msft, maybe you could help me regarding this one. My data table displayed the whole month i just need the current date of the year and previous date . Here is the view of my datatable.

     

    cha143_0-1718941938570.png

     

    and here is the code you give me:

      SortByColumns(ForAll(vaa.value,
    {   pmsid:Text(ThisRecord.pmsid),
        transactiondate:Text(ThisRecord.transactiondate),
         year:Text(ThisRecord.transactiondate),
        timein:Text(ThisRecord.timein),
     timeout:Text(ThisRecord.timeout)}),
      "transactiondate", SortOrder.Descending)
     
     
    please help me thank you

       cha143_1-1718942024227.png

     

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard