IF ELSE AND OR problems

air_wolf
air_wolf Member Posts: 13
hello,

I have the following syntax:
IF SalesOrder."No." <> 'value' THEN
this is evaluated correctly and it goes further.

when I have this:
IF ((SalesOrder."No." <> 'value1') OR (SalesOrder."No." <> 'value2')) THEN
or
IF (SalesOrder."No." <> 'value1') OR (SalesOrder."No." <> 'value2') THEN

the expressions are not evaluated and it stops.

Answers

  • Luc_VanDyck
    Luc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Use AND instead of OR
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Shedman
    Shedman Member Posts: 194
    Or what about?
    IF NOT (SalesOrder."No." IN ['value1','value2']) THEN
    
  • air_wolf
    air_wolf Member Posts: 13
    solved. can be closed. Luc Van Dyck was right. me stupid ](*,)
  • vanrofi
    vanrofi Member Posts: 272
    please use a relevant title in subject...Helps searching for others...
  • Luc_VanDyck
    Luc_VanDyck Member, Moderator, Administrator Posts: 3,633
    air_wolf wrote:
    solved. can be closed. Luc Van Dyck was right. me stupid ](*,)
    Please remove the [solved] in your topic title. We now use a green checkmark to indicate a question has been solved. This checkmark is displayed when you set the Attribute of the topic to "Solved!". The Attribute is a field that is below the Subject-field, when you edit the first message in this thread.

    And while you are changing the topic title, you can just as well change it to "I'm really stupid".
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • air_wolf
    air_wolf Member Posts: 13
    solved.