Skip to main content
March 14, 2024
Question

How to get application name from deployment uuid?

  • March 14, 2024
  • 6 replies
  • 0 views

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. 

    6 replies

    stefanhelzle0001
    Brainy
    March 14, 2024

    Did you try tostring()?

    mikes0011
    Brainy
    March 14, 2024

    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]".

    Did you try tostring()?
    The Expression Guru
    mikes0011
    Brainy
    March 14, 2024

    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.

    The Expression Guru
    davidj137213
    Brainy
    March 14, 2024

    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

    mikes0011
    Brainy
    March 15, 2024

    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.

    The Expression Guru
    mikes0011
    Brainy
    March 15, 2024

    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:

    The Expression Guru