Skip to Content

Adobe forms: Hide table rows based on data


Hi Friends,

I've print the internal table data using adobe forms. In the internal table, there is a field called  "CHARG".

If charg field is not initial then row will be printed else hide the row.

In java script , which event we can use?

Regards,

Vallamuthu M

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 17, 2013 at 01:57 PM

    Put this JavaScript code in the subform that contains your table (ie. one node above your table) in the "form ready" event (of course change the names/DOM paths to match your form)....

    var valEmpty;

    var numrows = xfa.resolveNodes("data.Mainpage.My_Table_Subform.Table1.Row1[*]").length;

    for (var x=0; x < numrows; x++) {

         valEmpty = xfa.resolveNode("data.Mainpage.My_Table_Subform.Table1.Row1[" + x + "].CHARGE").rawValue

        if (valEmpty == "" || valEmpty == null) {

            xfa.resolveNode("data.Mainpage.My_Table_Subform.Table1.Row1[" + x + "].CHARGE").presence = "hidden";

        }

    }

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 17, 2013 at 11:02 AM

    Hi Vallamuthu,

         Click on DATA sub form of the table. In Initialize event write the Javascript below.

    if ( this.CHARGE.rawvalue == "  " )

    {

       this.presence = "hidden";

    }

    But I suggest you to do it in the Interface level using ABAP since this increases performance. You just need to use one statement as below.


    DELETE i_tab where charge IS INITIAL.

    Here i_tab is the internal table.

    Add comment
    10|10000 characters needed characters exceeded