Page 1 of 1

Setting a field equal to a variable

Posted: Thu Apr 05, 2012 7:46 am
by bqsbarbqGAnC5Z
Hi everyone,

I have two fields on my card and was wondering if there was any way to get the fields to show a variable that I have defined. I want one of the fields to show the variable itself and the other field to show the variable - 50. I tried using

set field "fieldname" to sVariableName
set field "fieldname" to sVariableName - 50

but I got no success with this and the script wouldnt even run. Does anyone have any suggestions. Any help is much appreciated. Thank you!

Re: Setting a field equal to a variable

Posted: Thu Apr 05, 2012 8:20 am
by bn
Hi,

try:

Code: Select all

put sVariableName into field "fieldName"
put sVariableName - 50 into field "fieldName"
you would use the "set some property to some value" only on properties, otherwise you use the "put something into something" syntax.

in your case:
field "fieldName" is a container, you put things into containers.

the borderwidth of field "fieldName" is a property. you would "set the borderwidth of field "fieldName" to tVariable.

It might be a bit confusing but you will get a feeling for when to use which form.


Kind regards

Bernd

Re: Setting a field equal to a variable

Posted: Sat Apr 07, 2012 9:17 am
by bqsbarbqGAnC5Z
That worked perfect, thanks BN!