4 Replies Latest reply on Mar 26, 2021 4:06 AM by Wilbert Gijssen

    Use attribute values in Export template

    Wilbert Gijssen Active Member

      We have an attribute in Product 360 to which we can assinging multiple values. In this example it has two: ingredient and Material.

       

      Screenshot attribute field

       

      These values are used in an export template. We both want to export these values and use them in conditions (e.g in a compare function.

       

      How do we access these values in the export?

       

      Attribute should be available with:

       

      {&Artikel.Attribuutwaarde van EP: Naar EP Artikeltype (Nederlands, DEFAULT)}

       

      But that is an empty variable.

       

      Example of one of the desired results, we would like to have a boolean in my export XML if Materiaal is set like in the example above.

       

      {?CreateXMLTagWithValue {?Compare {&Artikel.Attribuutwaarde van EP: Naar EP Artikeltype (Nederlands, DEFAULT)}, "Materiaal", "1", "0"}, "<Materiaal>?</Materiaal>"}

       

      results in:

       

      <Materiaal>1</Materiaal>

       

      There should be some samples in the SDK but I have no access to it and I can't find the 10.0 user guide either to see if this brings me any further.

        • 1. Re: Use attribute values in Export template
          Alex _ Guru

          Hi,

           

          you have to use the submodule attribute value that loop for every attribute value.

          You have the possibility to filter the attribute and keep in mind that if you use this module and you don't filter the query, you will loop for every attribute value (for each attribute) for this item.

          • 2. Re: Use attribute values in Export template
            Wilbert Gijssen Active Member

            Thanks.

             

            Works like a charm for single value attributes with ArticleAttributeValue.Value.

             

             

            <EPArtikelnummer>{&Attribuutwaarden.Attribuutwaarde (Nederlands, DEFAULT)}</EPArtikelnummer>

             

            I also have some multivalue attributes. If I check ArticleAttribute.Multivalue I only get a boolean indicating whether the field is multivalue.

             

            In need to get the value and to able to check if a certain value is set.

             

            Feels like I need another submodule to query and filter the multivalue attribute. But that does not exist. Been trying to create it myself without succes.

             

            Outputed all Properties of ArticleAttribute but non of them contains the values of the multivalue attribute.

            • 3. Re: Use attribute values in Export template
              Alex _ Guru

              Hi,

               

              if you don't know the value identifier, you have to prepare the statement before the print.

               

              please find the following  screenshot that show you wich submodule you should use:

               

               

              using this method you have the possibility to export also single value

              • 4. Re: Use attribute values in Export template
                Wilbert Gijssen Active Member

                This part is working,

                 

                 

                And if I do this for a single value attribute (Like EP Artikelnummer in the screenshot below) I can display the value.

                 

                <EPArtikelnummer>{&Attribuutwaarden.Attribuutwaarde (Nederlands, DEFAULT)}</EPArtikelnummer>

                 

                results in:

                 

                <EPArtikelnummer>1234</EPArtikelnummer>

                 

                 

                But the other attribute in the screenshot is multivalue. In this case two values selected (ingredient and Materiaal).

                 

                I am looking for a way the export the selected values and to evaluate whether for example material has been added.