I’ve been perusing the forums, and based on what i’m looking to do it was recommended to use a switch.
Scenario: 7 provinces in Canada use the same tax code, and then the remaining have their own tax codes.
Rather than having a long line of code, is there a better/cleaner way of coding this?
Ex. below (Switch)
If(state.Contains(“Province1”),“Tax1”, if (state.contains(“Province2”),“Tax1”, etc.
Case1 - Tax1
Case2 - Tax2
Essentially what i need to do is have the bot reference the queue item province, and then based on that province select the applicable tax code. But multiple provinces have the same tax code so i’d like to just do it that if any of said provinces exist in that queue item, then select that tax code.
I think that a cleaner way will be using a dictionary where you store all the provices and tax for each of them, and then based on the value that comes from the queue item return the corresponding result from your dictionary