Hello,
I'm trying to use a declared JavaScript variable in a conditional statement in a data grid column template.
I declare the variable _selectedUserHistoryAgent in the JavaScript at the top of the page.
I'm trying to change the color of the text in the column template below to blue if the ACTION_BY_USERNAME data in that row is equal to the _selectedUserHistoryAgent variable.
<script id="actionByTemplate" type="text/x-template">
${if(ACTION_BY_USERNAME == _selectedUserHistoryAgent)}
<div style="color:blue">
${ACTION_BY_DISPLAY}
</div>
${else if(ACTION_BY_DISPLAY == 'N/A')}
<div style="color:#ccc">
${ACTION_BY_DISPLAY}
</div>
${else if(ACTION_BY_USERNAME != _selectedUserHistoryAgent) }
<div>
${ACTION_BY_DISPLAY}
</div>
${/if}
</script>
How do I do this?
Thank you