Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

ParseJSON, display choice column into a gallery?

Posted on by 155
Hello!
 
I try to figure out a way to convert a JSON into a gallery. So far it works well on everything that is text but I have some values with choices and I can't figure out how to display that information in my gallery.

Imagine I have this JSON in a textbox :
 
"[
  {
    "Anciennete": "2000-04-25",
    "AppelFait": "true",
    "Equipe": {
      "Value": "2"
    },
    "Formations": [
      {
        "Value": "1st value"
      },
      {
        "Value": "2nd value"
      },
      {
        "Value": "3rd value"
      }
    ],
    "NomPrenom": "Iron Man",
    "SommeTS": 8,
    "Telephone": "450-555-6002",
    "Titre": "6002"
  }
]"
 
 
I can easily display the NomPrenom value with this formula on a text label inside my gallery :
ThisItem.Value.NomPrenom
 

The problem is I couldn't find any tutorial that shows how to concatenate the values from the Formations table and display them in a single text string.
 
Can you help me please?
Categories:
  • Volt26 Profile Picture
    Volt26 155 on at
    ParseJSON, display choice column into a gallery?
    Hello mmbr1606
     
    Unfortunately, here is what I get :

     

    The reasons why I use ";" instead of "," is because this is the french version of power apps and I can't switch it back to english.

    Like I said, it works fine for
    So I tried ThisItem.Value.Formations just in case but it doesn't work either... Any ideas why it works for you but not me?

    I should mention your formula works if I apply it on the Sharepoint List data but it doesn't when I convert a textbox's JSON with the Table(ParseJSON(TextInput1.Text)) formula...
  • mmbr1606 Profile Picture
    mmbr1606 9,996 on at
    ParseJSON, display choice column into a gallery?
    hey
     
     
    if you have it in a textbox you can try:
    ClearCollect(MyCollection, JSON(TextInputJSON.Text))
    

    in the label you can try this:
    Concat(ThisItem.Formations, Value, ", ")
    
    if my reply helped please mark as verified answer,
     
     
    cheers

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard