VMware Cloud Community
JoJoGabor
Expert
Expert
Jump to solution

Actions linked to form fields

Is it possible to use a field on a XaaS blueprint so that it runs an action at any time other than when the form loads? I want the user to enter a hostname which then calls a workflow to go off and check that that hostname isn't already in use and another field on the form would say either AVAILABLE or IN USE to present the result of the workflow

Reply
0 Kudos
1 Solution

Accepted Solutions
drummoau
Enthusiast
Enthusiast
Jump to solution

If you bind the input to the action on one field, to the value of another field, the action will run when the bound property changes.

So

field -> Hostname -> Textbox

field -> Availability -> Textbox -> From external value -> Call action "availableHostname" with input "hostname" bound to field "Hostname"

Your action "availableHostname" in psuedocode would look like

// falsy statement to ignore empty hostnames and first form load

if(!hostname) {

  return "";

}

if(availabileConditionCheck) {

  return "AVAILABLE";

} else {

  return "IN USE";

}

You can prevent the action from running in the first place if you set your presentation using OGNL

View solution in original post

Reply
0 Kudos
1 Reply
drummoau
Enthusiast
Enthusiast
Jump to solution

If you bind the input to the action on one field, to the value of another field, the action will run when the bound property changes.

So

field -> Hostname -> Textbox

field -> Availability -> Textbox -> From external value -> Call action "availableHostname" with input "hostname" bound to field "Hostname"

Your action "availableHostname" in psuedocode would look like

// falsy statement to ignore empty hostnames and first form load

if(!hostname) {

  return "";

}

if(availabileConditionCheck) {

  return "AVAILABLE";

} else {

  return "IN USE";

}

You can prevent the action from running in the first place if you set your presentation using OGNL

Reply
0 Kudos