- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2020 07:24 AM
Hi all,
I am trying to create a new dictionary entry in a table and have it be a function field. When I go to create new entry, I do not see the checkbox to select "Function Field".
I am able to do so in my personal instance just fine but cannot find a way to create a function in the instance I am having trouble with.
Any help would be appreciated.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2020 09:18 AM
Is your custom table in any specific scope? Can you try changing the scope of instance to the scope that table is in & then check.
If not, you can use a background script so as to get it checked to True.
Something as below. Try it in DEV first.
var uprec=new GlideRecord('sys_dictionary');
uprec.initialize();
uprec.name='incident'; //replace your table name change_request, etc.
uprec.internal_type='boolean'; //truefalse or string
uprec.column_label='ABC';
uprec.element='xyz';
uprec.function_field=true;
uprec.insert();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2020 08:48 AM
Thanks Carter.
But unfortunately first one runs onChange(), while the second one just sets the field readonly (does not hide). So, these are not the ones that are the cause.
Also, can you check on some other table for the same.
Is your table a custom table?
If so, you may check thread which has known issue from ServiceNow for details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2020 08:54 AM
Hi Jaspal, yes it is a custom table - but I checked if I could create a function field on a delivered table and the checkbox was still not appearing. I checked the thread and it suggests creating the new field directly on the list view. If I do this, do you know of anyway to make it a function field in the list view? Thanks for all your help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2020 09:00 AM
What they meant was to try & add it to the list view. Can you do the same. Try bringing the field on the List Layout.
Also, check by applying below filter if there exists any field with Function field as True.
If there exists you can do an insert & stay get the entry created with Function Field: True.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2020 09:07 AM
I see. I added function field to the list view but it still does not show up when trying to create a new record. There was an existing record with function field = true, but it is in a different table. When I insert & stay on that record, it does not give me the option to change the table to my desired table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2020 09:18 AM
Is your custom table in any specific scope? Can you try changing the scope of instance to the scope that table is in & then check.
If not, you can use a background script so as to get it checked to True.
Something as below. Try it in DEV first.
var uprec=new GlideRecord('sys_dictionary');
uprec.initialize();
uprec.name='incident'; //replace your table name change_request, etc.
uprec.internal_type='boolean'; //truefalse or string
uprec.column_label='ABC';
uprec.element='xyz';
uprec.function_field=true;
uprec.insert();