I have used an options menu which has 8 options to it.
I have 6 fields where i want to put the menu choice output.
Fields a,b,c,d,e,f
I want the first choice from the options menu to output into field "a" ( i got this part to work)
then I want the script to be able to recognize content in field "a" and output the second menu choice
into field "b" etc.
this is what i have written but it is not working.
on menuPick pItemName
switch pItemName
case "choice1"
put "AA" into field "a"
if the contents of field "a" = "true" then (true-meaning it contains output)
put "AB" into field "b"
end if
end switch
end menuPick
Just looking to be pointed in the right direction!
How to code if a certain field has content go to another fid
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
How to code if a certain field has content go to another fid
Tim
Louisville, Ky
Louisville, Ky
Re: How to code if a certain field has content go to another
Hi Tim,
not sure, but maybe you mean:
?
Best
Klaus
not sure, but maybe you mean:
Code: Select all
...
if fld xyz <> empty then
## Do this and that...
end if
...
Best
Klaus
Re: How to code if a certain field has content go to another
Hi.
You are on your way, so I am going to let you keep going.
Note though, that when you say:
This is will not work. First, there is no native word "contents". What you really wanted was:
The contents of a field is the text property of that field, (implied above, and valid) so you could also have said:
Second, "true" is a literal, and is the string "true". What you really wanted was to either check for the actual contents, or perhaps that the text was not empty:
You can also extract the contents of the option button into a return delimited list (this is how it is organized anyway) and run a short repeat loop that will load successive lines of the button contents into successive fields.
All loads of fun. Write back with your progress.
Craig Newman
You are on your way, so I am going to let you keep going.
Note though, that when you say:
Code: Select all
if the contents of field "a" = "true" then (true-meaning it contains output)
Code: Select all
if field "a" = "true" then --(true-meaning it contains output)
Code: Select all
if the text of field "a" = "true" then --(true-meaning it contains output)
Code: Select all
if field "a" = "AA" then
or
if field "a" <> empty then
All loads of fun. Write back with your progress.
Craig Newman