cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
BigShotRob
Level: Powered On

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
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!



View solution in original post

3 REPLIES 3
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!



View solution in original post

BigShotRob
Level: Powered On

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

 

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!



Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,454)