Forum Discussion
6 Replies
- Zahar_ChernovCreator IIJasbir, Every Aras Item object includes the full collection + the item itself. So when you access item at specific Index you can:
- Access the item itself by using Aras methods (like getProperty() or setProperty())
for example this will return value of the property item_number:
item_collection.getItemByIndex(0).getProperty("item_number")
- Access the XmlNode behind this Item
for example this will return value of the property item_number using Xml:
item_collection.getItemByIndex(0).node.SelectSingleNode("item_number").InnerText
- Access the XmlDocument of the Collection
item_collection.getItemByIndex(0).dom
- Access the item itself by using Aras methods (like getProperty() or setProperty())
for example this will return value of the property item_number:
- dlindingerCreator II think you could also do something like this Item returnItem = item_collection.getItemByIndex(0); return returnItem
- Former_MemberAccelerator III@dlindinger : Thanks for your input, I tried this but it is also giving me whole list of items rather than the one present at node 0. @Zahar : Thanks for your input, but is there any way I can return full Item rather than specific properties, as want all the properties inside it.
- rpmengelIdeator II was able to reproduce the same behaviour. In order to get the single item returned I was successful with this line. return this.getInnovator().getItemById(item_collection.getItemByIndex(0).getType(), item_collection.getItemByIndex(0).getID());
- Zahar_ChernovCreator IIJasbir, As I have mention in my previous answer using following syntax will return you specific Item in collection (or actually it's XmlNode representation):
item_collection.getItemByIndex(0).node - Former_MemberAccelerator IIIThanks Guys! It worked..