How to hide the checkbox variables in Ritm when they are unchecked and show only checked variables

Karthik Reddy11
Tera Contributor

How to hide the checkbox variables in Ritm when they are unchecked and show only checked variables

 

find_real_file.png

It is showing all variables 

can i know which catalog client script i should use

1 ACCEPTED SOLUTION

@Karthik Reddy 

Okay then in that case first revert the changes which I suggested above and make your Line number 10 look like below:

 <div ng-if="variable.type !='7' || (variable.type =='7' && variable.display_value!='false')">

Now for your new requirement, update line number 25 as below:

 <span ng-if="variable.type !='7'" ng-switch-default class="pre-wrap">{{::variable.display_value}}</span>

This is working as you need.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

21 REPLIES 21

Karthik Reddy11
Tera Contributor

Hi all 

I can hide false check box fields on RITM by using client script  but I can see the false check box fields in service portal-->my requests-->item-->additional details

 

so how can I hide false check box fields on portal additional details

 

please help me with this

 

@Karthik Reddy 

Please follow the steps below to achieve your requirement:

1) Navigate to the "Widget" module and search for the widget named "Variable Summarizer" as shown below:

find_real_file.png

Now open this record and add the below lines of code after line Number 9 as shown below:

 <div ng-if="variable.type !='7' || (variable.type =='7' && variable.display_value!='false')">

And then after line number 31 you need to close the Div correctly. Do not close it above. close it in the place shown below:

 </div>

Screenshot attached for reference where you need to do the change:

find_real_file.png

This will work for you as you need in Service Portal:

Result:

find_real_file.png

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hi i did same as you Explained 

find_real_file.png

there is a clone widget option do i need to click on that or directly i can save and check

Hi @Karthik Reddy 

Nope, you don't need to clone the widget here and changes can be done directly.

Can you share your complete HTML code here after modification on what have you done to check and assist you back.

Also share the screenshot of your form on portal where the check boxes are still visible.

I can confirm I have tested again and it works perfectly well in my PDI.

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hi

<div ng-if="c.data.variables.length > 0" ng-init="c.variable_toggle = c.toggle">
<button class="btn variables-toggle-btn" aria-expanded="{{c.variable_toggle}}" aria-label="{{data.ariaLabel}}" ng-click="c.variable_toggle = !c.variable_toggle" ng-if="!c.hide_control">
<span style="font-size: 12px;" class="glyphicon" ng-class="c.variable_toggle ? 'glyphicon-chevron-down' : 'glyphicon-chevron-up'"></span>
{{data.label}}
</button>

<div ng-if="c.variable_toggle" id="variables-toggle" aria-hidden="{{!c.variable_toggle}}">
<hr role="presentation" ng-if="!c.hide_control">
<div class="m-b break-word" ng-repeat="variable in c.data.variables">
<div ng-if="variable.type !='7' || (variable.type =='7' && variable.display_value!='false')">
<label class="m-t-xs m-b-none text-muted"><b>{{::variable.label}}</b></label>
<div ng-if="!variable.multi_row">
<div ng-switch="variable.type">
<!-- 27 is type URL, 33 is type Attachment -->
<a ng-switch-when="27" class="pre-wrap" title="{{::variable.label}}" href="{{::variable.display_value}}" target="_blank">{{::variable.display_value}}</a>
<span ng-switch-when="33" class="file-attachment">
<a ng-if="::variable.state != 'not_available'" class="pre-wrap" title="{{::variable.label}}" href="javascript:void(0);" ng-click="scanAttachment(variable)" aria-label="${Download {{variable.display_value}}}">{{::variable.display_value}}</a>
<span ng-if="::variable.state == 'not_available'" class="error">
<a class="pre-wrap" title="{{::variable.label}}" href="javascript:void(0);" ng-click="scanAttachment(variable)" aria-label="${File {{variable.display_value}} failed security scan}">{{::variable.display_value}}</a>
(${File failed security scan})
</span>
</span>
<span ng-switch-default class="pre-wrap">{{::variable.display_value}}</span>
</div>
</div>
<div ng-if="variable.multi_row">
<a href="javascript:void(0)" class="hidden-xs" uib-popover-template="'sp_multirow_vs_summarizer.html'" popover-title="{{variable.label}}" popover-placement="auto top" popover-append-to-body="true" popover-trigger="outsideClick">${Click to view}</a>
<a href="javascript:void(0)" class="visible-xs" ng-click="c.openMrvsModal(variable)">${Click to view}</a>
</div>
</div>
</div>
</div>
</div>

 

 

and screen shot

 

find_real_file.png