Mark Roethof
Tera Patron
Tera Patron

Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

 

Hi there,

 

Like most ServiceNow releases, also the Washington DC release brings some small though very useful improvements on Service Catalog. One of the improvement this time around is "Set field message for questions in catalog items". Already several people jumped on this topic to write articles, created videos, etcetera. So I am a bit late to the party 😀. Still wanting to share this with you since it's a nice feature that can lower technical depth, lower complexity, etcetera. What no one is mentioning though: How to make this feature multi-language? Or several customers will face not seeing this functionality, how come? 

 

Let's have a closer look.

 

Set field messages for questions

Within Service Catalog, it's possible to add scripted field messages to variables that can be displayed (conditionally) on the questions when a fulfiller opens a catalog item. Basically there are three types of field messages:
- Info
- Warning
- Error

 

Scripted, since up to the Vancouver release these types of field messages could only be added using Catalog Client Script or the script fields in Catalog UI Policies.

 

g_form.showFieldMsg('variable_name', 'Test message', 'info');
g_form.showFieldMsg('variable_name', 'Test message', 'warning');
g_form.showFieldMsg('variable_name', 'Test message', 'error');

 

Ideally you would leverage the Message field within Catalog Client Scripts to make the field message multi-language in combination with a UI Message.

 

Washington DCs no-code set field messages for questions

With the Washington DC release, ServiceNow added a no-code solution for adding field messages to variables that can be displayed (conditionally) on the questions when a fulfilled opens a catalog item. To use the no-code solution, basically you would create a Catalog UI Policy and have it working on load or conditionally, and add a Catalog UI Policy Action. The Catalog UI Policy Action is where the no-code magic happens:

 

set message 01.png

 

You would simply select a value from the "Field message type" field (Info, Warning, Error), and type your message in the "Field message" field. That's about it 😁. For more extensive explanation, I would like to invite you to watch "Road to Washington : Part 1 Service Catalog" form fellow MVPs @Ashutosh Munot1  and @Dhruv Gupta1.

 

Field message (type) not visible

Since this functionality is new out-of-the-box with the Washington DC release, why is this not instantly visible at every customer? Customization! Like with many other new features visible on a Form Layout, if a customer in the past customized the Form Layout, then new out-of-the-box modifications won't automatically appear on the Form Layout. Instead while upgrading a Skipped Record will be created. Unfortunately handling Skipped Records is not something every customer does or understands. I also saw this literally at one of my current customers, with the Washington DC upgrade the Skipped Record was set to "Reviewed and Retained" with no (solid) explanation.

 

If the "Field message type" field has not been added to your Form Layout, do so yourself. Don't forget to also add the "Field message" field. Once added, "Field message" will be visible on the Form Layout conditionally based on new out-of-the-box UI Policy "Hide Field Message".

 

set message 02.png

 

Note: If both Field message fields were not added to your Form Layout, most likely you are also missing new out-of-the-box Washington DC fields "Value action" and "Value"

 

Multi-language

So what if you are working for a customer who is using multiple languages, how can we make the no-code set field message multi-language? Looking closely at the first image, you might notice the flag icon between the field label and field name that is added by SN Utils. This indicated that the field is translatable. On the second image, in the new Form Builder field type "Translated Text" is shown. Another indication that the Field message field is translatable. Taking a look at the dictionary info of field Field message, it also shows to be of type "translated_text".

 

set message 03.png

 

So utilizing the Translated Texts table would make the set field message multi-language. This is slightly different than you might be used to. When scripting field messages before, you would utilize UI Messages and not Translated Text. Good to know to save you a bit of a search.

---

 

That's it. Hope you like it. If any questions or remarks, let me know!

 

C

If this content helped you, I would appreciate it if you hit bookmark or mark it as helpful.

 

Interested in more Articles, Blogs, Videos, Podcasts, Share projects I shared/participated in?
- Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

 

Kind regards,


Mark Roethof

Independent ServiceNow Consultant
9x ServiceNow MVP

---

LinkedIn

Comments
s-biosNow
Tera Expert

Great feature 🙂

Matt Heger
Tera Expert

Awesome, and exactly what i needed and definitly being much more realistic and "work ready" and a lot of other posts just remasticate the docs

midjoule
Kilo Sage

Thanks @Mark Roethof for sharing. It's always very valuable.

However, this feature doesn't seem to work on UI16 forms. Is there something specific to activate ?

Version history
Last update:
‎07-23-2024 10:36 AM
Updated by:
Contributors