How to define two default values in one field

Shir Sharvit
Tera Contributor

Hi

 

 

How do I populate 2 users in a glide_list type field - this field is a reference to the user table (sys_user).
 
ShirSharvit_0-1702388735355.png

 

 

Thank; Shir

 
2 REPLIES 2

Brad Bowman
Kilo Patron
Kilo Patron

In the Dictionary Entry for the field, list the two user record sys_ids separated by a comma

BradBowman_0-1702389072885.png

 

Stefan Georgiev
Tera Guru

Hello @Shir Sharvit ,

you can do that as @Brad Bowman  mentioned with static sys_ids or you can use javascript to get your values you just need to return a comma-separated string with ids from the sys_user table you can do that with a Script Include or with a system property that contains your comma-separated sys_ids>


you can use way like :
javascript&colon; gs.getUserID() +',<sys_id from user table>'
javascript&colon; new yourScriptInclude().yourFunctionToGetUsers()
javascript&colon; gs.getProperty('<name of the property that contains the users>')

StefanGeorgiev_0-1702390769971.png

All you need to return is a comma-separated string to the Default value field.


Hope that this helps you!

If the provided information answers your question, please consider marking it as Helpful and Accepting the Solution so other community users can find it faster.

All the Best,
Stefan