I have a custom prop object with about 20 bound tags, incoming to the view. There is a table displaying basically what those tags are that can be updated with a new value. When I click or tap on a table row, I would like to get the value from the custom prop and send it to a numeric input field where I can change it. The setup is like this: each value in the custom prop object is numbered G1
through G26
. The row number in the table will correspond to the custom property number, 1 - 26. So I'm thinking I should build the custom prop string via script in the onRowClick
event, but I'm not sure how to turn the string back into a object reference like {string}
.
this is the data object JSON:
{
"G27": "value",
"G28": "value",
"G7": 85,
"G9": 77,
"G13": 626.4,
"G8": 96,
"G26": true,
"G19": 79,
"G2": 100,
"G1": 7.9999995,
"G21": 23,
"G5": 66,
"G23": 43,
"G3": 1.5000001,
"G12": 11,
"G6": 6.000001,
"G10": 97,
"G11": 13,
"G24": 95,
"G20": 90,
"G25": 17.699999,
"G16": 70,
"G4": 17.499994,
"G22": 40,
"G18": 91,
"G17": 14.999996,
"G15": 8,
"G14": 80
}
path to the object: `root.custom.temp_data`
Here is a screen shot:
Is it possible to build a string for each path to G#
, like var = 'root.custom.temp_data.G' & rowNumber
?
Then turn that into the actual reference? Because, the numeric input box is bound to a custom prop, so I am hoping to set that equal to the above-mentioned property.
Or am I doing this all wrong?
I'm also going on maybe 4 hours sleep, crossing my fingers I explain the problem and ask the right questions, lol.
EDIT: I suppose I could get the value from the tag via a dynamic script call, but I already have the values pulled into embedded views so the user can compare the last/current value to the new value. EDIT: I just realized the tag paths are not conducive to be dynamically constructed.
And Here is my edit section: