mardi 11 août 2020

VBScript Conditional Statement Change

Hi I am trying to make a change to some existing code in VBScript because the things have have changed.The original code is as followed:

 if (SystemVariables.CodeObject.Company = "X" OR SystemVariables.CodeObject.Company = "Y") then
  if StockedLine.CodeObject.FOCType = "WARRANTY" then
    if OrderHeader.CodeObject.OrderBranch = "1" then
                  StockedLine.CodeObject.ProductClass = "8050"
    elseif OrderHeader.CodeObject.OrderBranch = "2" then
                  StockedLine.CodeObject.ProductClass = "8051"
    elseif OrderHeader.CodeObject.OrderBranch = "3" then
                  StockedLine.CodeObject.ProductClass = "8052"
    end if

Now we need to change this VBScipt code to include the following:

• When the branch is 1 – Any of 8048, 8049, 8050 can be selected

• When the branch is 2 – Only 8051 is used (so as it is now)

• When the branch is 3 – any of 8052 & 8053 can be selected

Any clues on the best way to do this? Please let me know if you have any questions.

Aucun commentaire:

Enregistrer un commentaire