Page 1 of 1
Create folder tree dynamically from XML
Posted: Fri Nov 22, 2024 1:37 pm
by vernonvd
I am trying to create a folder structure hierarchy in Switch using information from an incoming XML.
I can achieve this with the "Create Job Folder" app. However, the problem I am facing is that the JobPartID varies from XML to XML. One XML might have 2, while another might have 7. How can I achieve this dynamically?
Structure example
Client Name
XML
Client Info
JobPartID - 01
JobPartID - 02
Re: Create folder tree dynamically from XML
Posted: Fri Nov 22, 2024 4:43 pm
by rhd_ole
vernonvd wrote: ↑Fri Nov 22, 2024 1:37 pm
I am trying to create a folder structure hierarchy in Switch using information from an incoming XML.
I can achieve this with the "Create Job Folder" app. However, the problem I am facing is that the JobPartID varies from XML to XML. One XML might have 2, while another might have 7. How can I achieve this dynamically?
Structure example
Client Name
XML
Client Info
JobPartID - 01
JobPartID - 02
I've done something similar where I wrote the path from the XML to privatedata such as 'path_structure'. eg: folder/path/to/folder. In my case I wanted each within the parent so I used the 'path_structure' as the segment 1 hierarchy Path, and then connect that to Archive Hierarchy. The result would be the proper structure. I would have to test to see if it will work to create folders not within the parent of each folder.
Otherwise I'd prob write a python script since I know it the best and have that dynamically create the folders based on the XML.
Re: Create folder tree dynamically from XML
Posted: Mon Nov 25, 2024 2:28 pm
by tdeschampsBluewest
You can still create a loop with retry-it app?
It's not the most efficient way if you have a lot of traffic, but it does the job.