validate an input in table records if has changes

validate an input in table records if has changes

  

Hi Outsystems,

can you validate an input in table records if has changes,

logic: if has changes validate the input inside the table records 

         if all is valid then save, else prompt a per field validation.


Thanks,

Julius

Hi Julius 

You mean whenever inputs inside your Tablerecords changes and if that changes are not valid, you need to show validations in every field one by one.

First you need to decide what is your success criteria and after that you can run this validations check logic inside foreach loop and check every field. There you can use valid and validation message property of widget to show validations.

Jun Jun wrote:

Hi Outsystems,

can you validate an input in table records if has changes,

logic: if has changes validate the input inside the table records 

         if all is valid then save, else prompt a per field validation.


Thanks,

Julius


Hi Julius,

You also can validate the changes via onchange event of your control. In this way you can validate changes at the time of change only.


Rgds




Narendra Maheshwari wrote:

Jun Jun wrote:

Hi Outsystems,

can you validate an input in table records if has changes,

logic: if has changes validate the input inside the table records 

         if all is valid then save, else prompt a per field validation.


Thanks,

Julius


Hi Julius,

You also can validate the changes via onchange event of your control. In this way you can validate changes at the time of change only.


Rgds




Hi Narendra Maheshwari,

the trigger should be when a user leaves a current row on a table records not on a per input onchange action.

is this possible?


Thanks,

Jun


Hi Julius,

It is not possible to have a trigger on a current row leave.

Hi Julius,

On leaving the "line" I think it is not possible...
But on leaving inputs, yes, it is. You can use the JavaScript event OnBlur or the OnFocusOut, for example.

But than you will have to deal with JavaScript.

Cheers.

Eduardo Jauch wrote:

Hi Julius,

On leaving the "line" I think it is not possible...
But on leaving inputs, yes, it is. You can use the JavaScript event OnBlur or the OnFocusOut, for example.

But than you will have to deal with JavaScript.

Cheers.

Hi Eduardo Jauch,

is there a way to trigger the save or validation logic when a user leaves a row in a table records, because the row needs to be validated first saving it to the database.



Hi Julius,

If row needs to be validated, you can do one thing when last input of the row is changed, you can call actions as mentioned above to validate all the inputs of that row and if there is any problem in any input, highlight that input field of that row.

Hope this solves your problem.

Thanks and Regards,

Suraj Borade