Page 1 of 1

Accessing DataGrid Information from External Objects

Posted: Fri Aug 02, 2013 3:28 am
by Gage
Hello,

I have a couple of general questions about interacting with DataGrid Forms.

1.) Is it possible to call the GetDataOfIndex function from object script that is outside of a DG? How? I want the value returned to the handler outside of the DG to populate a temporary field that pops up outside of the DG.

2.) How can I reference a specific instance of an object inside a DG from object script outside of the DG?
Here, I tried the following process:
-in MouseUp handler of DG Behavior Script, passed 'the long id of the target' (stored as tField) that was clicked to a handler in a field outside of the DG
-handler in field uses 'put the text of fld pField into me' <--Here, I get an error message saying field "blah blah blah blah blah blah" (the long ID that was passed in) does not exist.


These are both optional ways of solving one problem, so only one answer is really needed, but for my education, both are appreciated! :)

Thank you in advance!

Phil E.

Re: Accessing DataGrid Information from External Objects

Posted: Fri Aug 02, 2013 1:31 pm
by Klaus
Hi Phil,

1. yes, you can use VALUE:
...
put "getdataofindex(1," & QUOTE & "Name of column here..." & QUOTE & ")" into tGetIndex
put value(tGetIndex,grp 1) into tIndexValue
...

2. "the long ID of xxx" already contains the TYPE of the control:
long ID example -> field id 1065 of group id 1041 of card id 1002 of stack "Stack 1375446091"
so your:
...
put the text of fld pField into me
...
Should come WITHOUT -> fld:
...
put the text of pField into me
...


Best

Klaus

Re: Accessing DataGrid Information from External Objects

Posted: Fri Aug 02, 2013 5:52 pm
by Gage
Klaus,

You are immensely helpful!

Thanks so much.

Phil E.