Showing results for 
Search instead for 
Did you mean: 
New Member

If statement not recognising selected choice from drop down (using SharePoint List choice connector)

If statement Troubleshoot.png

 Good morning all,


I have spent way too many hours trying to get this to work and simply can not solve.

*Screenshot of code posted above"

I have set up an approval flow where the selected manager will be sent the form and I am trying to assign the email address the flow is connected to by selection of the name of the manager. However, I keep getting an error "ApprovertoEmail invalid value for parameter". I have tested the Variable side of the statement which works fine form Set(... onwards when removing from the IF statement.


Please note - I have changed to email name to A.Test for anonymity but can confirm the application had the correct name(s) in the relevant fields.


Therefore it must be an issue with the first part of the IF statement not recognising the name "A.Test" for some reason? 


If anyone can help that would be great, thanks in advance.

Super User
Super User



Try without the parenthesis in the workflow run parameter.



If it solved your problem give a kudo and accept it as a solution. 

Follow and Subscribe 365 Stack for more updates. 

Thank you for the suggestion. I have tried with and without the parenthesis still the same result unfortunately:


invalid parameter fault.png

Super User
Super User



ApproverToEmail parameter is the first or the second in your flow and it is variable SMEMAIL?

If yes, i think the problem is in your If() statement.
SMEMAIL must be always populated with any string.
What if datacardvalue10 selected value  is not equals to A.test? what is the value of SMEMAIL in that case?


you may test that:

If(DataCardValue10.Selected.Value = "A.test",

Set(SMEMAIL, ""),

Set(SMEMAIL, "")



New Member

Hi, thank you for the suggestion.


I have tried the suggested to ensure no matter what is selected the parameter contains a string but for whatever reason it still does not like the IF statement... I will have to look into other options around what I thought would be a quite simple task to assign an email address based on a drop down selection from the user! 😅

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,552)