VMware Cloud Community
TimDScott
Enthusiast
Enthusiast

Display Value / Id in dynamic dropdown

Hi All,

I'm using an action to populate an array of strings for a workflow input's presentation configuration:

pastedImage_0.png

pastedImage_1.png

What I would like to do is keep the "one" & "two" as the display values, but also define 1 & 2 as the ids that are sent to the workflow.

All I can think of is appending the ids to the display values like "One [1]" then using string manipulation to extract the value in the workflow.

Surely there must be a better way?

Thanks,

Tim.

Reply
0 Kudos
5 Replies
daphnissov
Immortal
Immortal

You need to use the vRO type properties to do this. Use search and see some doc examples for how to code it up. It's not difficult.

Reply
0 Kudos
TimDScott
Enthusiast
Enthusiast

Hi,

Thanks for getting back to me!

I did see an answer that mentioned properties, I configured my action to return a property data type, but was not sure how to configure the presentation?

If I set the input type to properties, the "predefined list of elements" option is not available when configuring the presentation.

Do you have an example of the input type / presentation config?

Reply
0 Kudos
daphnissov
Immortal
Immortal

The output type will need to be properties. Input can be anything. Then it depends on your JS to populate the properties. This is really a vRO issue (not vRA) and so you'd have better visibility if it goes in the vRealize Orchestrator sub-forum.

Reply
0 Kudos
TimDScott
Enthusiast
Enthusiast

So has anyone got any ideas if it's possible to get the VRO presentation to work with an action that returns a property type?

Or is this only possible via custom forms in VRA?

Thanks!

Tim.

Reply
0 Kudos
iiliev
VMware Employee
VMware Employee

Hi Tim,

I don't think this will work in pure vRO presentation. But I suppose you can use a slightly different approach; eg. one action can return an array with the display values to be shown in the UI, and another action to contain the mapping between keys and values and return the key matching a given value.

Reply
0 Kudos