Hello,
I have this app where I store a collection to JSON with this format to be used by PowerAutomate :
{
"type": "array",
"items": {
"type": "object",
"properties": {
"Categorie": {
"type": "object",
"properties": {
"Value": {
"type": "string"
}
}
},
"ID": {
"type": "integer"
},
"PrixUnitaire": {
"type": "integer"
},
"Quantite": {
"type": "integer"
},
"Reference": {
"type": "string"
},
"Titre": {
"type": "string"
}
},
"required": [
"Categorie",
"ID",
"PrixUnitaire",
"Quantite",
"Reference",
"Titre"
]
}
}
"Categorie" is an object and specifically a Choice Column of a SharePoint List.
I then use this JSON in the same app to convert it back to the same collection for another usecase, but I can't figure out how to get the correct formula for the "Categorie" object.
Here is the code I use to collect the JSON, the other fields are collecting correctly, but I can't find the correct way to do it for "Categorie" :
ClearCollect(
colSpPanierCreationPoste;
ForAll(
Table(ParseJSON(ThisItem.PanierRaw));
{
ID: Value(Value.ID);
Quantite: Value(Value.Quantite);
Titre: Text(Value.Titre);
OrdreTri: Value(Value.OrdreTri);
Categorie: ???
Reference: Text(Value.Reference);
PrixUnitaire: Value(Value.PrixUnitaire);
}
)
)
Thank you 🙂