- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2014 01:34 PM
If I wanted to set a reference qualifier to something like:
(name ==='a' and class ==='b') or (name ==='c' and (class ==='d' or class ==='e'))
or
name === 'a' and (class === u_something.class or class === u_somethingelse.class)
Is that possible as an encoded query, or would I need to call an include script to put those results into a list?
Thanks,
-Stephen
--------------------------------
Note that the accepted answer is not the correct answer in this case. I've added the correct answer as a reply at the bottom.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2014 02:21 PM
There is no equivalent. What is your business requirement? Perhaps we can brainstorm a solution outside of the qualifier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2014 02:38 PM
Steve,
If the encoded query did work, the syntax would look a bit like this:
'name=a^name=b^ORname=c^sys_class_name=d^ORsys_class_name=e'
Give it a go and see if it works.
Kyle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2014 04:09 PM
Can you then explain how the grouping works? (assuming you meant 'name=a^sys_class_name=d=b^ORname=c^sys_class_name=d^ORsys_class_name=e')
To me, your statement looks like:
name==='a' && class ==='b' || name==='c' && class==='d' || class ==='e'
Which would not be the same as:
(name==='a' && class ==='b') || (name==='c' && (class==='d' || class ==='e'))
or
(name==='a' && class ==='b') || (name==='c' && class==='d') || (class ==='e')
(FYI, this is hypothetical at this point since I ended up doing something like 'name=a^sys_class_nameINmyclass,myotherclass'.)
I just need to know how the grouping would work since a parenthesis isn't accepted.
Thanks!
-Stephen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2014 09:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2014 11:33 AM
So, if the encoded strings follow the same rules. It's not possible to group OR operations.. right?
'name=a^sys_class_name=b^ORname=c^sys_class_name=d^ORsys_class_name=e'
Will be evaluated as:
(name=a^sys_class_name=b)^OR(name=c^sys_class_name=d)^OR(sys_class_name=e)
Which means queries such as my original question are impossible:
name==a && (sys_class_name==b || sys_class_name==c || sys_attrib_name==d)
Without writing them out redundantly:
name=a^sys_class_name=b^ORname=a^sys_class_name=c^ORname=a^sys_attrib_name=d
Am I mistaken? Is there an equivalent to parenthesis to modify order of operations?