The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Andrew Albury-D
Kilo Guru

Hey Everyone,

I thought I would share a neat little trick for Flow Designer which I used in a recent integration I completed. 

I wanted to add a Comment, OR a Worknote, based on a condition in my subflow inputs. Normally, you could do an IF an include 2 "Update Record" actions, but this didn't work for me, as the condition wasn't something I could easily check in an IF.

What I found was this:

1. Add a single "Update Record" action to a flow

2. Choose to add both a Worknote and a Comment

3. Use the "Scripted" option

find_real_file.png

4. Inside your condition, write a condition with one ONE return, if it's true

find_real_file.png

find_real_file.png

Run your flow and check the outcome:

find_real_file.pngfind_real_file.png

 

As you can see, Only the "true" outcome is fired. 

This is a great shortcut to avoiding multiple "If / Else" statements for different field updates, and even lets you do conditions on stuff that you might not be able to otherwise.

 

Hope this has been helpful! ❤️ from your Fladvocate Leader!

- Upside-down Andrew

Comments
Hersh D
Mega Expert

Thanks for writing this up Andrew!

I've recently been getting unexpected results on Orlando when using inline scripts in Flow Designer. (e.g. "fd-scripted" gets returned by the script). 

It's apparently fixed in the latest Orlando patch. Posting the HI article here in case others face the same issue.

https://hi.service-now.com/kb_view.do?sysparm_article=KB0825512

Kamil Terl
Tera Contributor

Oh this is amazing!!!! I needed to add a work note on a custom table/form and Update record was not working with data pills, the scripted option as you suggest works as I need 🙂 as I need it always, I removed the condition and used just the var and return.

Thank you ❤️ as the Add the Work note with the link to context was adding a link to the Flow, so your suggestion was much better. Thanks

Version history
Last update:
‎08-20-2020 10:46 PM
Updated by: