How to assign a default value for a reference field

mark141230
Tera Expert

Hi Everyone,

I have a requirement, I need to assign a default display value to my Project Time Category  which is a reference field in a Time Card Table.

In the Project Time Category Table i have the following entries:

 - Standard

 - Non-OT Billable

- OT Billable

- Offset

What I want is, once the user open the form, it will automatically display the "Standard" in the Project Time Category field in the Time Card Forms.

Thanks in advance.

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Add the sys_id of the "Standard" choice from 'project_time_category' table as the Default value of the field 'project_time_category' in the Time Card table

 

Example for 'Development' choice from my PDI:

 

find_real_file.png

 

When user creates a new Time Card-

 

find_real_file.png

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Mark,

Is this always required or specific to some scenario?

If always then use default value at dictionary level.

if based on scenario then either use onload client script or before insert business rule to set the value

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Hi Ankur,

 

Thanks for showing interest in my requirement. This is just a simple requirement and shruthiub suggestion works