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
BedrockMission!

Learn more

View all

Sign in to view all badges

bind.ref not working for dynamically added fields

Srini_Dhulipall
Level 10
Level 10

I am working on a template that has a table with rows added at the run time. I have to attach fields in each row to an XML tag and child tags. I am using SOM Expression to identify each field in the run time. I have written the code to go in a loop and bind the field at run time but it was not working. So I am just kind of trying out for binding one field using the SOM Expression.

This code was written in the initialize event of the TextField2 with Java Script as the scripting language.

var fieldPath = xfa.resolveNode("xfa[0].template[0].Message[0].Page1[0].Table1[0].Row1[" + 0  +"].TextField2[0]");

fieldPath.bind.ref = "$record.COMMAND.sendApplicationInformationRequest.formNumber";

xfa.form.remerge;

I also tried by changing the reference this way but no luck..

var fieldPath = xfa.resolveNode("xfa.template.Message.Page1.Table1.Row1[" + 0+ "].TextField2");

Can any one help on this?

Thank you

Srini

4 Replies
Steve_L_Walker
Level 10
Level 10

Rather than write script use the InstanceManager to add/delete rows.

I have attached a sample dynamic PDF that uses InstanceManager to enable row addtion/deletion. I have included the embedded schema and an XML instance to test in Preview PDF.

Steve

Steve_L_Walker
Level 10
Level 10

Appears that only 2 attachments at a time are permitted.

Srini_Dhulipall
Level 10
Level 10

Hi Steve,

     Thank you for your response..

     I could not able to open your attachments.. They both say QUEUED..

  • dynamic-subform-with-data-binding.pdf (150.4 K) QUEUED
  • form1.xml (533 bytes) QUEUED
  • Thanks

    Srini

    Steve_L_Walker
    Level 10
    Level 10

    Please send an email to stwalker.adobe@gmail.com and I will forward the samples.