Use multiple "like" conditions in AML query?

Hi, I have:
setType("Part");
setProperty("permission_name", "New %");
setPropertyAttribute("permission_name", "condition", "like");
var item = apply();
How do I change this to use multiple "like" conditions? I want to express something like:   "permission_name LIKE 'New %' OR permission_name LIKE 'In Work %'" Thanks,,,
Parents
  • Wow, I just hustled my way through this mud, got my hands dirty and hacked together something that conquered Aras. Here's my victorious Solution:
    setType("Part");
    var a = newOR();
    var b = a.newAND();
    b.setProperty("permission_name", "Released %");
    b.setPropertyCondition("permission_name", "like");
    var c = a.newAND();
    c.setProperty("permission_name", "New %");
    c.setPropertyCondition("permission_name", "like");
    Please tell if this can be gloriously optimized....... I used the docs on www.aras.com/.../Aras.IOM.Item.newOR.html to understand <OR> better.
Reply
  • Wow, I just hustled my way through this mud, got my hands dirty and hacked together something that conquered Aras. Here's my victorious Solution:
    setType("Part");
    var a = newOR();
    var b = a.newAND();
    b.setProperty("permission_name", "Released %");
    b.setPropertyCondition("permission_name", "like");
    var c = a.newAND();
    c.setProperty("permission_name", "New %");
    c.setPropertyCondition("permission_name", "like");
    Please tell if this can be gloriously optimized....... I used the docs on www.aras.com/.../Aras.IOM.Item.newOR.html to understand <OR> better.
Children
No Data