cancel
Showing results for 
Search instead for 
Did you mean: 

Validations in VC

Former Member
0 Kudos

Hi,

I need to validate an input field of a table at the UI level without having to invoke a web serveice just to validate it. For example, a "number" type column should accept data, say, less than or equal to 10000.

Somehow I am not able to achieve this in the Validation tab of the configure element panel of the column.

If anyone knows how to do this, please help me out.

Regards,

Gaurav.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

u need mandatory fileds validation , or input validation who has give less than 1000 thru an error message .

if this ur requirement send me reply we will do this .

Regards ,

venkat

Former Member
0 Kudos

Hi Venkat,

I have to indicate to the user that the value entered by him in the column in one of the rows is invalid (exceeding 1000 for example).

Any action should not allow him to go further till he enters a correct value there.

My requirement is similar to the case when u enter an alphabet in any row of a number column and trigger some action.

Regards,

Gaurav.

Former Member
0 Kudos

Hi ,

u r requirement is ur end has to enter the low value and high value if user enters 1000 in high value and 900 enters in the low value value then once u click on submit no action has to take right .

for this do the

click on submit button properties

click on disable - > condition functions like ISNULL(Bukrshigh<bukrslow ) .

take the fileds like which u want the value should be valid .

in this way u can disable the submit button until user enters the corrrect value okay .

Regards ,

venkat

Former Member
0 Kudos

Hi Gaurav,

Can you describe what happens when you try to use the Validation property in the input fields' configure tab? And what version of Visual Composer you're using?

I think, for your example (picking less than 1000 for a number) you would want to pick "is smaller" in the "Condition" column, 1000 in the "Value" column, and then add some custom error message. This seems to work fine for me. This condition is only checked when an event is triggered - it's not an immediate client-side validation like in the 7.0 version of Visual Composer.

Tell me if this helps you-

Eyal

Former Member
0 Kudos

Hi Eyal,

I am currently working on VC 7.1

Actually in my case the field whose value is to be vaildated is in a table but the validating action is on a form. How can I get validation to be done when the action on the form is triggered ?

Thanks and Regards,

Gaurav.

Former Member
0 Kudos

Hi Gaurav,

Put the validation condition on the control in the table, as described above. Then go to the control that triggers the action (in the form) and in the Define Action dialog, switch to the Validation tab. Chose, for Validation Scope, "Window". This means that before the action is triggered all the validation conditions in the window will be checked (the default is only to check validation conditions in the same view - the form)

Does this work for you?

Eyal

Former Member
0 Kudos

Hi Eyal,

Thanks. The validation is working with just one problem.

Only the selected row of the table is validated.However, my requirement is that if the user changes the value of an non-selected row,then also the error message should be displayed. In other words, the full column should be validated irrespective of being selected or not.

Do I need to change any property for this purpose?

Regards,

Gaurav.

Former Member
0 Kudos

Hi Gaurav,

In general, the only row that can be accessed (using dynamic expressions, like validation conditions) is the selected row. But one thing I don't understand is how the user changes the value of a different row without it being selected.

Can you attach a screenshot of your model, or perhaps an explanation of the flow that occurs? For example, do you want the action performed only if all the rows are less than 1000?

Eyal

Former Member
0 Kudos

Hi Eyal,

In my case, the table is populated using a BAPI .The column of the table is editable, so the user changes the value of this column in multiple rows without clicking 'Enter' each time he enters a value and without triggering the validating action. Now once he clicks on the validating action I have to validate all the values entered by him (for example, validating if all the values in that column entered by him are less than 1000 else throw an error message).

So, in this case how do I validate the column without selecting multiple rows?

Regards,

Gaurav

Former Member
0 Kudos

Hi Gaurav,

Unfortunately, it appears you've discovered a problem in VC 7.1 - that validation rules are evaluated on the selected row and not on the entire table (as was done in VC 7.0). A bug was opened on this problem, and I hope it will be resolved soon. In the meantime, if I can think of a workaround for you, I'll put it here.

Regards,

Eyal

Former Member
0 Kudos

Hi Eyal,

Thanks a lot.Do tell me if you have any suggestions.

Thanks,

Gaurav.

Former Member
0 Kudos

Thank You Eyal and Venkat,

I made use of an application service to accept the table as an input and perform the validations.

Thank you for your suggestions.

Regards,

Gaurav.