Variable editor on custom table is not working

Rekha Tiwari
Kilo Guru

Hi All,

I have created a custom table and created a record producer on this table. I wanted to show all record producers variable on custom table as we have on ritm form.

So I followed this solution:

https://docs.servicenow.com/bundle/paris-servicenow-platform/page/product/service-catalog-management/task/configure-default-variable-editor.html

Created as:

find_real_file.png

 

and put it on custom table:

find_real_file.png

 

And now it is just showing this only , not all variables. Any suggestion please?

find_real_file.png

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I assume your table extends task and variables are showing on variable editor

Possible reason why few variables must be shown

1) do you have any catalog client script or Catalog UI policy which hides variables and it is running on Target record

2) uncheck the checkbox of Applies on Target record

Regards
Ankur

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

Hi,

 

Ahh I got it. On my custom table I did not extend it from HR case table. May be that is why it is showing like this.

 

Is there any way I can extend custom table after creating it?

Hi,

As per my understanding if the custom table doesn't extend task table then you need to contact ServiceNow support team to create variable editor

Did you follow the same?

Also it is not recommended to extend table after creating it

but here is a workaround

 Extends Table AFter Creation

Determining whether the Variable Editor is added to a form

find_real_file.png

Regards
Ankur

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

Yes tried with Extend table after creation:

var table = 'sn_hr_core_id'; //table you want to extend
var old_parent = '';
var new_parent = 'sn_hr_core_case'; //the table you want to extend to, like cmdb_ci or task
var changer = new GlideTableParentChange(table);
changer.change(old_parent, new_parent);

 BUt did not work

 

 

I am not able to follow below steps:

 

By default, only task extended tables are allowed for a variable editor. However, if you want to add a variable editor to a non-task extended form, contact Customer Support and ask them to perform the following procedure so that the variables in the form can be updated:

  1. Navigate to System Definition > Tables.
  2. Select the table to which you want to add the variable editor.
  3. Create a new column with the following values:
    • Type: Variables
    • Column label: Variables
    • Column name: variables (Customer may not be able to create a column name without "u_")
    • Active: true
  4. Navigate to the target record.
  5. Click Personalize Form Layout.

    Make sure Variables are removed from the form.

 

As I do not see Type as Variables to create a new field on custom table as suggested above