RPA Developer- Switch Practice 3 question

Hi All-
I’m doing the Practice 3 project for RPA Dev path.
I completed the switch portion (see attached) but when I looked at the download complete version to compare, I find I am unable to duplicate it because I cannot add a Case (ax, bx or cx) as they have.
When I try I get “ax is not a valid value for Int32”. I had to add a Sequence with 3 Assign activities but I think that’s messing me up (the solution doesn’t have those). I just don’t know how to recreate the solution.
Of course, when I run the my solution, I get errors but when I run the downloaded version it works, so I’m a bit confused by this one.

If anyone could maybe give me some insight, I’d appreciate it.
I can send my complete project if needed.
Thanks!
J
EDIT: I guess I cannot attach a document to this post. I can send it out if someone contacts me.

There is a section in the Properties panel to choose the datatype of the switch arguments. By default, it’s set to Int32, so you’ll need to change it to String.

Thanks, Anthony!
Any chance you could tell me what is wrong with this package? I keep getting error messages, but not sure what they mean (pretty new here). As far as I can tell, this package matches the solution (which works).
Any help you can provide would be greatly appreciated!

project.json (965 Bytes)

Can you upload your whole zipped project folder?

Absolutely, and thank you again!
The .local and .settings file I could not zip. If you need those, I can try another way.

switch practice.zip (2.2 KB)

Your For Each loop is iterating over Objects when it should be iterating over Strings. Alternatively, you can use item.ToString.Substring(0,2).ToLower in your expression, but it is best to change the datatype in your For Each loop in this case for simplicity.

Also, your variable declarationgs for errorCodes and cxArray are throwing errors. Check that you’re properly using brackets in the code.

Lastly, you had a decimal in your substring argument when it should have been a comma.

Be very careful with syntax. If you use a ( instead of a {, for example, it will cause errors.

Anthony, you’re amazing. Thank you so much, again.
I have a renewed appreciation for the details. :slight_smile:

I looked at all you indicated and my project works as intended now.

Much appreciate the help!

Cheers.

J