Default value for reference field not showing up
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2019 01:05 PM
We have a custom table with a reference field to sys_user and we want the default value to be the current user. Under the Default Value tab, we put in javascript:gs.getUserID(). When we go back to the form, we can see that a value is in there as indicated by the "i" button next to the field, but the field is empty:
How do we get the current user to populate in the actual field?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2019 01:11 PM
Hi yundlu316,
Issue could be with the display field set up of sys_user table. Please follow the below steps,
- go to list view of sys_user table
- right click from header and choose Configure > table
- check which field has display column set to true
- if you see no fields, set display column as true for name field
- save it.
- refresh the form and check now.
Thanks,
Vivek Anand
Please Note: If my response helps you to fix this issue, please mark it as correct!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2019 01:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2019 03:45 PM
Hello yundlu316,
In the default value tab, check the dynamic default box and create a new dynamic default value, give a label and in the script field please enter this value gs.getUserID(); .
Also make sure to check the display value on sys_user table.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2019 12:08 AM
In the default value tab, check the dynamic default box and create a new dynamic default value, give a label and in the script field please enter this value gs.getUserID(); .
If my answer helped you in any way, please then mark it as helpful/Correct