Hi Mat,
a couple of basic things and hints:
1. give your cards (hopefully) meaningful names!
So you can address them with their names.
...
card "userinput"
...
If NOT, use the correct syntax:
...
## BAD and might throw an error:
## card "card id 1234"
## Correct:
card id 1234
...
Check these stacks to learn more about the basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html
2. The correct "address" of objects is buld with OF:
...
put "some text" into fld "name of the target field here" OF cd "userinput" OF stack "another stack"
...
"of stack xyz" is only neccessary when the object you are addressing is not
in the same stack as the executing object/script.
3. Unfortunately "datagrids" are very special and complex beasts with their own syntax.
So you need to do something like this, because you cannot "update" a single colums directly:
...
## Put complete datagrid data into a variable
put the dgdata of group "RecipeGrid" of card id 1009 into tTempData
## Now update the content of this variable:
put field "RecipeName" into tTempData[1]["RecipeName"]
## And write the data back to the datagrid "en bloc":
set the dgdata of grp "RecipeGrid" of card id 1009 to tTempData
...
Go here:
http://lessons.runrev.com/m/datagrid
load the complete DataGrid manual PDF and learn it by heart!
But even if you do, you might need to read up again, when you are using datagrids the next time.
At least I need to, that's so *'%§$?? complex
Hope that helps!
Best
Klaus