javascriptadobelivecyclelivecycle-designer

how to split a string and fill a dynamic table with the values inside that string in adobe livecycle?


I have a text that is a combination of values separated with commas "," and I want to split it and fill some column inside a table with those values.

I tried this code in the indexChange event of the table row:

var raw = this.EXTKD.rawValue.split(',');
this.EXTKD.rawValue = raw[this.index];

knowing that EXTKD is the name of the cell that I want to fill with the value, and it is intially filled with the whole text that I want to split.

when I try the above code only the first row gets filled.


Solution

  • I simply created another edit text called EXTKDraw to hold the raw value and hide it from the form view and I just modified my code to be called in the ondocready event like this:

    var raw = EXTKDraw.rawValue.split(',');
    this.EXTKD.rawValue = raw[this.parent.index];
    

    where this.parent.index represents the index of the row of the table.