Function Field Checkbox Missing

Carter1
Giga Guru

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.

1 ACCEPTED SOLUTION

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();

View solution in original post

22 REPLIES 22

Hi Jaspal,

I just tried the above in background script and it created a new field in my table the now shows function definition.

What is the uprec.element defining? Is this supposed to be the column display name?

Yes, its the dictionary name for the field that is created named 'ABC' in the script above.

I see. Thank you very much for the help! This workaround is great.

Great to know it helped.

I would also suggest you to create a HI Ticket give it a check why the Function Field does not show up & then update us with the same.

So I may have spoken too soon.. When the background script runs, I see a  field being created as a function field, but the column label does not save. When I try to manually add in the column label, the entry will save but will still not show the column label. 

When I go to the dictionary entries for that field, the display name shows up in the list but when I click the individual entry it shows nothing in the field. 

I think it is the same issue on this thread: https://community.servicenow.com/community?id=community_question&sys_id=d91f03e1dbdcdbc01dcaf3231f96...