scuffe82
Contributor
Contributor

vRO Custom input validation in XaaS

Hey All,

  I was attempting to extend a vRO custom validation into vra today and ran into a glitch with it. When i run the workflow in vRO with the validation defined on the presentation layer it works exactly as planned. When i wrap that workflow into a XaaS blueprint the results i get are the same as if i don't provide the variable in vRO. The general layout is:

Custom action to search AD for a computer account. I've tried both the ActiveDirectory.searchExactMatch and the ActiveDirectory.getComputerAD methods with the same results. The current action is:

var computerAccount = ActiveDirectory.searchExactMatch('ComputerAD',searchComputerAccount);

for (i in computerAccount){

  if (i != ""){

  return "object already exists";

  }

}

return null;

I created a computer account named test.

The results in vRO are:

vro-1.JPG

vro-2.JPG

Now i move into vRA and add the workflow as a XaaS blueprint. No matter what i type in the box it always returns the object already exists message.

vra-1.JPG

I tailed server.log and catalina.out and neither gave any clues as to whats going on.

0 Kudos
3 Replies
scuffe82
Contributor
Contributor

I was able to get miminim characters, maximum characters, mandatory, and regex working during my testing but not custom

0 Kudos
hdo0917
Enthusiast
Enthusiast

Try

for each (i in computerAccount)

to see if that works.

I have a question on what settings you had in vRA/vRO to have the error popup on top of the textfield? I tried different settings but cannot make it show up in vRA (it works in vRO for me).

Thanks,

  - Huy

0 Kudos
vMarkusK1985
Expert
Expert

Hi,

I learned during my XaaS dev that vRO custom validation really sucks with vRA...

Might you please test something completeley different, like "123456".

Kind regards,

Markus

https://mycloudrevolution.com | https://twitter.com/vMarkus_K | https://github.com/vMarkusK
0 Kudos