Could someone please tell me why I don’t see the case value in “Switch” activity? Please refer to screen prints below (this is relating to the Decision exercise). Thank you!
Hi,
The case values are not automatically displayed. You have to manually enter them.
If you already wrote the case values but they are not shown, then I do not know why it does not work.
I hope it will help you,
Tiffany
Thanks for your reply Tiffany. The case values are already in the table. Is this what you are referring to?
Hello @Yannie,
I think for String you have to manually enter each one. If what you’re evaluating will return a Boolean value, then the case values (True or False) may be selected in the dropdown.
In your situation, assuming that your Switch is in a For Each, the case value is stored in the [CurrentRow] Transaction Type. Switch Case acts just like an If activity wherein you would specify the condition if A = B or A < B etc. Their difference is… the value in the Switch is checked only if it is equal to any of the cases you put in.
If I correctly understand your problem, you think that the Switch Case values are automatically filled with the “Transaction Type” values ? If so, then the Switch case values are not automatically filled, you have to manually write them even if they are already in the table.
Per example, if the case values were automatically filled and we had not any of the value corresponding to the wanted cases (Deposit, Withdrawal, and Split Deposit) in the table, then we would not be able to work as expected.
In our situation, we want to treat 4 cases: Deposit, Withdrawal, Split Deposit, and Default. So we have to manually enter them as our Case values.
The “Transaction Type” value of each row is our Switch Expression, this is the value that will be compared with the Switch Cases. Whatever the values in the table, our cases stay the same.
I may be wrong, but as I see it, the case values should be created according to what you want and not the Expression.
I do not know if that will help you, but I hope so,
Tiffany
PS: Sorry for the English mistakes
Thank you Tiffany! This was very helpful, especially the diagrams. I misunderstood and thought they would automatically appear and weren’t able to added manually.
Thank you for your reply.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.