cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rhamza
Helper III
Helper III

Unwanted text...

Hello All,

 

I'm pulling a variable from a get list and using a join() <br /> 

 

I'm getting : 

 

{"":"email1@unknown.ca"}
{"":"email2@unknown.ca"}
{"":"email3@unknown.ca"}

 

I want to take these 3 emails and use them to send an email too.... I need to remove the {"":" at the beggining and "} at the end. How ? 

 

And is there some good website, video...  documentation about function ? ( Microsoft example do not give me much hint ... ) 

1 ACCEPTED SOLUTION

Accepted Solutions
Paulie78
Super User
Super User

Remove everything. So it is just the item value remaining. Nothing else. Then it will produce you an array which contains only email addresses. Like this:

2021-02-03_16-46-02.jpg

Then you can simply use the expression:

join( body('Select'), ';')

 

View solution in original post

9 REPLIES 9
v-duann-msft
Community Support
Community Support

Hi @rhamza 

 

Thank you for posting.

 

According to your description, you would like to extract email part from your specific output. If I misunderstood, please kindly let me know.

 

Since you didn’t mention your scenario, so I will use a simple example to show you. You just need to replace some of the dynamic content as formula is the same.

 

For your issue, we could combine ‘split’ ,’last’ with ‘first’ formula as below(Bold part is my dynamic content, please feel free to change):

first(split(last(split(items('Apply_to_each')?['Email'],'{"":"')),'"}'))

 

This is my test SPO list:

v-duann-msft_0-1612234777037.png

 

 

Here is my flow to get email data from list as you required:

v-duann-msft_1-1612234777042.png

 

 

v-duann-msft_2-1612234777046.png

https://www.youtube.com/watch?v=DqZAfkVOw8A

https://www.youtube.com/watch?v=Bf2cH4F0v3o 

 

Hope the content above may help you.

 

Thanks

Anna

rhamza
Helper III
Helper III

Thx for the quick reply but this would only work if they all start with email as their email address. Which is answering my main question but I wasn't clear enough.. 

 

I'll try to be more clear.

 

rhamza_1-1612277283921.png

 

The result is : 

 

{"":"john.do@unknown.ca"}
{"":"bob@unknown.ca"}
{"":"sam11@unknown.ca"}

 

I want a straight line of all these email with a ; 

 

Example : john.do@unknown.ca ; bob@unknown.ca ; sam11@unknown.ca

 

rhamza
Helper III
Helper III

bump

Paulie78
Super User
Super User

Try this:

2021-02-03_14-37-52.jpg

Then in the map box, but your email value. Then you will end up with just a plain array of email addresses, not name/value pairs. Then your join expression further down will give you the result you want.

rhamza
Helper III
Helper III

I thought there was a way to get the plain txt without the bracket of JSON format. 

 

I finally resolve it using many replace function .

 

replace(replace(replace(replace(body('Join'), '"'''), '}'''), '{',''), ':'';')

 

Paulie78
Super User
Super User

There is a way, the way I just showed you in the post above. 😁 Your way will also work, but quite a complicated solution. Well done.

rhamza
Helper III
Helper III

Maybe it's me being stupid but can you show me what I need to put in this json format ?

 

If I remove the name, it says invalid json. 

 

rhamza_0-1612370133198.png

 

Paulie78
Super User
Super User

Remove everything. So it is just the item value remaining. Nothing else. Then it will produce you an array which contains only email addresses. Like this:

2021-02-03_16-46-02.jpg

Then you can simply use the expression:

join( body('Select'), ';')

 

View solution in original post

rhamza
Helper III
Helper III

**bleep**!! this is exactly what I needed ! 

 

Thx a tons! 

 

Nice supporting mate! 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (2,321)