cancel
Showing results for 
Search instead for 
Did you mean: 

Smart doc - condition based section display

jongb
Grill Chef
Grill Chef

Smart doc - condition based section display

Jump to solution

Does anyone know if it is possible to hide a <div> or <table> in an output document based on a field value?

0 Likes
Reply
1 Solution

Accepted Solutions
jongb
Grill Chef
Grill Chef

User Reply Smart doc - condition based section display jongb

Jump to solution

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";})()}}

View solution in original post

jonathan
Fry Chef
Fry Chef

User Reply Smart doc - condition based section display jonathan

Jump to solution

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.

Tags (1)
0 Likes
Reply
jongb
Grill Chef
Grill Chef

User Reply Smart doc - condition based section display jongb

Jump to solution

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";})()}}

View solution in original post