- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 12:02 AM
Hi,
I have created a table with some fields. I need to map those fields into an UI page. For example consider a table has Column headers XXX YYY ZZZ and has some value for the respective column, now I need to map those fields in a UI page. The UI page also has a table with similar Header names XXX YYY ZZZ, Please help me out how to map those field value from the table to the UI page.
Thanks,
Rajkumar.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 02:12 AM
Here you go. I am modified your code (marked in bold) to get the data from the table.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<div class="col-md-12" style="padding:0px;">
<table st-table="rowCollection" class="table table-striped table-intel" style="margin:0px; width:100%; border-left:1px solid #0071C5; border-right:1px solid #0071C5; border-bottom:1px solid #ccc; border-top:none;">
<th colspan="4">
<div class="table-nav" st-pagination="" st-items-by-page="itemsByPage" st-displayed-pages="3"></div>
</th>
<thead>
<tr style="cursor:pointer;">
<th><a ng-click="checkAll();" class="btn btn-sm btn-secondary">Check All</a></th>
<th st-sort="" ><i></i>XXX</th>
<th st-sort=""><i></i>YYY</th>
<th st-sort=""><i></i>ZZZ</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in rowCollection">
<g:evaluate var="jvar_not" object="true">
var not = new GlideRecord('u_font_style'); <!-- provide your table name here -->
not.query();
not;
</g:evaluate>
<j:while test="${jvar_not.next()}">
<tr>
<td>
<input type="checkbox" ng-click="checkChecked()" id="check_{{$index}}" class="row-item mlaf-checkbox" name="serial_number" value="{{ row.serial_number }}"/>
<label style="height:16px;line-height:16px;" for="check_{{$index}}"></label>
</td>
<td>${jvar_not.getValue('u_name')}</td> <!-- provide proper field name of the table here -->
<td>${jvar_not.getValue('u_name')}</td> <!-- provide proper field name of the table here -->
</tr>
</j:while>
</tr>
</tbody>
</table>
</div>
</j:jelly>
The output what I am getting is:
The values are coming from u_font_style (in my case).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 02:12 AM
Here you go. I am modified your code (marked in bold) to get the data from the table.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<div class="col-md-12" style="padding:0px;">
<table st-table="rowCollection" class="table table-striped table-intel" style="margin:0px; width:100%; border-left:1px solid #0071C5; border-right:1px solid #0071C5; border-bottom:1px solid #ccc; border-top:none;">
<th colspan="4">
<div class="table-nav" st-pagination="" st-items-by-page="itemsByPage" st-displayed-pages="3"></div>
</th>
<thead>
<tr style="cursor:pointer;">
<th><a ng-click="checkAll();" class="btn btn-sm btn-secondary">Check All</a></th>
<th st-sort="" ><i></i>XXX</th>
<th st-sort=""><i></i>YYY</th>
<th st-sort=""><i></i>ZZZ</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in rowCollection">
<g:evaluate var="jvar_not" object="true">
var not = new GlideRecord('u_font_style'); <!-- provide your table name here -->
not.query();
not;
</g:evaluate>
<j:while test="${jvar_not.next()}">
<tr>
<td>
<input type="checkbox" ng-click="checkChecked()" id="check_{{$index}}" class="row-item mlaf-checkbox" name="serial_number" value="{{ row.serial_number }}"/>
<label style="height:16px;line-height:16px;" for="check_{{$index}}"></label>
</td>
<td>${jvar_not.getValue('u_name')}</td> <!-- provide proper field name of the table here -->
<td>${jvar_not.getValue('u_name')}</td> <!-- provide proper field name of the table here -->
</tr>
</j:while>
</tr>
</tbody>
</table>
</div>
</j:jelly>
The output what I am getting is:
The values are coming from u_font_style (in my case).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 02:43 AM
Thanks, its working fine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 01:14 AM
<g:ui_form id="form" name="form">
<h1>form</h1>
<label>ABC</label>
<input type="text" name="ab" id="ab" />
</g:ui_form>
Processing Script:
var gr = new GlideRecord("table_name");
gr.column_name= ab;
gr.insert();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 01:46 AM
Can you help me how to modify the below UI script to map the fields from the table.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<div class="col-md-12" style="padding:0px;">
<table st-table="rowCollection" class="table table-striped table-intel" style="margin:0px; width:100%; border-left:1px solid #0071C5; border-right:1px solid #0071C5; border-bottom:1px solid #ccc; border-top:none;">
<thead>
<th>XXX</th>
<th>YYY</th>
<th>ZZZ</th>
</thead>
</table>
</div>
</j:jelly>
The column name in the table is also XXX, YYY and ZZZ. and table name is u_demo1