Adding the variable editor to custom tables that are NOT task based
Out of the box, only tables extended from task can make use of the variable editor. To extend this functionality to custom non-task based tables, you need to take the following steps.
Create a Variable Editor
Navigate to System UI > Formatters
Click Create New
Fill at the form as below and submit
Name: Variable Editor
Formatter: com_glideapp_questionset_default_question_editor
Table: Select your custom table
Active: true
Type: Formatter
Finally, navigate back to the form for your custom table, and add your new Variable Editor to it by personalizing the layout.
Ensure new Variable Editor is reportable and editable
Once created, the new editor is not really actionable. It’s view only. There is a simple fix, though, as described in KB0538897.*
Navigate to System Definition > Tables
Select your table
Create a new column on the table as follows:
Type: Variables
Column Label: variables
Column name: variables (this must be exact, you cannot have a u_ in the column name value)
Active: true
Navigate to the form view of your table, personalize it, and removed the new Variables field
* ServiceNow Support recommends that this be completed by them by putting in a Support Case. The Variables type is not a visible Field class for selection when creating a field. While you can make the field class visible, I would recommend you request this from ServiceNow Support.