As part of my requirement, I need to get application name by passing deployment uuid. I am trying a!deployment(uuid,"application") which is returning application id and name which is of type application.
I am not able to cast the application type object to string to fetch the application name.
Discussion posts and replies are publicly visible
Did you try tostring()?
ironically, wrapping the output of a!deployment in tostring() removes the rendered application name and just displays the application's internal ID, like "[Application:12345]".
Stefan Helzle said:Did you try tostring()?
it looks like you might have more luck calling the "name" property in a!deployment. It appears to output the entire "package name" (i.e. app & package plus time of deployment, as opposed to just the application name) but might be as close as you're gonna get here.
You cant try with this
a!localVariables(
local!tmp: a!deployment("cea12087-316a-4747-8b5a-8ff30e81e0fd","applications"),
local!idApp: cast(1,index(local!tmp,1)),
fn!getcontentobjectdetailsbyid(local!idApp))
Where you will receive all details about the application (or apps) included in the package
oh good point - i forgot about the content object details function. to simplify this a bit you can just wrap the output of a!deployment in "toInteger()" to pass into the content object by ID function.
And since Content Tools still (stupidly) just returns a flat string instead of dictionary/map/json, for some reason, we need to manually extract() the name from the result: