Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Empty variable editor when changing language

Sondre
Tera Contributor

Hi folks, 

 

We have the default variable editor for record producers in the form layout on a custom task. The issue we are facing is that the variable editor will not show MRVS values when we switch from english to norwegian. It shows an empty list, with a message og "no data to display" (just in norwegian though). We are on Zurich release.

Made a few tests to verify the problem. 

 - Its working in a PDI. (on zurich with Norwegian installed)

 - Its not working on other tables aswell (i.e. incident table).


So, I guess this points to something in our instance missing, or broken.

For this post, I have used incident as example.

Incident configuration of the formatter: 

Sondre_0-1765265457054.png

 

Incident form in english: 

Sondre_1-1765265511719.png

 

Incident form in Norwegian (same record): 

Sondre_2-1765265562266.png

 

How are the variables fetched into the formatter?

Sondre_4-1765266125762.png

 

Verification messages: 

Sondre_3-1765266026069.png

 

Any advice on what can be causing this issue or where to look is greatly appriciated <3.

/Sondre


9 REPLIES 9

Sondre
Tera Contributor

Created a on load client script to log the values of the MRVS from target record (the incident). 

It has one line: 

alert(g_form.getValue('test_mvrs_for_insert'));


When in english, it alerts with the values, when in Norwegian it alerts an empty array.
So why does not g_form fetch the values when in norwegian.

In a business rule running AFTER INSERT, the variables are empty in norwegian, but populated in english. 

gs.info('incident test: ' + current.variables.test_mvrs_for_insert);


@Ankur Bawiskar 

@Sondre 

see if the value is stored in backend table (sc_multi_row_question_answer)

if yes then it should render fine in other language as well

Let ServiceNow investigate, seems to me some instance issue

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

The values in "sc_multi_row_question_answer" looks good.

@Sondre 

then somehow that macro isn't bringing the data

did you try disabling catalog client script or catalog UI policy applying on RITM and see?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

Since the issue can be reproduced on the incident table, I cant see how any catalog client scripts would cause the issue. The test variable set and record producer I am using to reproduce is very simple. 

Tried to look for business rules, client scripts or such that have some global impact, but havent found any yet. Tried "repair" on the whole Norwegian plugin. 

Still not getting why the onload client script using g_form.getValue('var_set_name') is giving an empty array. The variable is there, but its content is not getable, even when the values are present in the multirow backend table, as we discussed. 

From a background script, when setting my language to norwegian, i get the values using current.variables.var_set_name

For Norwegian language:
 - Values are present before the submit (in the form)

 - Values are missing after insert - logging from business rule

 - Values are present afterwards from a background script

 - Values are missing after submit using g_form in onload client script