Referring multidimensional object???

chrisb29762052

02-09-2015

Not a programmer and it is my first time working with multidimensional object.

I have a table with  fields "MaxDepth" and "TotalDiveTime" and need to refer my variables (Rep1, Rep2, Rep3) to the multidimensional table as illustrated so that I can to run the script that follow to get the needed value in another field of the table refer here as Rep3.

812205_pastedImage_2.png

Any assistance would be much appreciated.

Accepted Solutions (0)

Answers (2)

Answers (2)

radzmar

MVP

02-09-2015

Hi,

you have to declare the object that holds the desired date first.

Then you can read the desired date the following way:


var repTable = {


  a : {a1: 111, a2: 112},


  b : {b1: 221, b2: 222}


  },


  repA = repTable['a']['a1'],


  repB = repTable['b']['b2'];



xfa.host.messageBox(repA.toString());


Hope this helps.