cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in hiding subform

Former Member
0 Kudos

Hi All,

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" )

then

  this.presence = "hidden"

else

this.presence = "visible"

endif

Please let me know if any corrections or other options to do same.

Thanks in advance.

Regards,

Aniket Dayama

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Aniket,

The approach seems to be correct.!!!

You have write the code in DocReady event/ Initialise event. And write it as JAVASCRIPT.

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";

}

else

{

this.presence = "visible";

}

Pls Note: field G_VAT_FLG must exist in your Subform VAT.

Let me know if it works..

Regards,

Abhishek

Answers (0)