Jump to content

Show icon on a tabular report based on condition


Recommended Posts

Hi,  I have a tabular report that list my users.   One of the fields identify who is active and who is blocked.

I want to show an padlock icon on the row of every blocked user. I mean: when the field [@field:Usuarios_Ativo^] value is "no".   This is a "yes/no" field type 

I think that should be easy, but I am really struggling to make this work with my limited java skills.

Many thanks Caspio minds!


 

Link to comment
Share on other sites

  • 3 months later...
<div id="show[@field:Id]"></div>
<script>
var d ='[@field:Usuarios_Ativo]';
if (d = 1){
document.getElementById('show[@field:Id]').innerHTML = '<img src="http://someapp.com/nk/icons/emoji/emoji435.jpg" width="25px"/>';
}


</script>

Insert the code above to a HTML Block in your report page. Make sure to replace [@field:Id] with the unique ID of your fields in the table from picker.

Link to comment
Share on other sites

  • 4 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...