PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 05/25/2016 1:51 PM by  John Henley
Contains within
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
LauraBryant
Technicial Analyst
Private
Basic Member
(14 points)
Basic Member
Posts:8


Send Message:

--
05/24/2016 2:45 PM

    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
    Private
    Private
    Veteran Member
    (3076 points)
    Veteran Member
    Posts:1036


    Send Message:

    --
    05/24/2016 3:11 PM
    Try using the values as part of the index as semicolon seperated values
    David Williams
    LauraBryant
    Technicial Analyst
    Private
    Basic Member
    (14 points)
    Basic Member
    Posts:8


    Send Message:

    --
    05/25/2016 9:55 AM

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

    John Henley
    Private
    Private
    Senior Member
    (9650 points)
    Senior Member
    Posts:3234


    Send Message:

    --
    05/25/2016 1:51 PM
    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.