cancel
Showing results for 
Search instead for 
Did you mean: 

Numeric Counter on the forms

agnihotro_sinha2
Active Contributor
0 Kudos

hi,

i have to display a Counter on the Form which should be incremented based on the Number Of PERNRs of a Person ID.

Both PERNR and Person ID are present on the Forms. But was wondering how to display or calculate the counter.

Is there any scripting available or should i use some events on the form.

please suggest.

Ags.

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

hello,

do you mean you have to count the people on the form, but you don´t know the count in the ABAP/ WD initial coding? so you dynamically add nw persons (remove too) on the form without the DB communication, right?

you can always use the scripting: get the number of the row instances and next check if the field are filled/ changed/ etc.

very similar post was send few days ago.

agnihotro_sinha2
Active Contributor
0 Kudos

hi,

thanks, but i tried searching the SDN and dint get any clue on scripting code.

I have this GT_HEADER table which has PERNR,FKEy,IKEY.

Now on change of any this i want to increment the counter.

Is it possible in scripting??

ags.

Answers (1)

Answers (1)

OttoGold
Active Contributor
0 Kudos

ou may utilize this: (author Mr. Norbert Prager)

var TestNodesLen = xfa.resolveNodes("xfa.record.YOURTABLE.DATA[*]").length; //for accessing via hierarchy

xfa.resolveNode("xfa.record.TESTTYPE.DATA["+ i +"].YOURFIELD").rawValue;

and I guess you will need some loop to work with all the rows.

You´d better read through this "book": http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_ba...