Page 1 of 1

Using 'empty'

Posted: Tue Feb 12, 2008 12:16 pm
by Andycal
I'm trying to do this:

Code: Select all

  if fld "fldOutputPath" is empty
    then
        put fld "fldArticles" into oPuts
        else
        put fld "fldOutputPath" into oPuts
        end if

But it just doesn't work. I'm guessing it's because I'm using 'empty' wrong. Can anyone help?

Posted: Tue Feb 12, 2008 12:41 pm
by BvG
i tried your code and it works fine here. make sure these fields actually exist on the current card.

Posted: Tue Feb 12, 2008 12:42 pm
by Klaus
???

Hm, try this syntax structure:

Code: Select all

...
if fld "fldOutputPath" is empty then 
     put fld "fldArticles" into oPuts 
   else 
     put fld "fldOutputPath" into oPuts 
end if 
...

Code: Select all

If this does not work then
  fld "fldOutputPath" <> empty
end if
:-)


Best

Klaus

Posted: Tue Feb 12, 2008 12:46 pm
by Andycal
I think my first one did actually work.

I've had a bunch of problems with the IDE today, had to close it down due to some funny behaviour, now working OK.

Very odd.

Posted: Tue Feb 12, 2008 1:44 pm
by Mark
Hi,

My Rev is trying to be a wiseguy...

Code: Select all

put this does not work
  --> does
:-)

Mark