cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mithushalk
Helper IV
Helper IV

Based on Form response pick an email address from sharepoint excel

In the form, there is a question with department choices.

mithushalk_0-1620305436705.png


Based on the chosen department an email has to trigger only to that department. (An excel file with departments email address is created on the SharePoint)
The email address has to be picked from that Sharepoint excel.
IF an email address can't be picked from the SharePoint excel sheet, please suggest how it can pick from the Sharepoint list.


26 REPLIES 26

Hi @DamoBird365 
I request you to explain the prev message in detail for me to understand 

From here,

If this works, then I suggest you need to use a replace expression to tidy up the dynamic value returned by your form.  You need to use

 

replace(replace(outputs('Get_items')?['body/value']?[0]?['Team_x0020_Email_x0020_Address'],'["',''),'"]','')

 

This will return Finance without the brackets and double-quotes.

@mithushalk 

 

Glad my suggestion worked for the plain text expression.  In order to strip out the square brackets and double quotes, simply paste the expression I have previously supplied into the expression builder.

 

DamoBird365_0-1620481238961.png

 

You will see that there is a replace expression as follows:

DamoBird365_1-1620481303665.png

 

But assuming I have your column name correct, the copy and paste should work for you.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

Hi @DamoBird365 

I copied & pasted as instructed 

mithushalk_0-1620487762106.png

 

DamoBird365
Super User
Super User

Hi @mithushalk 

 

My bad. I’ve wrongly picked up the get items body expression from one of your previous messages. It’s your form response that needs the replace expression performed on.

 

So, how do you get the expression for your form response?

 

Go into the filter of get items, select expression, copy paste the below:

 

replace(replace(INSERTHERE,'["',''),'"]','')

 

And then delete INSERTHERE, select the dynamic tab, select the form response you require and select update.

 

Damien

mithushalk
Helper IV
Helper IV

@DamoBird365 

As instructed I edited the flow.

mithushalk_0-1620568419444.png

I tested the flow & it threw an error.

Screenshot of history

mithushalk_1-1620568557067.png

 

Error details

mithushalk_2-1620568608573.png

 



DamoBird365
Super User
Super User

@mithushalk 

 

Hopefully this makes sense.... 😉 your previous message includes the expression as a string and so won't evaluate.

 

ezgif-7-6e134b565a04.gif

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

View solution in original post

mithushalk
Helper IV
Helper IV

@DamoBird365 
It worked for me.
Thank you for the patience to help me 😊

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.

Top Solution Authors
Users online (1,309)