I am trying to hide Subform based on value of flag from context. Please find below details.
Name of subform in VAT : it contains some texts and text fields.
Flag defined in context is G_VAT_FLG
If this flag is set i.e = 'X', Subform VAT should not be displayed.
I have written below code for subform VAT in FormCalc for Form:ready event. But its not working.
if($record.G_VAT_FLG == "X" )
this.presence = "hidden"
this.presence = "visible"
Please let me know if any corrections or other options to do same.
Thanks in advance.
The approach seems to be correct.!!!
For you reference write code in your Subform which you want to hide/unhide as:-
if(this.G_VAT_FLG.rawValue == "X" )
this.presence = "hidden";
this.presence = "visible";
Pls Note: field G_VAT_FLG must exist in your Subform VAT.
Let me know if it works..