web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)
Answered

attribute name and attribute value question

(0) ShareShare
ReportReport
Posted on by 1,559

Hi Friends,

I am sure somebody have experience with Attribute name/Attribute value.

I want to figure out where are Attribute Value stored, there are EcoResAttributeValue, EcoResTextValue, EcoResTextValueTranslation tables, for example, attribute 'color', where its value stored, like 'black'.

It seems it's stored in EcoResTextValueTranslation, but, based on the relation/link, how can you find out attribute value based on attribute's id(recid).

Many thanks.

River

*This post is locked for comments

I have the same question (2)
  • Suggested answer
    Martin Dráb Profile Picture
    239,932 Most Valuable Professional on at

    I don't know much about it, but I see that EcoResAttributeValue has a relation to EcoResValue and EcoResTextValue is a concrete implementation of EcoResValue (table inheritance in action). The relation between EcoResTextValue and EcoResTextValueTranslation should be obvious,

  • Ganriver1 Profile Picture
    1,559 on at

    Hi Martin,

    That's what I thought at first. I have Demo data loaded.

    For example, for attribute 'color', from EcoResAttribute->EcoResAttributeValue->EcoResValue, I couldn't find anything,

    Also, I pick 'black' value from EcoResValue, couldn't go back to EcoRestAttribute based on relation.

  • Suggested answer
    Martin Dráb Profile Picture
    239,932 Most Valuable Professional on at

    If I open "Product attribute values" form, I see the value to be EcoResTextValue.TextValue. So the data source is EcoResTextValue in this case. I can't comment on your data in the moment.

    Take a look into the form; you'll see by yourself where the data comes from.

  • Ganriver1 Profile Picture
    1,559 on at

    Hi Martin,

    What is path to get to this form?

  • Verified answer
    Mariano Gracia Profile Picture
    on at

    As Martin says, you have a lot of inheritance here, first of all you have to start by AttributeType, you'll find this enum in EcoRSe Attribute table, based on this field, you can access the appropriate table, you will have to do something like:

    select firstOnly RecId, AttributeType from ecoResAttribute
                index hint RecId
                where ecoResAttribute.RecId == _ecoResAttributeRecId
                
            switch (ecoResAttributeType.DataType)
            {
                case AttributeDataType::TrueFalse   :
                    //access boolean values
                    break;
    
                case AttributeDataType::Integer   :
                    //access integer value
                    break;
    
                case AttributeDataType::Decimal   :
                    //acces real value
                    break;
    
                case AttributeDataType::Text   :
                    //acces text value
                    break;
    
                case AttributeDataType::DateTime   :
                    //access date time value
                    break;
            }


    once you have what you want, you can access the correct tables, for example, text values are found in EcoResTextValue, but the value for the attribute product is found in EcoResAttributeValue table, Attribute field contains the AttributeTable RecId, InstanceValue contains the EcoResProductInstanceValue RecId and Value contains the RecId from EcoResTextValue or EcoResBooleanValue or EcoResFloatValue and so on.

  • Ganriver1 Profile Picture
    1,559 on at

    Ok, I kind of get how this attribute worked.

    It seems to me, when a attribute value entered for a product/item, it's going to create a new record in EcoResValue, even it's same value again and again.

    For example, attribute 'color', if you set a 'color' attribute as 'black' for a car, it creates a new record, set for another car for same 'black' color, it creates new record regardless it's a same color as before.

  • Guy Terry Profile Picture
    29,013 Moderator on at

    Hi ganriver,

    Yes, that is what I found when importing some attribute values. A new record is created, even if that value already exists against another product.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sanhthosh.Kumar.K Profile Picture

Sanhthosh.Kumar.K 2

#2
Raed Salah Bzour Profile Picture

Raed Salah Bzour 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans