cancel
Showing results for 
Search instead for 
Did you mean: 

multiple=true iterate in a WebScript

lpgc
Champ in-the-making
Champ in-the-making
Hi, ive defined a new aspect that includes


<multiple>true</multiple>
and im trying to access and iterate it from a webscript with no sucess. The aspect is defined as:


<aspect name="building:actions">
   <properties>
   </property>
      <property name="building:need">
      <type>d:boolean</type>
   </property>
   </property>
      <property name="building:worker">
      <type>d:text</type>
   </property>
   <property name="building:floor">
      <type>d:text</type>
      <multiple>true</multiple>
   </property>
   <property name="building:action">
      <type>d:text</type>
      <multiple>true</multiple>
   </properties>
</aspect>
and my webscript:


${result.properties['building:need']?string} // works
${result.properties['building:worker']} //works
${result.properties['building:floor(0)']} // doesnt work
${result.properties['building:floor[0]']} // doesnt work
Right now i cant even access a  single element directly, so i cant try to iterate it 😞

Any ideas ??  :?:

Thanks in advance for any help  :idea:
2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

your access to the multiple property is not correct. The correct way in FreeMarker is as follows:


${result.properties['building:floor'][0]} // should  work

Regards
Axel

lpgc
Champ in-the-making
Champ in-the-making
Thanks !

Totally missed that one  :shock:  …