- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2020 02:19 PM
Hello everyone,
I am new to ServiceNow and am going through the tutorials for my job. I have a background in software development and know my way around Javascript.
After getting through the Flow designer module in the New to ServiceNow Learning plan, I was a little annoyed. It seemed to me that everything I did in there could have been accomplished quicker if I just wrote my own if/else if statements, instead of dragging and dropping, clicking, and scrolling my way through the form designer. I understand and applaud the ability to create business logic without the need to write code, but my question is: Is there a way to directly write code in the flow designer, instead of using the drag and drop options? When we do use the drag and drop methods to create the logic, is this writing code somewhere that I can view/modify myself? I feel like these features could be very valuable for developers to write their own code, or for people that don't know code that well to understand what the flow designer is doing at a coding level.
Again, I am a beginner at ServiceNow and could be missing something obvious, or maybe what I am asking is available somewhere else.
Thanks in advance.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2020 06:34 PM
Brent,
Unfortunately, ServiceNow has gone to great lengths to prevent exactly what you'd like to do. They want you to use the interface they have provided for you to build the logic and activities. It is, in fact, kind of the whole point to Flow Designer. It is intended to provide the ability for low to no code workflows and actions. I've checked out all of the tables that have "flow" in them and I wasn't able to identify a place where I could input code, outside of the GUI. Seems like they've hidden it well.
That being said, even ServiceNow will acknowledge that Flow Designer is not the solution for every situation.
If you are interested in the same capabilities, but with less (but not, zero) "drag and drop hand-holding" I'd encourage you to look into using Workflow. While workflows do still have the concept of drag and drop actions, they almost always have an "advanced" option where you can write your own code, rather than build using the UI.
By the same token, I'd also encourage you to look into Business Rules, which are very much "write your own code". Much like a flow, you write a condition (trigger) on a table and then execute a script when it is true.
All in all, these two items (Workflow and Business Rules) represent the functionality and flexibility that Flow Designer brings, but with with using much more code intensive methods. There is quite a lot to learn within these two topics and understanding them will certainly help you to understand the platform and how it all works.
For myself, I spent years learning how to do it all using these methods, so I do find Flow Designer somewhat cumbersome and limiting, but at the same time I can appreciate how easy it is to use data pills to reference and update information on the fly, rather than writing out 20 lines of code 🙂
If this was helpful or correct, please be kind and remember to click appropriately! Michael Jones - Proud member of the CloudPires team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2020 06:34 PM
Brent,
Unfortunately, ServiceNow has gone to great lengths to prevent exactly what you'd like to do. They want you to use the interface they have provided for you to build the logic and activities. It is, in fact, kind of the whole point to Flow Designer. It is intended to provide the ability for low to no code workflows and actions. I've checked out all of the tables that have "flow" in them and I wasn't able to identify a place where I could input code, outside of the GUI. Seems like they've hidden it well.
That being said, even ServiceNow will acknowledge that Flow Designer is not the solution for every situation.
If you are interested in the same capabilities, but with less (but not, zero) "drag and drop hand-holding" I'd encourage you to look into using Workflow. While workflows do still have the concept of drag and drop actions, they almost always have an "advanced" option where you can write your own code, rather than build using the UI.
By the same token, I'd also encourage you to look into Business Rules, which are very much "write your own code". Much like a flow, you write a condition (trigger) on a table and then execute a script when it is true.
All in all, these two items (Workflow and Business Rules) represent the functionality and flexibility that Flow Designer brings, but with with using much more code intensive methods. There is quite a lot to learn within these two topics and understanding them will certainly help you to understand the platform and how it all works.
For myself, I spent years learning how to do it all using these methods, so I do find Flow Designer somewhat cumbersome and limiting, but at the same time I can appreciate how easy it is to use data pills to reference and update information on the fly, rather than writing out 20 lines of code 🙂
If this was helpful or correct, please be kind and remember to click appropriately! Michael Jones - Proud member of the CloudPires team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2020 09:05 AM
Brent,
I agree with Michael in that for writing more code of your own, Workflow is what you want. I want to add though that some of the advantages of the drag and drop is that now, ServiceNow is responsible for any issues that arise. If you take the time to build it with there system, and something doesn't work, they have to fix it.
By allowing scripts, they allow you to do lots of things that they didn't already build into the platform, but if it breaks for you, they can only help so much before ultimately you have to fix it. Also, something might change on the backend, and now you have to update all of your custom code.
It's something to consider when you feel the monotony of dragging and dropping.