Add a dollar symbol before all the column values in Data Table From URL def widget in Service Portal

Hardik Panchal
Mega Guru

Hello All,

I have a few columns coming from the widget "Data Table From URL definition", in which for one column I need to add '$' symbol before each value of that single column as shown in the below image.

Can you please help me.

HardikPanchal_0-1704383793141.png

Below is the html code for it.

<tbody>
          <tr ng-repeat="item in data.list track by item.sys_id">
            <td role="cell" class="pointer sp-list-cell" ng-class="{selected: item.selected}" ng-click="go(item.targetTable, item)" ng-repeat="field in ::data.fields_array" data-field="{{::field}}" data-th="{{::data.column_labels[field]}}"><span ng-if="$first" aria-label="${Open record}: {{::item[field].display_value}}" role="link" tabindex="0">{{::item[field].display_value | limitTo : item[field].limit}}{{::item[field].display_value.length > item[field].limit ? '...' : ''}}</span><span ng-if="!$first">{{::item[field].display_value | limitTo : item[field].limit}}{{::item[field].display_value.length > item[field].limit ? '...' : ''}}</span>
            </td>
            <td><a href="/sys_attachment.do?sys_id={{item.attachment_sys_id}}">{{item.attachment_name}}</a></td>
          </tr>
        </tbody>

Thanks.

1 ACCEPTED SOLUTION

Faiz Ahmed Moha
Giga Expert

Please try <span ng-if="!$first">{{::'$'}}{{::item[field].display_value | limitTo : item[field].limit}}{{::item[field].display_value.length > item[field].limit ? '...' : ''}}</span>

 

Mark this as 'Helpful'  and 'Accept solution' if this solution work.

 

Regards

Faiz Ahmed

View solution in original post

2 REPLIES 2

Faiz Ahmed Moha
Giga Expert

Hi @Hardik Panchal ,

Please try as below.

<span ng-if="!$first">{{::'$'}}{{::item[field].display_value | limitTo : item[field].limit}}{{::item[field].display_value.length > item[field].limit ? '...' : ''}}</span>

 

Please Mark Helpful and Accept solution if this works for you.

 

Regards

Faiz Ahmed

Faiz Ahmed Moha
Giga Expert

Please try <span ng-if="!$first">{{::'$'}}{{::item[field].display_value | limitTo : item[field].limit}}{{::item[field].display_value.length > item[field].limit ? '...' : ''}}</span>

 

Mark this as 'Helpful'  and 'Accept solution' if this solution work.

 

Regards

Faiz Ahmed