cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User
Super User

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

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 blog

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

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

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 blog

View solution in original post

Highlighted
Advocate I
Advocate I

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

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'),'"}','')

 

Highlighted
Super User
Super User

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

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 blog

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (5,736)