I have a script that select record based on the va...
# suiteql
s
I have a script that select record based on the values filters: [ ["custrecord_kk_pw_ship_method","anyof","61129","61130","101934"], "AND", I'm trying to do the exactly same thing in SuiteQL, I'm struggling a bit. SELECT id from .... WHERE custrecord_kk_pw_ship_method "contains" , "Like", etcc Any help would be appreciated
s
WHERE custrecord_kk_pw_ship_method IN (61129,61130,101934)
s
Sorry, I've made a mistake custrecord_kk_pw_ship_method has the 3 values like this '61129,61130,101934' So I want to find all the records where custrecord_kk_pw_ship_method has the value 61130
j
is it a multiselect?
☝️ 1
you can find the mapping table
in the records catalog
d
that reminded me of the undoc'd
BUILTIN.MNFILTER
function: https://stackoverflow.com/a/73355880/7888975
j
yeah I need to give that a try sometime, I saw that post the other day!
so far I’ve just been doing joins
d
if it's not multiselect and is just a csv string, you could just throw this at it and call it a day:
WHERE ',' || custrecord_kk_pw_ship_method || ',' LIKE '%,61130,%'
*forgot the '%'
felt a bit yucky typing that one out TBH
is that join/map approach the same as this from Mr Zigman?
s
I just realized, sorry, that the field custrecord_kk_pw_ship_method is multi-select So back to my question, how can I select a record base on one of the value in the multi-select ? I hope it's possible
j
find the mapping table and join to it.