Showing results for 
Search instead for 
Did you mean: 
Super User
Super User

The expression is not valid for switch

I have a flow with a simple switch condition.   It gets the value from the SharePoint list item and then sends email to specific people based on the Switch input.


It's failing on the switch condition.    In this case the switch value is Payroll/Timekeeping System.   I tried copying the expression result from the error (both Payroll/Timekeeping System and "Payroll/Timekeeping System") and pasting it into the switch case and testing and it still failed.   I am not sure what else to do.   The column that contains the data for this dynamic input is a choice column.


The expression " eq Payroll/Timekeeping System" is not valid. Creating query failed.
clientRequestId: 4db5410e-2bee-4ef2-9845-6c509999eb14
serviceRequestId: 4db5410e-2bee-4ef2-9845-6c509999eb14


Here is the setup, I initialize and set a variable to the value of the choice column.







Here is the error.





If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
Super User II
Super User II

Hi @JR-BejeweledOne 


The Switch will check each case, but it will compare with the string in the field. You can't make comparisons there since the comparison is made for you.


I would do the following. In the run, check what value is in the "Category Value" from SharePoint. There you can check the real value that is there and copy that value to your "Case." Then you're sure that the value you're comparing is the same that is provided.


Can you please check if and let me know if you have any questions?



If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.


That is exactly what I did, if you read my post again.


Also you can see in the screenshots.   In the failed workflow, I copied the Input from the failed action and pasted that into the switch case.  It failed.   I went back and went to the raw input and copied that value and pasted it into the switch case and that failed as well.


I can see from the Input and Raw input that the value in the switch case and the incoming value match.    So I have no idea why it's failing, unless it has something to do with the fact that the value it's failing on has an '/' in it.

If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

Helpful resources

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,163)