cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
d7chang
Frequent Visitor

Switch Case based on SharePoint String Field

I have a SharePoint column of type String that takes in either "Approved," "Signed Off," or "Closed." I created a flow that will generate emails when any of these three values are inputted in a SharePoint item. I keep getting these errors:

 

1. ExpressionEvaluationFailed. The execution of template action 'Switch' failed: The result '' of the evaluation of 'scope' action expression '@triggerBody()?['Status']' is not valid. The result is expected to be a value of type 'String, Integer'.


2. ActionFailed. An action failed. No dependent actions succeeded.

 

Any suggestions? Thanks.

 

3 REPLIES 3
v-yamao-msft
Community Support
Community Support

Hi d7chang,

 

Not sure how is your flow configured. Could you show me a screenshot of your flow?

 

To reproduce this issue on my side, I create a flow looks like below. The Column Status value is of Choice column type. And it has three options, “Pending”, “Closed” and “Other”.


When I create an item to trigger the flow, it works as expected. An email would be sent according to the Status value I have entered in the list.

4.PNG

5.PNG

 

Hope this could be a reference for you.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The original posted has a column of type "string" - which is likely "single line of text" in SharePoint. Your reproduction of the issue uses a choice column, which is not the same.

 

Are Single Line of Text fields supported in Flows "Switch" condition?

Hi paulschaeflein,

 

A single line of text is supported in Flow.


I just test the flow using a single line of text column with same flow configuration.


It is working fine without issues.


Are you having any issues with the single line of text column in SharePoint when creating a flow using the Switch case?


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Users online (1,825)