Why data.variable not displaying data in widget?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2024 11:37 PM
Hi Community,
I have two widgets, in which first widget contains text box & search button. When user clicks on Search button, the another widget displays table.
But data is not displaying on table.It seems some issue with - data.gisid & data.location.
However, logs are displaying correctly.
Widget 1 html code:-
<span class="col-md-7"><input id="search_term" name="search_term" type="search" placeholder="Enter Name,GIS ID or DUNS" class="form-control input-md"></span>
<div class="each-pill" ng-class="{'active':c.selectedPill == 'entitytable'}" ng-click="selectPill('entitytable')">
<a type="button" ng-click="c.searchEntityREST()" class="btn btn-primary">${Search Entity}</a>
</div>
Widget 2:-
Html code:-
<table class="table table-striped">
<thead>
<tr>
<th>GIS Entity ID</th>
<th>Entity Name</th>
<th>Entity Location</th>
<th>Entity Type</th>
</tr>
</thead>
<tbody>
<tr ng-if="data.gisid!='">
<td>{{data.gisid}}</td>
<td>{{data.location}}</td>
</tr>
</tbody>
</table>
Server Script:-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2024 11:59 PM - edited 01-22-2024 12:04 AM
Hi @Ankita Kolhe
Sometimes this happens, could you please try to convert it to the STRING before passing it to the HTML
data.gisid = arr[0].toString();
Please hit helpful if this resolves your issue.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 04:33 AM
Hi @Ankita Kolhe please let me know if this works?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 12:02 AM
Typically when referring to data directly from the server script I would prefix it with c (based on the c = this line in the client script)
<td>{{c.data.gisid}}</td>
<td>{{c.data.location}}</td
Unsure if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 12:53 AM
Still not working.