cancel
Showing results for 
Search instead for 
Did you mean: 

How to read all the instances of a text field value in a repeated subform in Adobe forms

abhishek_nag
Explorer
0 Kudos

Hi,

I have a repeated subform (say S1) which is bound to an internal table ( This internal table is a part of data view and not part of PDF layout). Under this S1, I have 2 subforms and a textfield. 2 of the subform have a table (Monthly data table and Quarterly date table). Based on text field value (M or P), we need to hide either of the table subforms. So basically in output, either Monthly table or Quarterly table should get printed in each page.

So, let's say the main repeated Subform S1 is bound with an internal table that has 4 records, then 4 pages will be displayed. But each page will have either Monthly table or Quarterly table.

What I have done

1> I have created 1 subform S1 and bound to an internal table and set a repeated.

2> Under S1 , I have created 2 subforms (MTDSF,QTDSF) and a textfield

3> Under MTDSF, I have created a table (Say Monthly table)

4> Under QTDSF, I have created another table (Say Quarterly Table)

All good so far. The problem starts here from point 5

5> Java script at text field level in the layout ready event

if( this.rawValue = "Q")

data.S1.MTDSF.presence = "hidden";

if( this.rawValue = "M")

data.S1.QTDSF.presence = "hidden";

The above code works only on the 1st page. It's reading the last record of the textfield. For ex If the internal table has 4 records. And the layout field is bound to the text field and having values like (M,M,Q,M). The text field is populated with correct values. However with above condition, it is only reading the last record (M) and working on the 1st page.

I tried several other codes (like xfa.resolvenode) to get the value for each instances but it is not working.

Please help

View Entire Topic
abhishek_nag
Explorer
0 Kudos

I got is resolved myself

abo
Active Contributor

Please explain how, so that other people may benefit.

Sandra_Rossi
Active Contributor

You may also delete your question.

Sai_Narayana
Newcomer
0 Kudos
Hi abhishek, Thanks in advance!!. Could explain how you achieve it?