cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
krfajar Helper III
Helper III

Switch case in drop down list cannot working

I am have field choice drop down list: Approved or Rejected.

field approve.png

 

 

 

But when i am add trigger initialize variable

initialize variable.png

 

 

 

 

with expression: coalesce(body('Update_item_sales_approver_BDE_BDM')?['Approved_x0020__x002f__x0020_Rej']?['Value'],'Approved','Rejected')

 

switch.png

 

 

 

my error: error in trigger switch

switch.png

 

 

 

whether my value expression is correct?

Thanks guys

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Switch case in drop down list cannot working

Hi @krfajar ,

 

Please make sure:

1. All the expression in your flow are correct.

2. Keep the choice of the column the same with the case Equals value, to be Approve and Reject, or be Approved and Rejected.

 

Best regards,

Alice       

 

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

View solution in original post

3 REPLIES 3

Re: Switch case in drop down list cannot working

In the Switch case, have you tried setting the values to 0 and 1 versus "approve" and "reject"? The error seems to indicate that an integer is what it's looking for.

krfajar Helper III
Helper III

Re: Switch case in drop down list cannot working

Hi @PowerBack19 

When i am choose 'Approve', My expression result

switch.png

 

 

 

 

 

Please correct me if i am wrong, i am create action trigger Initialize variable: Boolean is true

initialize variable1.png

And my expression: coalesce(body('Update_item_sales_approver_BDE_BDM')?['Approved_x0020__x002f__x0020_Rej']?['Value'],'0','1')

switch.png

 

 

 

 

 

 

But when I am choose 'Approve', my expression result cannot function (in my first picture).

Please @PowerBack19 help me. cmiiw. Thanks

Community Support
Community Support

Re: Switch case in drop down list cannot working

Hi @krfajar ,

 

Please make sure:

1. All the expression in your flow are correct.

2. Keep the choice of the column the same with the case Equals value, to be Approve and Reject, or be Approved and Rejected.

 

Best regards,

Alice       

 

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

View solution in original post

Helpful resources

Announcements
Did you attend MBAS? Claim your badge

Attending MBAS? Claim your badge

Whether you’ve streamed the digital event live, or you're watching on-demand, claim your attendee badge to sport on your profile.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (5,973)