These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Dynamic Table with Checkbox Column - How to capture the selected row

Majordog
Registered: Jan 14 2011
Posts: 2

Hello,
 
Completely new to LiveCycle - I have a dynamic db driven table with the first column "SelectRecord" as a checkbox. I do not know how I can get only one row to be selected, and to capture the data from the row that is - Any help woudl be much appreciated,
Thanks

My Product Information:
LiveCycle Designer
DaveyB
Registered: Dec 10 2010
Posts: 70
Take a look at the tutorial and I think it will answer your question. In this case, it is adding and deleting rows, but selecting a row follows the same rules.Hope that helps!

DaveyB

LiveCycle Designer 8.0
"Genius is one percent inspiration, ninety-nine percent perspiration." ~~ Thomas Edison
"If at first you don't succeed, get a bigger hammer." ~~ Alan Lewis
"If the conventional doesn't work, try the unconventional" ~~ DaveyB

Majordog
Registered: Jan 14 2011
Posts: 2
Hello,

The tutorial gave me some idea on approach but the solution is:

reviewAndAssign.theReviewForm.DisplayRecords.Row1.SelectRecord::change - (JavaScript, client)



// This script sets the current checkBox in Row1 to be selected, if it is not already selected

// and will set all others to be unchecked.

var nRows = xfa.resolveNodes("Row1[*].SelectRecord");

var myIndex = this.parent.index;



for(var i=0; i< nRows.length; i++){if(i == myIndex){

if(nRows.item(i).rawValue == 1){

nRows.item(i).rawValue = 1}

else{

nRows.item(i).rawValue = 0;

}


}else{

nRows.item(i).rawValue = 0;

}


}


Thanks!