cancel
Showing results for 
Search instead for 
Did you mean: 

Agentry file download to nested collection?

Former Member
0 Kudos

I have a workorders object with a nested collection called Images.  In the read steps for Workorders, I populate the images collections with data from the database, but when the File document step runs to bring the actual file image down, the "object" being referenced is the Workorder object. I've echo'd out <<object.OrderID>> and <<object.CrewID>> in the batch file, which are both on the workorder object and they are populated.  When I echo out the <<object.FileName>> which is part of the Image collection, I see a flunky error.  The read steps on the Image object do not get run because its part of another collection under Main. 

Is there a way to bring files down on nested collections?

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Heather,

I'm not sure I follow your object structure.  Is this correct?

Workorders (collection)

     |-> Images (collection)

          |-> FileName (property)

When you fetch runs I would expect it to populate the Workorders collection and via another step probably populate the metadata for the Images collection by using the Read Into: property of the fetch step definition.

Then in your Workorders read step you would define the step to Run Once per Collection Object to get the attachment and store it in the Images using Read Into Images.  Because your context is now the Images collection object your <<object.FileName>> reference should correctly resolve.

--Bill

Former Member
0 Kudos

Thanks for the info... My setup is that i have a workorders collection and an images collection within that workorders collection.  I have 2 read steps on the workorder collectino.  1 to fetch the image details from the databse and the other to download the image from the server.  I was missing the READ INTO IMAGES on the download step.  It works great now.  thank you.

Answers (0)