Problem with field references

Jan Schenkel janschenkel at
Fri Jul 4 00:12:03 EDT 2008

--- Mikey <mikeythek at> wrote:
> This is a little weird.
> I have two stacks.  we'll call them mainstack and
> substack.
> In substack I want to build a fieldname from user
> input and check to see if
> it exists on mainstack.
> The result of this is a variable fieldname that
> contains
> "Dept 14" of card "Dept Personnel" of stack
> "mainstack"
> if I execute "if there is a field fieldname then"
> However, RR doesn't recognize the existence of field
> fieldname.
> [snip]
> So what newfangled way of doing remote field
> references should I be using
> instead of the old-timers HC way?
> -- 

The problem here is that the word 'field' just in
front of your variable name, makes Revolution
interpret that variable as a field name, not a
complete reference.
So it effectively goes out to look for a field with
the name ["Dept 14" of card "Dept Personnel" of stack
"mainstack"]. Just prepend 'field' to your variable
and use [there is a] as your unary operator.

Jan Schenkel.

Quartam Reports & PDF Library for Revolution

"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


More information about the use-livecode mailing list