Skip to Content
avatar image
Former Member

Current Row Index of table in the "Form ready" event of subform, inserted into table

Hi All,

We have created a Adobe form (T-code SFP).

In the interface, we have one table which is used into the layout directly.

Now into this table we have added one sub-form, which contains one text element, and which is now getting repeated for every table row.

Ie First table row is displayed then text from subform, then 2nd table row followed by same text from subform, then 3rd table row followed by subform, and so on

But we need is this Subform (text element inside it) should be displayed only for first row.

Hence on the Subform, in the event Form Ready (or Layout Ready) we tried to used

If this.index != “1” (as well as this.parent.index != “1”)

   This.presence = “hinden”

But this is not working, so we need to know how to obtain current table row, so that if it is not equal to 1 we can make the presence as hidden.

Kindly suggest!!



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 02, 2012 at 06:27 AM

    Hi Amit,

    You can get the row index by using row.rowIndex attribute.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you sandeep.

      I as mentioned earlier, in the table we have one row and below that row we have added one subform.

      so I tried to write the jave script code on "form ready" event of Subform, Kindly let me know if this is not the correct event or not the correct way of doing it.

      I tried row.rowIndex but it doesn't work.

      if( row.rowIndex != "1")

           this.presence = "hidden";

      also tried this.rowIndex, this.row.rowIndex (though this sytax was also not available in -- "this.")

      but had bad luck all the time.

      Kindly suggest some other way, many thanks in advance.


      Just to check if this event is working fine or not, we added "this.presence = "hidden";" into same event without any "if condition" and this subform was not shown for all the rows.

      This means there is problem with "if condtion" (where we are not able to find current row number)

      And we need this subform to be shown for first row only.