Skip to Content
avatar image
Former Member

Fill text field in table dynamically

Hi there,

I've a table which consists of 5 columns.

The first column is not binded and should be filled with a concatenated string of two fields of the following context node:

|- IT_ITEM

|-- ARKTX

|-- TEXT

I know how to fill a text field dynamically (with JavaScript) via e.g.

xfa.record.IS_HEADER.NAME1_WE.value

, but not how to do that within a table. For instance, how can I access the value of fields ARKTX and TEXT for each table line?

I use the following subforms (type table and body item):

|- POSITIONS (binded to $record.IT_ITEM)

|-- DATA1 (binded to DATA[*]).

I tried to use something like

xfa.datasets.data.IT_ITEM...

, but it didn't work.

A second question:

Is it possible to have two lines in the table for each entry of IT_ITEM? How can I manage that? Do I have to include a DATA2 subform to the POSITIONS table?

I tried that, but the second line was not displayed.

Can you provide me links to tutorials for ADOBE forms to help me with these problems?

THANKS.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 17, 2008 at 02:09 PM

    Hello Eddie,

    ARKTX & TEXT table fields or ?

    What does mean 2 lines? Can u give example

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 17, 2008 at 05:00 PM

    Hi Eddie,

    If I understood your question correctly,

    1) You have a table with 5 rows and would like to set the values in each table row at runtime using script.

    Lets call your table as 'objTable'.

    loop through the table to get the number of rows and get/set the values.

    for(var i = 0; i<objTable.nodes.length; i++)
    {
         var oChildNode = objTable.nodes.item(i);   //provides access to individual row
         oChildNode.<columnA>.rawValue = "11";  //provides access to columnA of row1, and set the value to '11'
         oChildNode.<columnB>.rawValue = "12";
    }
    

    2) For the second question I beileve what you need is to have option of displaying the entire value without truncating.

    Click on the field for which you require multiple lines, in the 'Object palette' enable the check box 'Multiple lines'.

    Regards

    Srikanth KV

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Eddie

      Could you please tell me where I place your suddgested codes ? (i.e. at the cell - Javascript code or Row?) - I'm new with Adobe Form and learning it thru SDN as there are very little of doco available (also my xfa.resoveNodes.....statement doesnot work at all ? Can't understand why)

      I will really appreciated If you could send me a reply - to save me many days of trying to sort this out - Thanks