How to validate an entered value against a sql table on submit click event in k2 SmartForms?

  • 21 March 2016
  • 2 replies
  • 0 views

Badge +2

Hello,

 

I just need to know the simplest way to validate an entered value (text box) against a sql table on submit click event in k2 SmartForms?

 

Thank you in advance,

Naser


2 replies

Badge +10

I'm not exactly understand what exactly do you mean with validate.... 

 

But from the comparison point of view... basically I can see a loop trough a Table. the table has his own SMO. 

 

Basically once a text field is entered and on click a rule will loop trough this SMO and check for each of the records.

 

Depending of what you want [ Validate ] Equal, Not Equal, Greaters Than, LessThan... Older Than... etc....

 

You will return a result, perhaps another action... that could be rendered with Unbounded Rules.

 

Check this post, I think might help you to get the idea:

http://community.k2.com/t5/K2-blackpearl/Is-it-possible-to-compare-two-SMOs-Loop-trough-all-items-and/m-p/87694#M27254

 

Hope this helps Dino.

Badge +2

Thanks again Dino. I ended up have an advance condition to check if entered value match the value in the table through SmartObject. Appreciate the input.

 

13295i4E1B916C88927C93.jpg

 

 

Naser,

Reply