Hi all,
is there a possibility to have this selector (image below) in power automate desktop. I would need the possibility to read a data table, and, for example, add a custom column based on another column value... so mapping an array to a custom one.
I want to avoid looping the datatable with the loop connectors in power automate desktop since they are really really slow.
Thanks!!
Hi @Anonymous ,
Yes, it's possible. Please follow the screenshots below:
Observe third action. --> Use Set Variable action and change NewVar to JsonAsCustomObject.name
Copy and paste this code in PAD development canvas to get the below actions. It will automatically convert the below code to GUI elements.
SET NewVar TO $'''{\"name\":\"sachin\"}'''
Variables.ConvertJsonToCustomObject Json: NewVar CustomObject=> JsonAsCustomObject
SET JsonAsCustomObject.name TO $'''Hello'''
SET NewVar2 TO JsonAsCustomObject.name
Hope this helps 🙂
@sakula1996, that is just as slick as it can be! 👍👍👍
I had no idea you could drop code into the PAD development canvas. Just tried it, works great.
Regards,
burque505
Hi @sakula1996 , thanks but how I can apply this solution with a JSON with multiple childs?
For example I have this JSON:
{
"1": {
"ID": "SGML",
"SortAs": "SGML",
"GlossTerm": "Standard Generalized Markup Language",
"Acronym": "SGML",
"Abbrev": "ISO 8879:1986"
},
"2": {
"ID": "SGML",
"SortAs": "SGML",
"GlossTerm": "Standard Generalized Markup Language",
"Acronym": "SGML",
"Abbrev": "ISO 8879:1986"
}
"3": {
"ID": "SGML",
"SortAs": "SGML",
"GlossTerm": "Standard Generalized Markup Language",
"Acronym": "SGML",
"Abbrev": "ISO 8879:1986"
}
}
and I want, for each child "1", "2", "3", create another item based on the concatenation of "ID" and "Abbrev". With the "select" connector in the service, I can do something like this:
json(
concat(
'["',
item()?['ID'],
'","',
item()?['Abbrev'],
'","',
concat(item()?['ID'],item()?['Abbrev'])+'"',
']'
)
)
So create an array with square brakets, and insert a custom item (in this case is the concatenation of two other items).
Thanks
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.