This is a combo vCAC / vRO question. Lets say I want to have a field on my ASD form, with a type string, and a presentation of Radio Button Group.
I can define manually a list of elements (value AND label):
What i want to do, is create this same behavior but use an external vRO action to define the list of values AND labels. So if i set my action to:
I can get the list to populate correctly, by returning a Array/String from the action:
The problem is, it sets the value and the label to the same thing. I want to have a value set to X and a label set to Y. What should my return type be in order to achieve this?
Is there documentation somewhere listing what each ASD form type (checkbox list, date & time, list, dual list, radio button group, search, tree, map) expects for a return type, when set to an external action, in order to properly populate the item on the form?
Thanks as always,
I haven't solved this exact issue, but as a workaround - you could always just treat them as labels and in the workflow being called by the ASD, go look up the corresponding value for the label? Not sure where the labels will be coming from eventually - looks like it'll be a list of load balancer pools though?
I could do lookups on the name, but for best practice I'd want the name of the Pool as the label, and the pool-id as the value. Reduces unnecessary iterations thru arrays to find the object by name, get the id, then do a get on the corresponding object ID.
This is all form based, so reducing the amount of delays in it updating is paramount.
Have you tried the vRO presentation direction? I am pretty sure on ASD form creation, it pulls across the vRO label for the initial label name(from memory). I am not sure if updating the label on the vRO side causes a change up in a published vRA SBP or RA. (I sort of doubt it.)
I am going to look into this as well. I also have a use case for changing the label during Form-onLoad (at a minimum) and will likely need it at some point for Form-onUpdate.
I will report back if I have any success. (unlikely)
any update on this issue?
I've got the same requirement.
My Action for the External Values field returns an Array of VC:VirtualMachine.
As result my drop down list is displaying some sort of object IDs:
Thanks for any help on how to define Labels different form the Values.
This is a different track, but for nearly everything I do with ASD related to objects, I am managing the requirements you both pose this way...
1. Objects as inputs on form load or form update is SLOW.
2. String Arrays (list of strings) is FAST.
3. In your action, instead of returning the list of objects for selection, return an array of string representing the NAME (label) of the object you are providing for selection.
4. Then on the workflow-end, during execution, either through another action or in the workflow itself... do a lookup of the NAME to get the object you want.
Basically in this fashion, you are able to leverage much-quicker-to-resolve-strings up on the ASD form... and they can be presented any way that you want... and you can then manage your execution based on string input.
Consider this representation of user... just ignore that it is an AD:User object... it can represent any object.
Consider the example workflow on the backend of this...
So I don't have a way to update the label programmatically and I think we would need a feature request in to make the capability exist for SLOW object lists (why bother in my opinion), but I am also not generally using Object lookups (in some cases yes). Strings are faster and backend workflow execution can have the allowances to take longer for a lookup of the object represented by the string input.
Imagine an action that does this ...
string  getOwnedVcVmNames(string ownerName)
== You can control what names go into the list that they pick. You can format it however you want. You can use the API to get the names... but if that is too slow, you can use database calls or whatever. You have options on list building with a String Array.
Followed by an action during workflow execution that looks like this....
VC:VM getVcVmFromName( string serverName)
== based on the name they selected, you get the object during workflow execution. While they drink a coffee, the object is looked up and used as the target.
I think that MOST ASD forms should follow this kind of format. String array labels and post lookup objects makes everything much easier to manage. This will be my primary method going forward. I am not going to rely on poor object label management in vRA... I don't recommend you do so either.
*** Edit: I missed merlinjim's comment of the same and your response James. I think the practice holds, however, There has to be a way for you to get the information as quickly as you get the objects. If you have the objects, you are doing one loop to get the name. You can also pre-store the object names in a DB table. Etc etc. This is the only way I have been able to get good information (the kind I want users to see) up into a form reliably.