Problem with field references
janschenkel at yahoo.com
Thu Jul 3 23:12:03 CDT 2008
--- Mikey <mikeythek at gmail.com> wrote:
> This is a little weird.
> I have two stacks. we'll call them mainstack and
> 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
> "Dept 14" of card "Dept Personnel" of stack
> if I execute "if there is a field fieldname then"
> However, RR doesn't recognize the existence of field
> 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
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.
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