Control flow in Studio Web - Practice 2 - Switch and For Each

This course is designed so you can also learn from your fellow learners, particularly through the forum topics.

If you need help, post a question as a reply in the Forum discussion below. To increase your chances of being helped, be as descriptive as possible. Include in your comment:

  1. A description of your issue: when is it happening, what activity you have trouble with.
  2. A screenshot of your error.
  3. You can also attach your automation project.

If you can help a fellow learner, don’t be afraid to reply and make a suggestion. Participating in the conversation helps solidify the knowledge you’ve acquired in this course.

Hi everyone,

I’m working on Practice 2 — Switch and For Each from the Control Flow in Studio Web course. The automation should process incoming emails with “New ticket” in the subject, extract the ticket number and ticket type, and then send a custom email based on the type using a Switch activity.

Right now, the problem I’m facing is:

  • The email loop runs fine, but the Switch activity doesn’t seem to trigger the correct case.
  • In some cases, no email is sent at all.
    Has anyone else run into a similar issue or solved this kind of flow?

Hi @Roopa_Patel , You don’t see the sent email because the ‘Send Email’ activity has the Save As Draft option set to True. You need to change this to False, and then you’ll see the sent email :slight_smile:

Regarding the Switch functionality, I haven’t noticed any issues, and it works as expected for me. I recommend testing it step by step to see what the output is when processing each email.

Let me know if you have any questions.

1 Like

The solution steps and emails contain wrongs.

Strange because the Switch instruction does not work for me.

  1. I have created an assign activity which extracts str_TicketType from the email’s body. Log message shows the correct value, eg. “Hardware purchase”
  2. In the Switch activity, when I put the str_TicketType variable it does not enter the particular cases but defaults each time.