VMware Cloud Community
etsvmware
Contributor
Contributor

DropDown External Value Question

Apologize for the simple question, I've attempted to do the research manually but I am missing a clear designation on one point of confusion.

If I want to create a custom action to be used as a set of external values within an XaaS form drop down menu, I should create my action type as "array/string". However, if I predefined my XaaS drop down, I can supply a key/value hash. Can I return a key/value hash from an action such that I can control visible name and returned value per entry?

As a follow up, Is there any specific document or place which lists acceptable values types per element used?  Sort of like how the EBS gives me a nice overview of schema.

Any help would be appreciated, thanks.

Tags (4)
7 Replies
xian_
Expert
Expert

"Can I return a key/value hash from an action such that I can control visible name and returned value per entry?"

I have the same question. What should be the return type of that action?

daphnissov
Immortal
Immortal

Should be of type Properties that you can control from the vRO action responsible.

0 Kudos
xian_
Expert
Expert

Unfortunately I cannot select Properties type:

xaas dropdown type.png

0 Kudos
daphnissov
Immortal
Immortal

Properties is a vRO return type. I don't know what XaaS form calls that, but they can be returned.

0 Kudos
xian_
Expert
Expert

I skimmed through the list but cannot see the corresponding vRA type.

If I use predefined values, I get this after exporting:

              dataType:

                type: "primitive"

                typeId: "STRING"

              displayAdvice: "DROPDOWN"

              permissibleValues:

                type: "static"

                customAllowed: false

                values:

                - underlyingValue:

                    type: "string"

                    value: "value1"

                  label: "label1"

                - underlyingValue:

                    type: "string"

                    value: "value2"

                  label: "label2"

0 Kudos
Lakshika
Contributor
Contributor

I have same question, Have you find the solution to this.

0 Kudos
xian_
Expert
Expert

See https://kuklis.github.io/cma/post/custom-form-dropdown-external-source/

Not sure if it works with vra7 XaaS (the original question is quite old) but with vra8 the above method should work (as XaaS use the same CF engine).