Referring multidimensional object???

Avatar

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile
chrisb29762052
Level 1

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)

Avatar

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile
chrisb29762052
Level 1

06-09-2015

814390_pastedImage_2.png

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
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.