Can't use gs.getProperty to set default on a reference field

Tony Flower
Tera Contributor

We have a field of type reference on the table of a scoped app.  We'd like to set a default value for new records and use a system property in order to avoid hard coding the default value as the default is effectively pointing to a data record.

 

When we attempt to use getProperty on the default attribute in the dictionary, it gives the following error:

 

Screenshot 2023-04-13 at 13.32.33.png

 

Some ServiceNow scoped applications use gs.getProperty to populate default values so it's not clear why it's not working here.  Any ideas?

1 ACCEPTED SOLUTION

Try to check use Dynamic Default

-Anurag

View solution in original post

8 REPLIES 8

Try to check use Dynamic Default

-Anurag

Brilliant - a dynamic filter works - thank you. 🙂

 

Screenshot 2023-04-13 at 15.30.25.png

 

Ha, I'm so glad I could help. Cheers !!

-Anurag

Upsilon
Giga Guru

Hi, 

If you want to add a Dynamic Default value you have to create a dynamic filter option like in the following

Upsilon_0-1681392432012.png

Regards,