Does anyone know if it is possible to hide a <div> or <table> in an output document based on a field value?
ServiceMax customer support gave us this solution and it works!
<!-- ******Code to hide section *********************** -->{{(function(){if($D.Work_Order.X3rd_Party_Technician__c== null)document.getElementById("tech").style.visibility = "hidden";})()}}
Hi @jongb , it is possible but it requires a little Javascript. I'm just finishing the forms here at Dormakaba and will hopefully be able to publish some of the stuff we are doing.
But just FYI, the steps we are doing to achieve this are:
- putting the tag inside a div with a given label
- waiting until the value in that div has been transformed to its field value
- pulling the field value and if it meets the criteria, applying a style to hide the div or table.
I hope this helps,
Jonathan.
ServiceMax customer support gave us this solution and it works!
<!-- ******Code to hide section *********************** -->{{(function(){if($D.Work_Order.X3rd_Party_Technician__c== null)document.getElementById("tech").style.visibility = "hidden";})()}}