Setting "stage" on RITM table for multiple languages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2024 05:13 PM
Hi all, I was wondering if it is possible to set the "stage" field in multiple languages?
Currently, we are using Flow Designer, and changing stages using UI Actions. I am aware that multiple languages for the stage field is not supported through flow designer but is this the same case when setting the stage through UI Action?
Kind Regards,
Janet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2024 06:29 PM
@jnt-cntYou can accomplish this by creating language-specific choices and then setting up a UI action to update the stage. For example, you can follow these steps:
…………………………………………........................................................................................
Please Mark it helpful 👍and Accept Solution ✅!! If this helps you to understand.
…………………………………………........................................................................................
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2024 12:52 AM
Hi
Setting the "stage" field in multiple languages is not natively supported by Flow Designer or UI Actions in ServiceNow. The stage field, which is typically used to indicate the progress of a process, doesn't have built-in multilingual support since it relies on predefined choice values or labels that are generally static and single-language.
However, you can achieve a similar effect by following these steps:
1. Custom Field for Multilingual Support:
- Create a new custom field that stores the stage information in multiple languages.
- This field can be populated based on the user’s language preference or locale.
2. Dynamic UI Actions:
- In your UI Actions, you can write a script to dynamically set the value of the stage field based on the user's language.
- This script can use
gs.getMessage()
to retrieve the localized version of the stage label.
Example of Setting Stage with UI Action:
var userLanguage = gs.getSession().getLanguage();
var stage = '';
if (userLanguage == 'fr') {
stage = 'Étape 1'; // French
} else if (userLanguage == 'es') {
stage = 'Etapa 1'; // Spanish
} else {
stage = 'Stage 1'; // Default English
}
current.stage = stage;
current.update();
3. Translation of Choices:
- If you are using choice fields for the stage, you can manage translations by adding choice values in multiple languages using the
sys_choice
table. - You would need to create separate choice entries for each language, ensuring that the
Value
is the same but theLabel
is different according to the language.
4. Scripting with Flow Designer and UI Actions:
- Since Flow Designer doesn’t support multiple languages directly for stages, handling this logic through a script in UI Actions or using a Script Include that Flow Designer can call might be necessary.
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
YouTube: https://www.youtube.com/@learnservicenowwithravi
LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/