cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BigShotRob
Advocate I
Advocate I

Help with a SharePoint 'Get Items' and returning all and sending ONE approval

So I've searched this quite a bit, I've found quite a few articles that detail the process, but I can't seem to get it working, so here I am looking to see if I can get help, I've got a lookup in a flow that does a Get Items from a SharePoint list, the filter is working just fine, but the items that it does get, I want to GET a specific field (text field, that has email addresses in it) and send out ONE approval with all of those, I've tried various different things using data operations but cannot seem to get it to work correctly, and I'm at the point now where I don't know which I should even be using. I've come pretty close using a "Select" & "Join" process, but the output isn't quite what I need, see screenshots.

 

It's outputting the correct fields, but just not as the raw text that I need, it's including the JSON, and I cannot seem to figure out how to strip the JSON out of there, this is how close I've got it, the output is (as shown in the screenshot below):

 

"{"Email":"EmailAddressatdomain.com"};{"Email":"EmailAddressatdomain.com"};{"Email":"EmailAddressatdomain.com"}"

 

I need it to read like:

 

Emailaddressatdomain.com; emailaddress2atdomain.com; emailaddress3atdomain.com

 

In summary, these are the steps I'm trying to have, seemingly pretty basic.

 

  1. Get Items (Filter Query retrieves specific, not condition)
  2. For Each (we'll call it that) item that matches filter query, get a basic text field and return outputs
  3. Join the outputs of the 'For Each' step with ';' (so that I can use it in an approval "assigned to")
  4. Start and wait for an approval (Assigned to is all the fields that were returned).

Here's a screenshot:

 

2019-11-12_11-49-15.jpg

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @BigShotRob 

 

You could use replace expression function.

 

First try to replace "{"Email":" with '' 

Next replace "}; with ''



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

3 REPLIES 3
abm
Super User
Super User

Hi @BigShotRob 

 

You could use replace expression function.

 

First try to replace "{"Email":" with '' 

Next replace "}; with ''



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

So simple, how embarrassing.. I was so fixated on way more complex solutions 🙂

 

Thanks for your help, I've got it working.

 

That said, is there a way to do both actions in a single compose action? Just so it's more clean?

 

Something like 

 

replace(body('StripJSON'),'{"":"','') && Replace(outputs('StripJSON'),'"}','')

 

Hi @BigShotRob 

 

You could Replace within Replace or Concat to combine together.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,759)