Hello,
I have been trying several approaches for this but so far I haven't been able to find a working solution, the object is as follows:
{
"responder": "email@email.pt",
"submitDate": "8/3/2021 4:20:00 PM",
"ra7992b65ed8447a4a1876f5208aee8bc": "Session1",
"r87015f835f094985908684447fcc9533": "Session2",
"r480746f9f54640be8c76d998e1892e02": "Session3",
"r99d5fa99223b453f804a51b95ffa2c09": "Session4"
}
What I am trying to do is just convert this into an array without the responder or the submitDate, any ideas / tips would be appreciated!
Edit 1 (For future references): My idea was to make a power autoamte that is resuable to any MS form (that has a specific template) without having to hard-code convert the json answers into an Array.
Thanks in advance!
Solved! Go to Solution.
You can do it like this:
The output generated is:
[
"Session1",
"Session2",
"Session3",
"Session4"
]
The expression in Compose 2 is:
xpath(xml(json(concat('{ "values": ', removeproperty(removeProperty(outputs('Compose'), 'responder'), 'submitDate'), '}'))), '/values/*/text()')
Blog: tachytelic.net
YouTube: https://www.youtube.com/c/PaulieM/videos
If I answered your question, please accept it as a solution 😘
Can you just manually type what output you are looking to create please?
It looks like you are processing MS Forms data. The response data will be available to you as dynamic content.
As @Paulie78 you can manually create the array. For example:
Ellis
Hi everyone, thank you for the great replies and suggestions!
However they are all a bit hard coded, my idea is to transform every answer of a specific forms template that we use into an array, without having to "hard-code" reference them in the array. The idea is to make this as easy to replicate to use with different forms which have the same template. And in doing so without the "hard-code" references, minimal change when replicating the flow would be needed.
You can do it like this:
The output generated is:
[
"Session1",
"Session2",
"Session3",
"Session4"
]
The expression in Compose 2 is:
xpath(xml(json(concat('{ "values": ', removeproperty(removeProperty(outputs('Compose'), 'responder'), 'submitDate'), '}'))), '/values/*/text()')
Blog: tachytelic.net
YouTube: https://www.youtube.com/c/PaulieM/videos
If I answered your question, please accept it as a solution 😘
Exactly what I was looking for! Thank you very much!
User | Count |
---|---|
103 | |
36 | |
29 | |
25 | |
16 |
User | Count |
---|---|
135 | |
53 | |
52 | |
36 | |
26 |