Get all items who’s inventory model group is negative inventory flag checked and has a inventory dimension group with the flag inventColourId Yes
InventTable inventTable;
InventModelGroup inventModelGroup;
InventDimGroup inventDimGroup;
inventColor inventColor;
;
while select inventTable
join inventModelGroup
where inventModelGroup.ModelGroupId == inventTable.ModelGroupId
&& inventModelGroup.NegativePhysical == noyes::Yes
join inventDimGroup
where inventDimGroup.dimGroupId == inventTable.DimGroupId
join inventColor
where inventColor.ItemId == inventTable.ItemId
&& inventColor.InventColorId != ’ ’
{
info(strfmt("%1",inventTable.ItemId));
}