Solved

Validation of field

  • 13 December 2021
  • 2 replies
  • 237 views

Userlevel 3
Badge +5

We are validating a custom field which works but the user would like the ability to free type in the field as well as the list takes quite a while to load and they use this screen all day long. Is there any way to validate against a list without making the user pick from the list? 

Any advice would be appreciated. We are in IFS v9 

 

Regards, Patrick Naughton 

 

icon

Best answer by Charith Epitawatta 13 December 2021, 12:14

View original

This topic has been closed for comments

2 replies

Userlevel 7
Badge +31

Hi @pnaughton,

I am assuming  you have a persistent reference type custom field. In that case, you cannot free type and must use the LOV. If you do not mind losing the LOV, then you can create the custom field as a persistent text type field and use a custom event that will be triggered on insert/update to validate the value in the custom field.

The event could raise an error message when saving the record with an incorrect value for the field.

An example SQL:

BEGIN

IF (<some_condition>) THEN

IFSAPP.ERROR_SYS.Record_General('<LogicalUnit>','The value you have entered in the custom field does not exist in the LOV. Please enter a correct value and save.');

END IF;

END;

Hope this helps!

Userlevel 3
Badge +5

Thank you Charith for this feedback, this is very helpful. 

Thank you so much!

Best Wishes, Patrick