1) check ServerOutput log and see if there's a msg about not being able to resolve LoggedInPerson.Role.Strategy
2) is Strategy a shortcut?
3) the command is SHOW_SECTION START
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Face-palm. And I've written slight variations on that line dozens of times for HTML cells. My lame excuse (because I feel a need to provide one) is that I threw my back out the other day and the pain distracted me.
I fixed it to "SHOW SECTION_START" and same problem. Role is a single peer reference attribute and Strategy is a plain text attribute. Tomcat gives me this:
Unable to process tag expression IF LoggedInPerson.Role.Strategy='No Visibility' THEN SHOW SECTION_START
Unable to resolve attributes when calculating expression END_SECTION
My guess is that the script feature doesn't support tag expressions.
v8.1 on Windows 10 / MySQL 5.6 (local), v8.1 on Windows Server 2016 / MySQL 5.6 (server)
<<IF LoggedInPerson.Role.Strategy='No Visibility' THEN SHOW_SECTION>>
var divsToHide = document.getElementsByClassName("ChangeStrategies");
for(var i = 0; i < divsToHide.length; i++)
{
divsToHide[i].style.visibility="hidden";
}
<<END_SECTION>>
Is there a way to add a conditional based on an LIRU attribute inside Javascript?
You say "render script of a form cell" but I can only find "Initialization" scripts on form cells? If you mean the render script on a "form" try this as your render script
if "<<LoggedInPerson.Role.Strategy>>"=="No Visibility" {
var divsToHide = document.getElementsByClassName("ChangeStrategies");
for(var i = 0; i < divsToHide.length; i++)
{
divsToHide[i].style.visibility="hidden";
}
}