In provisioning you can add a Database Value as a Public or Action Variable.
I use this for many things however I have something I wanted to try. For this example I have a new managed software file extension i have added to ldapple3 and my scans are collecting the data. Lovely jubbly.
When i run a query on said file i can add the column for Path and see it in the console. Again all good.
Its that Path that i want to use as a Variable. And i am thinking there must be a way.
I could use a script to identify the file i want to replace and find its current location (as its a random path on each machine) and overwrite it but i am trying to see if the information i already have in the Database can be used. If so its a simple one action provisioning template with file copy action source \\server\file Dest %TESTVAR%
So the Database Query is.
"Computer"."Software"."Package"."FileName"="FILE.EXT"
I want this information.
"Computer"."Software"."Package"."FileName"="FILE.EXT"."Path"
So i Create a Public variable called TESTVAR with the Database Value above and try and call it in my provisioning Template.
I end up with (by design) extra Fields in my inventory Schema... So under Computer \ Software \ Package \ there is a new Inventory container called FileName with FILE.EXT and Path under it.. not good. But no result returned from the TESTVAR variable.
This is I am guessing because its a query string not a static Database value.
But can you get that "Path" value from the Database and use it as a Public Variable? Can you use a database query as a Database Value?
Where in the Database is the Managed software file path?
It may need some tinkering but as that "Path" is in the Database there must be a way to use it?
Anyone else wanted to do this? Or worked out how?