The only approach I can think of is something like...
# suitescript
j
The only approach I can think of is something like this
WHERE ', ' || BUILTIN.DF(item.custitem_subclassification) || ',' LIKE '%, <name_of_my_subclassification>,%'
t
@jen When you create a MultipleSelect field, the values are actually stored in a "map" table that NS creates automatically. For example, if you were to create a custom item field with an ID of "CustItem_MS_Test" then it will create a table named "MAP_Item_CustItem_MS_Test." If that custom field is based on Customer records, then the query to join everything and filter on a value might look like this:
SELECT
Item.ID,
Item.custitem_ms_test,
Customer.CompanyName
FROM
Item
INNER JOIN MAP_Item_CustItem_MS_Test AS Map1 ON
( Map1.MapOne = Item.ID )
INNER JOIN Customer ON
( Customer.ID = Map1.MapTwo )
WHERE
Item.ID = 18
-- AND Map1.MapTwo = 2615
Does that help?
One more thing... If you're in 2020.2, or the release preview, you can see that funky "map" table in the new Records Catalog tool. It's available via the Setup menu.
j
Do you know if this can be used to join Items to Item Options?
and yes that totally helps
not on 2020.2 yet, just requested Release Preview
(it’s annoying that we don’t get that automatically anymore)
t
Are you trying to join child items back to their parents?
I suspect the reason that they don't automatically spin up release preview instances is that not many customers actually bother with them. We're probably the exception.
Nevermind... I re-read what you originally asked. Try something like this:
Copy code
SELECT
	Item.ID AS ItemID,
	Item.FullName,
	Item.Description,
	SubClass.Name AS SubClassName
FROM
	Item
	INNER JOIN MAP_item_custitem_subclassification AS Map1 ON
		( Map1.MapOne = Item.ID )
	INNER JOIN CustomList_Item_Subclassification AS SubClass ON
		( SubClass.ID = Map1.MapTwo )
WHERE
	Item.Parent = 4152
j
No sorry it’s a related question, I would like to know which itemoptions are used by which items and viceversa
itemoptions is also a multiselect