Skip to Content
avatar image
Former Member

Problem in hiding subform

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    May 25, 2012 at 06:53 AM

    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

    Add comment
    10|10000 characters needed characters exceeded