- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2024 12:23 AM
Hello guys!
There is a form "x_vgll_beh_task" containing with Single Line Text fields which is not enough in the back-end when there are too many characters, as the Single Line Text box is too small.
There is a Variable Set "BEH Variables" in ServiceNow where all these fields/boxes are found as Single Line Text variables. The variable set BEH Variables has Internal Name "beh_variables".
Note that there are 537 single-line variables in "BEH Variables" but also that I don't have an overall variable name/field name, as there are 537 fields/variables. However, all variables have the following prefix: "BEH_".
I want these variables to be converted to Multi Line Text variables when the number of characters entered in the fields via form "x_vgll_beh_task" exceeds 70 characters. This must take place when the user has submitted the form. Then in the back-end it should expand the boxes to multi-line, if it exceeds 70 characters in a single line field.
I want to try to solve this with a so-called Fix Script.
Keep in mind that the Label for the Single Line Text variables of type String is called "Single Line Text" from table "Question [question]" and that the Multi Line Text variables of type String are called "Multi Line text" also from "Question [question]". Value for Label "Single Line Text" is "6" while Value for Label "Multi Line Text" is "2".
See the attatched picture, the yellow marker shows how the Single Line field is not enough.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2024 12:33 AM
Hi,
It is not good practice to change the variable definition dynamically based on character limit. variable definition is fixed and form behaviour changes as per the configuration. We cannot have two different behaviours for same variable like for one record type is 'Single Line' and another 'Multi Line'
It would be either single line or Multiline.
If you are expecting multiline text inputs on your record then we prefer to set variable type as Multi Line Text. It works for both type of inputs.
I would suggest to change type of all the variables to Multi Line text.
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2024 12:33 AM
Hi,
It is not good practice to change the variable definition dynamically based on character limit. variable definition is fixed and form behaviour changes as per the configuration. We cannot have two different behaviours for same variable like for one record type is 'Single Line' and another 'Multi Line'
It would be either single line or Multiline.
If you are expecting multiline text inputs on your record then we prefer to set variable type as Multi Line Text. It works for both type of inputs.
I would suggest to change type of all the variables to Multi Line text.
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2024 07:02 AM
Thank you for this explanation.