VMware Cloud Community
orian
Hot Shot
Hot Shot

Vra 8.6 - read workflow's datagrid_id values

is there any way to read values from 'generic elements' like "datagrid" fields in  vro 8.x script code?

 

in the image attached blow, i'm asking the user to list his future vm's system disk and additional disks.

after the user sumbit the form, i would like to traverse through the datagrid and read the disks specified

i've tried worklow.currentworkflow.getinput()/ get output() get attributes() with no success

i've trid system.getcontext().getparamters() with no success.

any help will be appreciated 

 

datagrid.JPG

 

0 Kudos
3 Replies
j_dubs
Enthusiast
Enthusiast

You should be able to access these form controls from the InputProperties->requestinputs properties block.

 

 

0 Kudos
orian
Hot Shot
Hot Shot

i have no success.

do you have any code sample?

0 Kudos
xian_
Expert
Expert

I presume you want to create an XaaS out of a vRO WF.

Just created a workflow with a disks input, type: Array/CompositeType(label:string,size:number):mydisk

Then I created the input form within vRO by dragging the input to the canvas:

xian__0-1637272161554.png

I imported the WF into vRA, and filled out the form:

xian__1-1637272249218.png

And the logs:

2021-11-18 22:51:17.106 +01:00 INFO__item_stack:/item1
2021-11-18 22:51:17.109 +01:00 INFO [ { "size": 5, "label": "disk1" }, { "size": 10, "label": "disk2" } ]
2021-11-18 22:51:17.113 +01:00I NFO__item_stack:/item0

 

 

0 Kudos