UI page -add reference field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2016 12:48 AM
I am experimenting with the add comments dialog example from the wiki here Displaying a Custom Dialog - ServiceNow Wiki
I would like to add another field to that dialog page but cannot find the relevant information about the different types of fields that can be added in at ui page.
I want to add a reference field for the caller field in the incident form. What is the syntax for that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2016 01:16 AM
Please check below thread and also section 14 of the below link for syntax.
http://wiki.servicenow.com/index.php?title=Extensions_to_Jelly_Syntax#gsc.tab=0
Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.
Thanks,
Deepa
UI Pages, GlideDialogWindow, and Reference Fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2016 01:16 AM
Hi,
You can add any type of field in UI page. If you want a reference field, which allows you to select any record from a table, you can use ui_reference table.
<g:ui_reference id="mainrecord" table="u_childtable" completer="AJAXTableCompleter" "id" onchange="ValueChanged()" />
You can use general HTML controls as well in UI pages.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2016 01:21 AM
Thanks for the examples but I already looked at both but I need a more exact example as well as a description of what each element means.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2016 02:05 AM
Hi,
Suppose, if you are creating a UI page, in that UI page, you want a reference field, which is like "Caller" field in incident table, you can place the following code.
<g:ui_reference name="QUERY:active=true" id="assigned_to" table="sys_user" />
If you look at above line, we used 3 attributes.
1. Query -> If you want to filter any rows by default, you can use that. I am displaying only Active users here.
2. id -> Id attribute is same like HTML controls. to uniquely identify this control in script section, we use this.
3. table -> From which table, you need the data.
Thanks
Rami Reddy