I need some help. I am building a workflow. I...

workflow
(Derrick Woolfson) #1

I need some help. I am building a workflow. In the email section “to” I am trying to send the user the information based on my ‘column’ named ‘location’ that said this is how I set it up:

SWITCH([location], “sample1”,"email@email.com", “Sample2”,"email@email.com")

It shows the data as being valid, but it does not work is there something I am doing wrong? I did make sure to note “all changes”

(Philip Garrett) #2

@Derrick_Woolfson

I tried the following experiment and it worked.

  1. I defined a field called “Name” of type “Name”

  2. I entered the following expression in the “Send to” field of my email workflow rule. SWITCH([Name], “Bill”, "bill@gmail.com", “Nat”, "nat@gmail.com",“David”,"david@gmail.com","unknown@gmail.com")

  3. I made a change that triggered the email workflow rule.

  4. The “Send to” field was populated properly.

I am not sure why your expression fails.

  1. What error are you seeing? 2. Does your expression succeed in the expression tester? 3. What error are you seeing in Audit History? See help.appsheet.com - Troubleshooting Workflow Emails Troubleshooting Workflow Emails help.appsheet.com
(Aleksi Alkio) #3

@Derrick_Woolfson

At least you should fix your SWITCH formula first. The else part is missing.

(Derrick Woolfson) #4

I am a bit lost. When you say “else part”?

(Aleksi Alkio) #5

Check this one… help.appsheet.com - Conditional Expressions Conditional Expressions help.appsheet.com