Switch is not working


#1

Dear Forum,
I don’t find any answer of my problem.
I try to use switch for multiple choice. The type of examined expression is String.
And the Switch command doesn’t select any case.

I can solve it only with multiple “If”.

Do you have any answer why “Switch” doesn’t work.

Thank you in advance
Tibor


#2

What error you are getting @nokbaratja.


#3

No error.
But not select.


#4

HI @nokbaratja,

can you share the screen shot or xaml file to verify

Regards,
Arivu


#5


#6

Hi @nokbaratja,

Remove double quotes from all the case its not required

Regards,
Arivu


#7

The Switch doesn’t select “EQ” nor “TAX” tree.


#8

Question: Do I have to remove double quotes after “Case”?


#9

This way?


#10

Hi @nokbaratja,

yes correct @nokbaratja

Refer this one for more info

Regards,
Arivu


#11

Thank you Arivu. I try it.
Tibor
from Hungary


#12

HI @nokbaratja,
Here i have attached a sample to you. check it.

File : Switch is not working.zip (2.3 KB)

Regards
Balamurugan.S


Pick elements from Multiple invoice with different format
#13

Thank you Balupad14. Very simple solution.:sob:
Tibor
from Hungary


#14

Nice :slight_smile:


#15

Thank you as well. I was struggling with this for a couple of hours trying various ways. I have an array of strings that are my selections that include spaces. Your test flow made it easy for me to add the string[] array and see if it still worked, it did, then add spaces in the string (I was skeptical of this one) and that worked too. I didn’t see in the documentation where it said that the strings in this special case don’t need “” especially when they have spaces. Thank you


#16

Hi Bill, I agree with you. That is a strange situation (swith command) with string variable.
And I do not understand why I do not find this in the documentation.
Never mind!:slight_smile:
Tibor