We have set up an automation for subtasks to be created. I think we are confusing the else if and if. 4 of our subtasks are being created when they should not be and one is not being created when they should be.
We have 2 if statements prior to where it is working properly.
We then have another if which is not working properly (second photo). It should be looking at if the issue is approved and if the employee type is not one of Contract or Temp the subtask should not be created.
We then have an else if which should create subtasks if the issue is approved and the employee type is one of Contract or Temp. (3rd photo)
We have other subtasks which are else if's and are working properly after the above which are not working correctly.
Is anyone aware of how the if and else if works? Is that what is causing the issue?
Hi @Melanie.Johnson ,
Please can you elaborate what you're trying to achieve with the Automation? I.e. the use case.
While the images are helpful they don't paint the complete picture since the trigger is not visible in them.
PS: I would take the condition "STATUS is one of APPROVED" and put is as a common condition before getting into any of the IF/ELSE loops, would make your automation much easier to read. :-)
Thank you we will have to look into the common condition as we are new to this. Our trigger issue is when the value changes for status. Once the status is approved there are several subtasks which are needed depending on other fields. I have attached photos of the rule we have in place. All the rules are working correctly except for the ones related to the employee type. We need a task created if they are a contract or temp and we do not need tasks if they are they are contract or temp but the task will be created if they are any of the other employee types
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'll thanks for the image, and the use case. I would make an automation like below to fulfill the use case:
Adding a demo snapshot of what it might look like at your end (ignore the field names, since my instance has different entities as compared to your).
Hope this helps.
:-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
THANK YOU SOO MUCH! This helped greatly! I now understand the if and else statements. I tested your set up and it worked. I am going to add the many other entries into my test to ensure everything runs smoothly. I greatly appreciate the help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We figured it out!! Thank you!!!!
So I thought we figured it out however the system is not doing the IF and creating the one task when we choose contractor. Instead it is creating the 4 tasks under the else. I am totally baffled as to why it is doing this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can try adding a negative condition in the Else condition i.e. Employee Type IS NOT contract or Temp.
Would also suggest checking the activity log of the automation for the issues where it incorrectly runs, this will help debugging the root cause or might help give you a clue as to which step is making the automation run.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.