Variable editor on custom table is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 12:03 AM
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:
and put it on custom table:
And now it is just showing this only , not all variables. Any suggestion please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 12:49 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 12:55 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 01:17 AM
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
Determining whether the Variable Editor is added to a form
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 01:19 AM
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:
- Navigate to System Definition > Tables.
- Select the table to which you want to add the variable editor.
- 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
- Navigate to the target record.
- 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