List view in UI page

malu
Tera Contributor

Is it possible to bring up the list view in UI page.

eg: we have a baseline module , after creating a new baseline we can see the list of entries for a specific condition as shown below is it possisble to bring up these list (CMDB Baseline Entries) into an UI page ?

find_real_file.png

1 ACCEPTED SOLUTION

Hi Malu,



You need change the code of iframe like below code getting Incident list based on Caller




<g:ui_reference name="requester_id" query="active=true" table="sys_user" id="requester_id" value="${gs.getUserID()}" displayvalue="${gs.getUser().getName()}"/>
<button class="button" style="margin-left:5px" id="getList" onclick="getIncList();">Get User Incidents</button>


<div id="targetList">      
<iframe src="incident_list.do?sysparm_query=caller_id=javascript:gs.getUserID()" style="min-height:400px;width:100%;" scrolling="no" frameborder="0"></iframe>
</div>

<script>
        function getIncList(){
                  var caller = document.getElementById('requester_id').value ;
                  var newIframe = '<iframe src="incident_list.do?sysparm_query=caller_id='+caller+'" style="min-height:400px;width:100%;" scrolling="no" frameborder="0"></iframe>' ;
                  document.getElementById('targetList').innerHTML =newIframe ;
        }
</script>


View solution in original post

22 REPLIES 22

Gurpreet07
Mega Sage

Hi Ravi,



You may find following thread helpful


Has anyone added a related list to a UI Page?


malu
Tera Contributor

Hi Gurpeet, Thanks for checking my thread.


I couldn't get from the thread what i need may be i could be wrong. Is there any way to bring related entries in UI page.


malu
Tera Contributor

I have a UI page created to select the Baseline Name ( eg: Baseline 5 above) reference field. Once selected the related entries ( CMDB basline entries) should be shown below in the UI page.


Hi Malu,



Add a div in ui page and then an iFrame inside that div. Now in src attribute provide the link of the list to the list. You could dynamically replace the code of div to change the src of the iFrame.


You just need to change the code of the iframe with new src url based on the category selected.