on 12-05-2006 12:49 PM
Hi,
While using the COM API to fetch records, i am not able to access the attributes values of a associated taxonomy table.
I am add the taxonomy filed to the ResultDefinition and i am able to get the list of attributes from the field. the AttributeEX contain the Attribute and the AttributeValue classes. i am able to see the attribute meta data but the AttributeValue only contain the method AttributeValueType.
How i can identify in my recordset what are the values of the associated taxonomy attributes for each record in the rs.
I have searched the forum but i didn't find the answer.
appreciate your help.
Thanks,
Noam
Cast the AttributeValueType to a string and then retrieve the attribute values based on the type:
foreach (AttributeEx prodAttribute in prodAttributes)
{
string attribType = prodAttribute.Values.Item(0).AttributeValueType.ToString();
if (attribType == "xcFeatureValueType")
{
GetLimitedFeatureValues(...,...,...);
}
else if (attribType == "xcCharacteristicValueType")
{
}
else if (attribType == "xcCoupledValueType")
{
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mike,
Thanks for the reply. As i understand, the GetLimitedFeatureValues return the list of available attributes values without relationship to the master record. how i can associate it to the master table recordset i am currently reading.
My goal is to get the attributes values for each recordset row.
Thanks,
Noam
Its relative to the search parameters.
If you wanted to retrieve attributes for a particular record you would do the following:
XCATCOMLib.AttributesEx prodAttributes = new XCATCOMLib.AttributesExClass();
prodAttributes = catalog.GetLinkedAttributes(PRODUCT_TABLE, CATEGORY_FIELD, productID, -1,false,null);
XCATCOMLib.Search search = new XCATCOMLib.SearchClass();
search.SearchTable = PRODUCT_TABLE;
XCATCOMLib.TableParameter lp = search.Parameters.NewTableParameter(PRODUCT_TABLE);
lp.RecordIDs.Add(productID);
//loop thru the attributes using the code from my other post
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.