How to validate lookup control linked with a mandatory field?


Userlevel 2
Badge +3

Dear All:

I'm just now very confused with the validation of a lookup control. I've tried a lot of formulas but they don't work. Here is:

I have one lookup control linked with a mandatory field:

215336_pastedImage_1.png

"ZonaSubzona" is mandatory field:

215337_pastedImage_2.png

  • Without validation rule, in you don't choose an item in the lookup, the field will be empty and nothing happens.
  • Using a validation rule in the lookup control, like:

215338_pastedImage_3.png

(esnuloOEstaVacío means IsNullOrEmpty)

  • Another formula like {Self}=="", it doesn't work
  • Using validation into control properties, it doesn't work

If someone can help me I promise to invite him a beer here in Spain...

Have a nice day!


2 replies

Userlevel 5
Badge +14

approach with IsNullOrEmpty formula is proper approach and should work.

make sure the validation rule is assigned to the (proper) control.

try to add calculated value control on the form and set its formula just like for validation rule (replace Self with respective named control reference). check how does it evaluates at runtime.

check develeper console for any errors reported.

Userlevel 2
Badge +3

Dear Marian, Finally I get the error. sad.png It's not related to the field validation but I'm using "Save and Continue" instead of "Save and Submit" because I want to continue int the same form before save. 

With Save and submit all validations work fine.

Thank you very much

Reply