Flow Variable Issue

dougconnell
Kilo Guru

Flow Variable Issue

I am Having Issues with Input Variables in Flow Actions in San Diego.

  1. Anyone seen the same thing? 
  2. I have opened Case CS6252272
  3. An Update Set illustrating the Problem is attached.

Problem Summary

A stray character with CharCode 65279 is being appended to all Variable Values of type Text which prevents the value being used in SN Queries and other use cases.  I don't know if this stray character is being appended to other variable types such as Reference values.  Possibly.  I am seeing some slightly erratic behavior.

Diagnostic Flow Action

To illustrate the Problem, I created a Flow Action with a Javascript Step. The Upddate Set is attached.

The Flow Action has one input parameter called "My Text Variable" (my_text_variable) which is then used as input to my Step which contains this JavaScript Step.

Javascript

(function execute(inputs, outputs) {
  var messageText = "";
  var myTextVariable1 = inputs.my_text_variable;
  messageText += "\n myTextVariable1 = [" + myTextVariable1 + "]";
  messageText += "\n myTextVariable1.length = [" + myTextVariable1.length + "]";
  // There is a bug. Remove stray char at end of string.
  var x = String.fromCharCode(65279);
  var myTextVariable2 = myTextVariable1.replace(x,"");
  messageText += "\n myTextVariable2 = [" + myTextVariable2 + "]";
  messageText += "\n myTextVariable2.length = [" + myTextVariable2.length + "]";
  outputs.message_text = messageText;
})(inputs, outputs);

Output

I then Click on Test for the flow and enter "Hello" as the value for "My Text Variable" (my_text_variable).
This was my output.

 myTextVariable1 = [Hello]
 myTextVariable1.length = [6]
 myTextVariable2 = [Hello]
 myTextVariable2.length = [5]

 

 

1 ACCEPTED SOLUTION

Lisa Holenstein
ServiceNow Employee
ServiceNow Employee

This is a known issue with Chrome 105, our engineers are working on solving it asap. In the meantime, if you work/save/publish the same flow in a non-Chromium browser (Firefox for example) that should work.
If you have a login to our support portal, check out this KB1182247 for details on the workaround.

 

Please mark as solved if this answered your question.



Have questions about the Now Platform? Join our bi-weekly Platform Academy.

View solution in original post

7 REPLIES 7

Update: this has been solved with Tokyo Patch 2, see the section Notable Fixes for PRB1606387.



Have questions about the Now Platform? Join our bi-weekly Platform Academy.

Community Alums
Not applicable

Hi Lisa,

 

Rather annoyingly, the ServiceNow instance provided as part of the IntegrationHub Fundamentals course is Tokyo patch 1.

This /ufeff character breaks the Pagination Variables Script when building the the World Glaciers - LatLong Action, using Chrome 119 (latest build). It works in Firefox, but took me a moment to find the cause.

I'm reporting it to the NowLearning team.

SyaharruddinCSC
Tera Expert

I have the same problem too. However, mine was being appended at the front of the variable. Working using non-Chromium web browser doesn't help at all. My workaround was to remove it using .replace.

 

Funny enough, I found the problem while working multi-approvals using an article that Lisa Holenstein created.