Selection Criterion Formula Wizard question

SOLVED

I have a recurring task that exports invoices to our EDI system and I'm trying to implement a selection criteria to separate out invoices from selected customers. I have tried variations on the script below but it is constantly rejected by the formula wizard. Can anyone help me parse out the error(s)? I think I'm using the OR operator incorrectly but I can't get any reference on how it should be use. Thanks for your help

[F:SIV]X810STA=2 & [F:SIV]INVTYP=1 & (date$>= ([F:SIV]INVDAT + [F:SIV]YDAYSDELAY)) & [F:SIV]INVSTA=3 & ([F:SIV]BPCINV=050360 | [F:SIV]BPCINV = 100535 | [F:SIV]BPCINV = 190069 | [F:SIV]BPCINV = 400015 | [F:SIV]BPCINV = 570140 | [F:SIV]BPCINV = 610168)

Paul

Parents
  • +1
    verified answer

    A quick guess: "[F:SIV]BPCINV" is text, so the customer code should be inside quotes. To isolate the problem can you simplify this temporarily to:

    [F:SIV]X810STA=2 & [F:SIV]INVTYP=1 & (date$>= ([F:SIV]INVDAT + [F:SIV]YDAYSDELAY)) & [F:SIV]INVSTA=3 & ([F:SIV]BPCINV='050360')

    ...or should that be double quote instead of single?

     

    In any case, if it works then expand by adding 

    [F:SIV]X810STA=2 & [F:SIV]INVTYP=1 & (date$>= ([F:SIV]INVDAT + [F:SIV]YDAYSDELAY)) & [F:SIV]INVSTA=3 & ([F:SIV]BPCINV='050360' | [F:SIV]BPCINV = '100535')

    And if that works then add all options back in.

Reply
  • +1
    verified answer

    A quick guess: "[F:SIV]BPCINV" is text, so the customer code should be inside quotes. To isolate the problem can you simplify this temporarily to:

    [F:SIV]X810STA=2 & [F:SIV]INVTYP=1 & (date$>= ([F:SIV]INVDAT + [F:SIV]YDAYSDELAY)) & [F:SIV]INVSTA=3 & ([F:SIV]BPCINV='050360')

    ...or should that be double quote instead of single?

     

    In any case, if it works then expand by adding 

    [F:SIV]X810STA=2 & [F:SIV]INVTYP=1 & (date$>= ([F:SIV]INVDAT + [F:SIV]YDAYSDELAY)) & [F:SIV]INVSTA=3 & ([F:SIV]BPCINV='050360' | [F:SIV]BPCINV = '100535')

    And if that works then add all options back in.

Children
  • 0 in reply to glenncharlton

    Glenn,

    I used your methodical approach and realized that the text field on the selection criteria table had a 120 character limit and my error was because I was exceeding that. I ended up using a different table\line on the selection criteria that (hopefully) will parse out the records I want when exporting. I also went into the screens menu and extended the character count on the text fields to 150 as the selection code was still longer than 120 even divided up.

    Thanks for your help