Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Floating Fields with .replace()

Avatar

Level 2

Hi All,

I'm having a problem with my floating fields.

I have a variable declared in my function (floatingFunction), lets call the variable sPara.

to sPara I assign a long Paragragh for example; sPara = "I, the undersigned FN in my capacity as a CP..." 

In my hierarchy structure I have foating fields: fullName and capacity and an empty text call it displayfield, these three are in a subform hdDisplayText

I also have  textfields called fullName & capacity.

On exit event of the fullName textfield I have these two lines :

header.hdDisplayText.fullName.rawValue

= this.rawValue;

floatingFunction.sPara

= floatingFunction.sPara.replace('FN', this.rawValue);

and on prePrint event of hdDisplayTest subform I have this:

this.presence

= 'visible';

displayfield.rawValue

= floatingFunction.sPara;

When u click the print button for the first time it works fine, now the second time you enter a different Full Name and click print, it still prints what you entered the first time, now that is my problem, I've tried xfa.host.resetData(); after printing but that didnt help. Please assist, please.

1 Reply

Avatar

Level 2

Ok I got it, I 'nm using xfa.form.remerge() just after printing.