find job repository by variable

Post Reply
b.schuring
Newbie
Posts: 5
Joined: Tue Jun 07, 2016 6:51 pm

find job repository by variable

Post by b.schuring » Thu Jul 30, 2020 3:20 pm

Dear all,

Is it possible to find a job repository with a file variable en then use this hierachy to inject a file?

for example:
I've got a folder structure like this:

Year
Customers A
Customer A1
-Projects
-- Project 1
-- Job A {rid}
-- folder 1
{rid} PDF FILE
-- folder 2
-- Job B
-- Project 2
-- SubProject
-- Job A{rid}
-- folder 1
{rid}PDF FILE
-- folder 2
-- Job B
-Projects
-- Job A
-- folder 1
PDF FILE
-- folder 2
-- Job B
Customer A2 etc etc
Customers B and so on....

As a input i've only got the {rid} of a file then I have to search on different levels where the a folder got a {rid} en pickup the file from folder 1. But t
Is this possible? Hope that there is some-one that can help me!

Greeting Bas

freddyp
Advanced member
Posts: 543
Joined: Thu Feb 09, 2012 3:53 pm

Re: find job repository by variable

Post by freddyp » Fri Jul 31, 2020 9:15 am

It is always a good idea to have a look in the Enfocus Appstore. This app will probably solve your problem:
https://www.enfocus.com/en/appstore/pro ... t-wildcard

b.schuring
Newbie
Posts: 5
Joined: Tue Jun 07, 2016 6:51 pm

Re: find job repository by variable

Post by b.schuring » Tue Aug 04, 2020 12:21 pm

Thanx Freddy. I tried the app but for good use I need to know the job repository and the problem is I don,t know the right level of the Job Repository so I need to go more levels up to find the right parent folder.

Can I use the app with a reg expression for the job repository?

laurentd
Member
Posts: 25
Joined: Wed Mar 13, 2019 2:06 pm

Re: find job repository by variable

Post by laurentd » Tue Aug 04, 2020 6:12 pm

Inject Wildcard does not search for files recursively yet, this is something we will investigate.
Nevertheless, you can use single-line text with variables for the job repository path, if you know where to search of course.
Solution Architect @ Enfocus

laurentd
Member
Posts: 25
Joined: Wed Mar 13, 2019 2:06 pm

Re: find job repository by variable

Post by laurentd » Thu Aug 13, 2020 3:06 pm

Hi Bas,
Inject Wildcard v3 is available from your favourite Appstore!
And yes it does recursive search in the job repository, also with optional parent hierarchy filtering!
And, by the way, this is the first app in the Appstore written in Node.js, supported by the new scripting engine in Switch 2020!
https://www.enfocus.com/en/appstore/pro ... t-wildcard
Solution Architect @ Enfocus

b.schuring
Newbie
Posts: 5
Joined: Tue Jun 07, 2016 6:51 pm

Re: find job repository by variable

Post by b.schuring » Fri Oct 02, 2020 12:26 pm

Hi Laurent!

The new wildcard works like a charm. I've got the files that I need but is het also possible to get the Job.Hiearchy of the injected files?

Hope you van help.
Thanks in advance!
Bas

laurentd
Member
Posts: 25
Joined: Wed Mar 13, 2019 2:06 pm

Re: find job repository by variable

Post by laurentd » Fri Oct 02, 2020 12:37 pm

Hi Bas,

Happy you like the new version, it is now very powerful indeed.

Yes you can get the job hierarchy for each injected file or folder, as explained in the app documentation:
Inject Wildcard stores the following private data in the internal job ticket for each injected job file or folder in order to easily assemble the job further in the flow:
• <key>.JobID
• <key>.JobName
• <key>.NumFiles
• <key>.FilePath
The default value of the private date key is “Ungroup”, so that if you use the Assemble job element with the Ungrouped job scheme, all injected file(s) and or folder(s) are assembled automatically, even with creation of the hierarchy if you increase the Subfolder levels property of the Assemble job element.
There is also another way to attach the hierarchy info to the injected file(s) and/or folder(s): use the Set hierarchy path element, and set the hierarchy Path segment 1 property to the “Ungroup.FilePath” job private data: [Job.PrivateData:Key="Ungroup.FilePath"]
See the example flow available on the app description’s page.
Solution Architect @ Enfocus

b.schuring
Newbie
Posts: 5
Joined: Tue Jun 07, 2016 6:51 pm

Re: find job repository by variable

Post by b.schuring » Fri Oct 02, 2020 4:05 pm

Found it! Thanks!

Post Reply