Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Kalisha_m
Giga Guru
Giga Guru

4.png

 

Welcome to our Community Week MVP Insights series! Join ServiceNow MVP Kalisha Moore as she dives into 4 low to no-code tricks that every new ServiceNow Developer should know about!

 


 

Small Tweaks, Big Impact: 4 Low to No-Code Tricks Every New ServiceNow Developer Should Know

 


1. UI Policies for Efficient form behavior


This client side enhancing capability offers no to low code opportunities for form configuration. Let’s say you want a field to appear, be hidden, become read only, clear out or even become mandatory on a form but only when a specific condition is met, UI Policies are things that help keep doing that stuff simple. Using UI policy actions which appear in the related list after saving the ui policy allow for a no-code approach.


Example use case: If Requesting for Self is true, automatically populate the Requested For field with the logged-in user.


In the When to Apply section I would use the field, operator and value to specify my condition being [Requesting for Self] is true. Then I would add a script (in the advanced view) to fill in the necessary field with the user in another field. Keep in mind there will be 2 script boxes, execute if true and execute if false. They are both referring to the condition.

 

Execute if true:

 

function onCondition() { // if the condition is met

    var user = g_form.getValue('field_name'); // Get the user

    g_form.setValue('field_name2', user); // Set the value of the intended field to the user from field in line 2

    g_form.setReadOnly('field_name2', true); // Lock the field down so it is not editable

}

 

Execute if false:

 

function onCondition() { // if the condition is not met

   g_form.setReadOnly('field_name2', false); // make the field editable

   g_form.clearValue('field_name2'); // clear out anything in the field

}

 

 

2. Autopopulating Values and Default Values


In the first year of working as a SN developer i had alot of form configuration stories, I think every single one was assigned to me haha but i learned that autopopulating values and defaulting values in fields wasn't that hard after all.


Default Value: Low-code option set directly on the dictionary entry or catalog variable. It’s static, always the same until changed.


// Default logged-in user
On the variable or field dictionary, default value = javascript:gs.getUserID();


Autopopulate: No-code option to fill fields dynamically based on a reference field's value, without scripting.


Within a catalog variable leverage go to the autopopulate section where you will see the dependent field, this is the reference field you need to pull data from, reference table will autopopulate once a dependent field is selected then you can dotwalk to the data you need.

 

 

3. Flow Designer for Easy Assignment & Approvals


When records move to specific states, Flow Designer can take action without code.


Example scenario: When a record enters Ready for Review, assign it to a specific group’s manager for approval.


Trigger: record updated, State changes to "Ready for Review"

Lookup record: Query groups table for the name and/or sys id of the specific group

Approval: Send approval request to Manager (using data pill from previous action: lookup record)

If approved → Continue with necessary actions


With flow designer you have to know what options you have available by browsing through the actions and if you have conditions look into flow logic oh and always annotate so your flow is readable to those who come behind you.

 

 

4. Variable Attributes Help Level Up Your Reference Fields


You can show multiple columns inside a reference field dropdown to help users choose accurately.


Example: Display the fields 'User Name – Department – Location' instead of just 'User Name.'


In the variable attributes field add this:


ref_auto_completer=AJAXTableCompleter,ref_ac_columns_search=true,ref_ac_columns=field_name1; field_name2; field_name3


ref_auto_completer=AJAXTableCompleter


Enables the reference field to use AJAX to fetch matching results dynamically as the user types.


ref_ac_columns_search=true


This attribute tells the reference field to search across multiple columns, not just the display column.


ref_ac_columns=vehicle_make; vehicle_model; vehicle_year


Defines which columns to search when a user types into the reference field.

 

 

To Wrap Up


No/Low-code isn’t about shortcuts, it's about reducing technical debt and using the ServiceNow AI Platform as it's been built for us to bring value and work faster.

 


 

Questions for Kalisha? Leave them in the comments! Mark this post as helpful if you found it as such!

 

Connect with Kalisha here!