no curly braces {} in Script fields on macOs

MichaelZischeck
Kilo Sage

When I develop script on a Mac, I can't enter curly braces in the script field. It works in the comment field, but requires a stupid copy&paste

 

Am I the only one having this issue? Is there a workaround?

4 REPLIES 4

Riya Verma
Kilo Sage
Kilo Sage

Hi @MichaelZischeck ,

 

Hope you are doing great.

 

One possible solution is to utilize the ASCII codes for the curly braces instead of directly typing them. This approach allows you to bypass the limitation and enter the necessary curly braces into the script field.

 

  1.  For an opening curly brace '{', type '\u007B', and for a closing curly brace '}', type '\u007D'.

  2. Alternatively, you can also use the keyboard shortcut 'Option + Shift + ([' for '{' and 'Option + Shift + )]' for '}' on a Mac to enter the curly braces.

 

Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma

I tried... the ascii code proposal, actually, isn't ascii... but I get what you mean...tried... not working in the script field.. I guess the "encoding" there is totally different...

 

as I said: i can type curly braces in the comment field, just not in the script field..

 

the other option just gives me [] but no {} 

 

I do get this ÒÔ where it's supposed to give me curly braces on mac

I just figured: with US keyboard setting it works... this means ServiceNow has a bug implementing the Swiss keyboard, which is working nicely everywhere, except the script field in ServiceNow

 

 

it's actually connected with "syntax highlighting".. if I disable this, remove all colors from the code, then Option 8 (on Swiss keyboard) works as expected....

 

for me: a bug in the syntax highlighting feature... as with US keyboard it seems to work just about fine enough