Contains within

Sort:
You are not authorized to post a reply.
Author
Messages
LauraBryant
Basic Member
Posts: 8
Basic Member

    I am trying to do a dme call to find all the workunits for a set of AU's for a specific requester code.  I query and store the AU's in an array call vRQAcctStr (tried storing as a string with commas separating the codes but that didn't work).  I want my criteria in my workunit DME call to select all WF-STATUS = 2, SERVICE='Inv Approval' and WORK-CAT-VALUE is in my array.

    Right now, after I store the AU's in the array, I am creating the obj.criteria with the following value:

    dmeObj.criteria = "SELECT=WF-STATUS^%3D2%26SERVICE^%3DInv+Approval%26WORK-CAT-VALUE^%7E" + vRQAcctStr;

    This returns zero rows.  I have confirmed that there are workunits with at least one AU in my array.

    Can anyone tell me if this will work and what I am doing wrong?

     

    Thank you.

     

    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      Try using the values as part of the index as semicolon seperated values
      David Williams
      LauraBryant
      Basic Member
      Posts: 8
      Basic Member

        The field WORK-CAT-VAL is not in an index.  I'm not sure I understand what you are saying.

        John Henley
        Senior Member
        Posts: 3348
        Senior Member
          You are correct -- there isn't an index on WORK-CAT-VALUE.
          So what David is suggesting (I don't think he fully read your actual query string) is incorrect.

          This should select what you're looking for:

          &INDEX=WFWSET7&SELECT=(WORK-CAT-VAL~%2c305101%2c|WORK-CAT-VAL~%2c305101|WORK-CAT-VAL~305101%2c)&SERVICE=Inv%20Approval

          %2c is the hex value for comma
          | is the OR function for the &SELECT

          this should find ,305101, -or- ,305101 -or- 305101,

          &INDEX=WFWSET7 will implicitly use index that only includes WF-STATUS=2

          I think the key (bug in my opinion) is that OR part needs to go before the AND part...

          So this works:
          &INDEX=WFWSET7&SELECT=(WORK-CAT-VAL~%2c305101%2c|WORK-CAT-VAL~%2c305101|WORK-CAT-VAL~305101%2c)&(SERVICE=Inv%20Approval)

          but this doesn't:
          &INDEX=WFWSET7&SELECT=(SERVICE=Inv%20Approval)&(WORK-CAT-VAL~%2c305101%2c|WORK-CAT-VAL~%2c305101|WORK-CAT-VAL~305101%2c)

          Thanks for using the LawsonGuru.com forums!
          John
          You are not authorized to post a reply.