- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2023 09:20 AM
Hi everyone, I have a Button (Widget) that should be available for every record producer but 1, I tried to put a condition on the HTML based on a field that is in the Record Producer that this button shouldnt appear in.
This is what I tried:
<div id="ResolveButton" class="panel panel-default" ngIf="data.state == '2' && data.aprovado_reprovado == '123'">
<div class="panel-heading">${Resolve}</div>
<div class="panel-body">
<button type="button" class="btn btn-primary btn-block" style="background-color: #3641B3;" ng-show="data.state == '2'" ng-click="c.uiAction('resolve')">${Resolver}</button>
</div>
</div>
Im trying to use the:
&& data.aprovado_reprovado == '123'
Which is a field that is in the Record Producer that the button is not supost to appear, but it keeps appearing ...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2023 04:01 AM
Hi Niklas, the ngIf also works, I ended up doing it with other solution.
I used:
Server Script:
data.table = $sp.getParameter("table");
gr = new GlideRecord(data.table);
if (!gr.isValid())
return;
data.unid = gr.getValue('sys_class_name');
HTML:
ng-show="data.unid != '(sys_class_name_needed)'"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2023 10:06 AM
Hi,
Your condition says ngIf... should it not be ng-if?
And how do you assign the value of data.aprovado_reprovado ?
Regards,
Niklas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2023 04:01 AM
Hi Niklas, the ngIf also works, I ended up doing it with other solution.
I used:
Server Script:
data.table = $sp.getParameter("table");
gr = new GlideRecord(data.table);
if (!gr.isValid())
return;
data.unid = gr.getValue('sys_class_name');
HTML:
ng-show="data.unid != '(sys_class_name_needed)'"