Flow designer logs updates

divyadhanda
Tera Contributor

I have a flow designer in which I am updating the time zone with location.timezone if the location is not empty and trigger condition is Record created or updated. 

The flow is currently triggered on Record Created OR Updated, which causes it to run even when the Location field is empty.

As a result, unnecessary entries are being inserted into the sys_flow_context table.

divyadhanda_0-1764828804018.png

Also, I could see the flow logs twice for the same user record in PROD instance and I couldn't replicate this issue in non-PROD.

divyadhanda_1-1764829113130.png

When I verified the logs, I found in both logs the if condition also executed and update happens twice. How can be the update happen twice in the same timestamp for a particular user.

What could be the reason for this?

1 ACCEPTED SOLUTION

@divyadhanda 

capture this in DEV in update set and test it thoroughly there

Then migrate to TEST and verify it there

Then only migrate to PROD
💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@divyadhanda

did the flow run 2 times because of multiple updates on same record?

any business rule or script include is updating the record 2 times?

you are not able to replicate in lower instance may be because PROD will have lot of integrations which might be updating the record and leading to flow triggering multiple times

See by adding the Trigger -> For Each Unique Change

AnkurBawiskar_0-1764830819528.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏
 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

I have already added the trigger as Trigger -> For Each Unique Change.

This is newly added flow creates a log, even if the location is empty like below

divyadhanda_0-1764841345768.pngdivyadhanda_1-1764841374511.png

Is this the expected behaviour?

@divyadhanda 

sorry didn't get your point.

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

I have modified the trigger condition as below in the flow to avoid the logs created in the flow_context table.

divyadhanda_1-1764844285179.png

Even then it creates the log but it doesn't execute(update) the condition since the location is empty.

divyadhanda_2-1764844340297.png

 

sys_flow_context :

divyadhanda_0-1764844221193.png

Is this the expected behaviour?