mid statement
Jeff Harrison
jeffaharrison at yahoo.com
Thu Nov 17 19:55:05 PST 2005
--- Fairlight <fairlite at fairlite.com> wrote:
> On Thu, Nov 17, 2005 at 04:13:43PM -0800, Todd, the
> prominent pundit,
> witicized:
[snip]
> > mid(dtl[30],"1","7") = "WC80597"
> > ^
> > Process contains a syntax error at position
> indicated.
> >
> > Thanks for your help.
>
> Shouldn't that be dtl(30) using parens rather than
> brackets? This is a
> lookup, not an array. I've never heard they were
> interchangeable on
> lookup aliases.
>
> Incidentally, I would personally make sure line 2
> has a failure test of:
>
> IF: not dtl
> THEN: 'handle error condition here
>
[snip]
I don't think you can use a lookup field as the first
argument of a mid statement. I would guess that that
is what is happening here. Move the field into a
dummy field and do the mid on the dummy, then
re-assign the dummy back to the lookup field.
I have seen people use both parentheses and/or
brackets for lookup fields. They are aparently
interchangeable.
Jeff Harrison
jeffaharrison at yahoo.com
Author of JHImport and JHExport. The fastest and
easiest ways to create code for filePro Imports and
Exports.
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
More information about the Filepro-list
mailing list