Feed the method with an itemid and the attribute name and get back the value of the attribute (if it exists)
{
inventTable InventTable;
EcoResProductAttributeValue ecoResProductAttributeValue;
EcoResAttribute ecoResAttribute;
EcoResValue ecoResValue;
select InventTable where InventTable.itemid == _itemId
join RecId from ecoResProductAttributeValue
where ecoResProductAttributeValue.Product == InventTable.Product
join Name from ecoResAttribute
where ecoResProductAttributeValue.Attribute == ecoResAttribute.RecId &&
EcoResAttribute.Name == _attributeName
join ecoResValue
where ecoResValue.RecId == ecoResProductAttributeValue.Value;
return ecoResValue.value();
}
No comments:
Post a Comment