Hi,

I'm looking for help to make mandatory condition like :

if I fill the input, then the combo box should select. but if input not fill, then the combo box can also not select.

Thanks.

Which type of application you are developing. Traditional or Reactive?

You can validate it on your onclick/ destination event (server action for traditional and client action for reactive). In this action just check if input is not blank then select should have value, if not then set valid property of the select widget to false and aslo set a validation message for it.

You have to add above condition before form.valid check. Follow below documentation link for more details

https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Forms/Validate_the_fields_of_a_form#Example_of_custom_validation

Hi,

give condition like below in mandatory field of combo box. It will make the combo box to be mandatory, if the input is given.


If(InputVariable<>NullIdentifier(),True,False)

 Regards,

Wasim Khan S

Nikhil Gaur wrote:

Which type of application you are developing. Traditional or Reactive?

You can validate it on your onclick/ destination event (server action for traditional and client action for reactive). In this action just check if input is not blank then select should have value, if not then set valid property of the select widget to false and aslo set a validation message for it.

You have to add above condition before form.valid check. Follow below documentation link for more details

https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Forms/Validate_the_fields_of_a_form#Example_of_custom_validation

Yes, I already made the validation like

if inputvar<>" " 

true: 

It can detect the input if blank or fill. But when I fix the error does not change any error.

Wasim Khan wrote:

Hi,

give condition like below in mandatory field of combo box. It will make the combo box to be mandatory, if the input is given.


If(InputVariable<>NullIdentifier(),True,False)

 Regards,

Wasim Khan S


combo box become mandatory not detect the inputvar

Ayu Andini wrote:

Nikhil Gaur wrote:

Which type of application you are developing. Traditional or Reactive?

You can validate it on your onclick/ destination event (server action for traditional and client action for reactive). In this action just check if input is not blank then select should have value, if not then set valid property of the select widget to false and aslo set a validation message for it.

You have to add above condition before form.valid check. Follow below documentation link for more details

https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Forms/Validate_the_fields_of_a_form#Example_of_custom_validation

Yes, I already made the validation like

if inputvar<>" " 

true: 

It can detect the input if blank or fill. But when I fix the error does not change any error.


Can you share your oml because ideally this should work.

Solution

Hi Ayu,


I tried to frame out the mentioned objective.

Check this: https://sbsam.outsystemscloud.com/UI_SampleApp/ComboBoxTask.aspx


1) Introduced an input widget 

Variable: InputValue (Text data type)

OnChange Destination: OnUserInputChange (mapped an handler for the onchange event)


2) Defined the Action flow for OnUserInputChange Screen Action as mentioned below:

Ajax Refresh the defined ComboBox control on every user input onchange event trigger.



ComboBox Mandatory Field conditional statement - 

If(Length(Trim(InputValue)) <> 0, True, False)


Hope this helps you!


Thanks & Regards,

Benjith Sam

Solution

Nikhil Gaur wrote:

Ayu Andini wrote:

Nikhil Gaur wrote:

Which type of application you are developing. Traditional or Reactive?

You can validate it on your onclick/ destination event (server action for traditional and client action for reactive). In this action just check if input is not blank then select should have value, if not then set valid property of the select widget to false and aslo set a validation message for it.

You have to add above condition before form.valid check. Follow below documentation link for more details

https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Forms/Validate_the_fields_of_a_form#Example_of_custom_validation

Yes, I already made the validation like

if inputvar<>" " 

true: 

It can detect the input if blank or fill. But when I fix the error does not change any error.


Can you share your oml because ideally this should work.

No, I can't. 

This is the situation: