The CreatorCon Call for Content is officially open! Get started here.

How to create Report in UI Page

Rameshnathan
Tera Expert

Hi,

I have requirement that i want to crate UI Page for report.. here i have crated field with using HTML tag but i dont how how to get the value from the field and i want display the output as report in the same page..

Please help me how to achieve this..

find_real_file.png

This is the HTML i have used

<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">

<html>

<center>

<body> Incident Report

<table style="width:50%">

<tr>

<td>Company</td>

<td><g:ui_reference name="company" id="company" table="core_company" completer="AJAXTableCompleter" query="active=true"/>

</td>

</tr>

<tr>

<td>Priority</td>

<td><select id="priority">

  <option value="1">1 - Critical</option>

  <option value="2">2 - High</option>

  <option value="3">3 - Moderate</option>

  <option value="4">4 - Low</option>

</select></td>

</tr>

<tr>

<td>Start Date</td>

<td>

<g:ui_date_time class="form-control" name="start_date" id="start_date" value =""/>

</td>

</tr>

<tr>

<td>End Date</td>

<td>

<g:ui_date_time class="form-control" name="end_date" id="end_date"   value =""/>

</td>

</tr>

</table>

  <input type="submit" value="Fetch" onclick="fetchRecord()"></input>

          <h3 id="heading1" class = "text-center">Finall Report</h3>

<div id ="Test"/>

</body>

</center>

  </html>

</j:jelly>

1 ACCEPTED SOLUTION

SanjivMeher
Kilo Patron
Kilo Patron

You can define the script using html or client script.



And use the field ids to get the values


document.getElementById('company').value;



Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

4 REPLIES 4

SanjivMeher
Kilo Patron
Kilo Patron

You can define the script using html or client script.



And use the field ids to get the values


document.getElementById('company').value;



Please mark this response as correct or helpful if it assisted you with your question.

Hi Sanjiv,



Hi I have return some value from script include to ui page as json format...Please tell me how to convert the json date as a HTML table...



JSON Output :



[{"number":"INC0010569","com":"ACME Africa","group":"Approval","priority":"1 - Critical"},{"number":"INC0010568","com":"ACME Africa","group":"Approval","priority":"1 - Critical"},{"number":"INC0010564","com":"ACME Africa","group":"Approval","priority":"1 - Critical"},{"number":"INC0010570","com":"ACME Africa","group":"Approval","priority":"1 - Critical"}]



Thanks


Ramesh


Check this



javascript - Convert json data to a html table - Stack Overflow



Please mark this response as correct or helpful if it assisted you with your question.

Hi Ramesh,



Can you marked it answer, so that it will be useful for others while searching



Please mark this response as correct or helpful if it assisted you with your question.