<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to bulk retrieve attribute values in Windchill Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-bulk-retrieve-attribute-values/m-p/122010#M7729</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone who knows to to bulk retrieve attribute values?&lt;/P&gt;&lt;P&gt;To bulk load lots of attribute values from a single persistable you would normally write something like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;PersistableAdapter pa = new PersistableAdapter(p,null,Locale.US,null);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;pa.load(attributeNames);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;for(String attributeName : attributeNames){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; String attributeValue = (String) pa.get(attributeName);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However this only allows me to fetch attribute values for a single persistable at a time.&lt;/P&gt;&lt;P&gt;I'm looking at a way to extend the code to bulk load a collection of persistables instead.&lt;/P&gt;&lt;P&gt;Does anyone know if this is possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doing this by querying the database is quite easy but I would much rather use an existing API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Mar 2024 13:27:14 GMT</pubDate>
    <dc:creator>PeterWigren</dc:creator>
    <dc:date>2024-03-15T13:27:14Z</dc:date>
    <item>
      <title>How to bulk retrieve attribute values</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-bulk-retrieve-attribute-values/m-p/122010#M7729</link>
      <description>Hello!Anyone who knows to to bulk retrieve attribute values?To bulk load lots of attribute values from a single persistable you would normally write something like below:PersistableAdapter pa = new PersistableAdapter(p,null,Locale.US,null);pa.load(attributeNames);for(String attributeName</description>
      <pubDate>Fri, 15 Mar 2024 13:27:14 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-bulk-retrieve-attribute-values/m-p/122010#M7729</guid>
      <dc:creator>PeterWigren</dc:creator>
      <dc:date>2024-03-15T13:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to bulk retrieve attribute values</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-bulk-retrieve-attribute-values/m-p/122011#M7730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think PersistableAdapter has any constructor to take collection of objects. You can either write a QuerySpec to fetch all object and loop one by one to get the required attributes Or try using Info*Engine Webject to query objects with attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhushan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 14:17:14 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/How-to-bulk-retrieve-attribute-values/m-p/122011#M7730</guid>
      <dc:creator>BhushanNehe</dc:creator>
      <dc:date>2016-04-04T14:17:14Z</dc:date>
    </item>
  </channel>
</rss>

