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 III
Super User III

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 III
Super User III

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,714)