Hi,
I've been trying to crack this for a few days with no luck, hopefully someone here can help!
We have a sharepoint list and a flow that monitors that list and when an item is created, scans this list for anything in a status of "1". It then grabs these items and emails the details to the specified person. This is working fine except from one of the coloums which is a multi-choice field.
I can get it to email the field, but it emails it as JSON instead of plain text which for our managers here is unreadable. To get around this I tried to store them as a variable and use the Compose trigger with
join(variables('reqRegs'),';')
This works well when there is only 1 item in the list on a status 1, however if multiple items in the list are status 1 it will combine ALL of the multi choice fields of all status 1 items and email that in all the emails. Does anyone know a way around this?
Screenshot of flow below:
I've tried using the parse JSON command as well as a few other suggestions on this forum but none of them will output the way I want. I'm not fixed in using the compose and variable method if there is something that will work better for my needs. I've tried using tables, variables etc. It seems i need to initialise the variable INSIDE the Apply to each loop, however when I try this i get an error saying something along the lines of 'Initialise variable must be created on a top level' which is what I believe is causing the concatenation of all the multiple selections.
Thanks for any help in advance.
Solved! Go to Solution.
Hi
"I can get it to email the field, but it emails it as JSON"
Can you post an example of the JSON?
Anyway, I think this thread can give you the answer you are looking for:
Hope this helps
Proud to be a Flownaut!
Hi
"I can get it to email the field, but it emails it as JSON"
Can you post an example of the JSON?
Anyway, I think this thread can give you the answer you are looking for:
Hope this helps
Proud to be a Flownaut!
Proud to be a Flownaut!
Thank you for this solution. It works in emailing the fields now, however when updating multiple items it will now email multiple times. (I updated 3 items to test and received 9 emails).
My flow currently looks like this:
It also appears that it is appending all the multi choice selections to the variables, for example one of the items I updated had no multi choice selected, however all the emails contain selections from all previous "apply to each" runs.
@Jcook I tried moving where everything was located but it didnt help. It appears to me that because the variable is declared before the apply to each loop, it just continues to append more strings to it, rather than "resetting" once the Apply to each loop has completed. Is there a way to "reset" a variable? if so i believe that would then solve the issue, if the variable emptied itself after each apply to each loop was completed.
Proud to be a Flownaut!
Thank you. In the end, the original answer worked, I just changed the method I was using to get to the result. Instead of using a get items with a filter, i'm using a "when an item is created or modified" with a case switch. This way doesn't append multiple things onto the array.
Thank you.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
64 | |
23 | |
16 | |
15 | |
11 |
User | Count |
---|---|
121 | |
36 | |
32 | |
28 | |
26 |