Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Flow triggers IF and ELSE condition same time

User358853
Tera Contributor

Hi all

 

Does anyone knows flow designer flow , if condition and else condition triggers same time and update the record?

It appears that when the if condition is met, the flow design executes accordingly; however, I have also included an ELSE condition, which is triggered at the same time

Technically it should stop once if condition satisfied but here its executes both

3 REPLIES 3

SohamTipnis
Kilo Sage

Hi @User358853,

 

In Flow Designer, IF and ELSE won’t run at the same time—only one branch executes per evaluation.

If you’re seeing both update the record, it’s usually because the flow is triggering multiple times (for example, due to record updates) or another automation like a business rule is also updating it.

I’d suggest checking the execution details and making sure your trigger condition is specific enough (like running only when a particular field changes).

 

If you find my answer useful, please mark it as helpful and correct. ‌‌‌‌‌😊


Regards,
Soham Tipnis
ServiceNow Developer ||  Technical Consultant
LinkedIn: www.linkedin.com/in/sohamtipnis10

yashkamde
Kilo Sage

Hello @User358853 ,

 

This shouldn't be the issue, can you share the screenshots??

May be you are running parallel executions or the placement of actions may be wrong...

 

If my response helped mark as helpful and accept the solution.

Tanushree Maiti
Giga Sage

Hi @User358853 

 

Following could be potential causes of your issue and probable resolution given below:

Potential Causes:
  • Asynchronous Behavior: The most likely cause is an action within your If logic (e.g., a script making an external API call) that runs asynchronously. The flow doesn't wait for the result and moves to the Else block with a pending or default condition status. When the asynchronous operation finishes later, the If path's logic might update a record, making it appear both ran.
  • Concurrent Flow Executions: from multiple places it might be triggering flow simultaneously on the same record due to rapid updates. If the first flow execution hasn't completed its logic (e.g., updating a status field or creating a label entry) before a second flow instance runs, both might see the initial state of the record and take different paths.
  • Misconfigured Trigger Conditions: If your flow trigger conditions are too broad, a single record update might trigger the flow multiple times, leading to concurrent executions. 
Troubleshooting and Solutions:
  • Review Flow Logs: The first step is to thoroughly examine the flow execution logs for the specific record. This will show the exact order of operations and the values of the data pills at each step, helping you pinpoint where the logic diverges unexpectedly.
  • Ensure Synchronous Operations: If an action needs to complete before the flow proceeds to the next step, ensure it runs synchronously. For external API calls in a script, you might need to use synchronous methods if the requirement is strict, though this is generally discouraged as it can impact performance.
  • Manage Concurrent Flow Runs:
    • In the Flow Trigger properties, consider setting the Run Trigger field to "Only if not currently running" to prevent multiple flows from processing the same record at the same time.
    • Alternatively, you can implement a mechanism within your flow (e.g., a "processing" flag field on the record) to lock the record while the flow is running.
  • Use Flow Variables for Temporary Data: Instead of relying solely on record fields that might be updated asynchronously, use Flow Variables to store and manage data within a single flow execution's context.
  • Simplify Logic: Avoid overly complex nested If/Else structures. For multiple conditions, using a "Switch" flow logic which can make the logic clearer and easier to manage.

Ref:  https://www.servicenow.com/community/developer-forum/can-if-and-else-block-be-executed-on-same-time-....

 

https://www.servicenow.com/community/workflow-automation-forum/flow-trigger-options/m-p/3311909#:~:t....

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: