Expand my Community achievements bar.

Floating Fields with .replace()

Avatar

Former Community Member

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

Former Community Member

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