additonal approver based on req location

 4 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Kate Liamero
Veteran Member
Posts: 70
Veteran Member

    I am process flow impaired and need some help.  Our current req approval flow needs to have an additional approver level if the rec location = 0412 or 0729.  This has to occur between the current approver 2 and approver 3.  I have a branch but it is not working.
    This list of locations that will need the addtional approver level will grow so I dont know if this would even be the best way to accomplish this anyway.

    RQH_REQ_LOCATION != "0412" || "0729" branch to x

    RQH_REQ_LOCATION == "0412" || "0729" branch to y

    thanks
    kate

    John Henley
    Posts: 3353
      RQH_REQ_LOCATION != "0412" && RQH_REQ_LOCATION != "0729" branch to x

      RQH_REQ_LOCATION == "0412" || RQH_REQ_LOCATION == "0729" branch to y
      Thanks for using the LawsonGuru.com forums!
      John
      Bob Canham
      Veteran Member
      Posts: 217
      Veteran Member
        I don't have any specific experience with the req approvals, but I have done branching similar to what you're trying to do. The way I did mine was to create a String variable with the values I wanted to test for in a semi colon separated list.
        i.e. ReqLocAddlApproval = "0412;0729"

        Then in the branch, I used the string function indexOf to determine if the value I had was in the list. If it wasn't, the function returns a -1, and if it is, it returns a positive number of where it exists in my variable
        i.e. ReqLocAddlApproval.indexOf(RQH_REQ_LOCATION) != -1 would branch to the additional approval

        Hope this helps.
        Kate Liamero
        Veteran Member
        Posts: 70
        Veteran Member
          thanks for the help. I forgot to mention I am also javascript impaired. my branch is not working
          Robert Spurr
          Veteran Member
          Posts: 130
          Veteran Member
            A lot of times I find that Alpha fields in Lawson retain leading or trailing spaces. Not all the time but in some cases. I've made it a habit to trim the spaces before doing compares. Assuming you updated the branch based on what John provided and it still doesn't work you could try several variants:
            1) Use the trim function and store in a new variable and then do a comparison
            2) Do something like this
            (RQH_REQ_LOCATION != "0412" && RQH_REQ_LOCATION != "0412 ")

            Not sure if this is the problem you are having but it is start.