Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2024 02:13 AM
How do I set the a reference field value in a ui page?
I currently have this:
HTML:
<g:ui_reference name="assigned_to" id="assigned_to" table="sys_user" query="active=true" completer="AJAXReferenceCompleter" ng-model="user" mandatory="true"/>
Client script:
function setRef(field,value){
gel('sys_display.'+field).value = value;
}
Does anyone know how to set the other attribute values like lookup and the actual value?
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2024 03:11 AM - edited 06-21-2024 03:11 AM
I don't think there is any official documentation for it. This is what is known to me:
- id – unique id for the input field
- name – unique name for the input field (should be the same as id in most cases)
- value – (optional) sys_id of the record selected by default
- displayvalue – (optional) display value of the record selected by default
- table – name of the table to query from
- query – encoded query string to pre-filter the list (i.e. a reference qualifier)
- completer – AJAXReferenceCompleter (default) or AJAXTableCompleter
- columns – a semicolon-separated list of fields to display in the dropdown (only works with AJAXTableCompleter)
- onChange – client-side code to execute when the value changes
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2024 12:19 PM
how to set value in assigned to from different reference field from the same table in UI page?