Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
repeat with tIndex = 1 to 3
put "WO#12345" into theDataA["& tIndex &"]["wo_num"]
put "mm/dd/yy" into theDataA["& tIndex &"]["date"]
put "Technician: Name" into theDataA["& tIndex &"]["technician"]
put "Location: longitude;latitude" into theDataA["& tIndex &"]["location"]
put "Est time: hh:mm" into theDataA["& tIndex &"]["est"]
put "Work to do:" into theDataA["& tIndex &"]["wtd"]
put theImageFolder & "pin.png" into theDataA["& tIndex &"]["map"]
end repeat
repeat with tIndex = 1 to 3
put "WO#12345" into theDataA[tIndex]["wo_num"]
put "mm/dd/yy" into theDataA[tIndex]["date"]
## etc...
That worked! I should have asked right away... I visited my erroneous script everyday for a couple of days and
Thank you!
Can I ask another OT question here?
How can I get the data of the clicked row in DataGrid? I tried to get "the clickedLine", but as expected, it works on the fields that composed the row, not the row of the data grid. I realize data grid is not a field. Or at least, how do I know what line was tapped?
you can query -> the dgHilitedIndex of grp "your datagrid here"
Do something like htis:
...
the dgHilitedIndex of grp "your datagrid here" into tIndex
put the dgDataOfIndex[tIndex] of grp "your datagrid here" into tDataArray
## Now you have an array with the data of the currently selected row
...
you can query -> the dgHilitedIndex of grp "your datagrid here"
Do something like htis:
...
the dgHilitedIndex of grp "your datagrid here" into tIndex
put the dgDataOfIndex[tIndex] of grp "your datagrid here" into tDataArray
## Now you have an array with the data of the currently selected row
...