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
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,091)