Servoy Based Validation/Verification

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

Servoy Based Validation/Verification

Postby MSibai » Sun Jan 28, 2007 8:25 am

Hi,

What I can see in Servoy, that is after reading the database schema, the field attached to will blindly inherit the database field properties, thats cool, but it will be great to have an intermediate layer where Servoy can do more Validation/Verification before going to the database.

Simple Example:
if I have a database field
name varchar(50) NULL

In one form I want this field to be Optional, so no problem here.
In the second form I want this field to be be required, so I have to write a code.
in fact in the second option it will be great to mark the field property called required(Yes/No).

Plus, Servoy should have a set of pre-defined error messages, saying this field is required, not just "cannot save form data"

Mohamad Sibai
User avatar
MSibai
 
Posts: 145
Joined: Tue Dec 05, 2006 7:17 am
Location: Saudi Arabia

Re: Servoy Based Validation/Verification

Postby Robert Huber » Tue Jan 30, 2007 12:28 pm

Hi Mohamad

As far as I can tell, if you define an attribute of an entity (implemented column in a table) as mandatory, it IS generally mandatory for all input. In the database design you set all requirements what attributes make up at least for the given entity and are able to also specify some optional attributes (some literatue still says that should be avoided and associated with an entity where it's a mandatory attribute).
You should not try to change the database definition in an intermediate layer (as you call it). The database has to model the relevant real world part for your problem and the forms are just views/input system to it.

Just my 2 cents :-) Best regards, Robert



MSibai wrote:Hi,

What I can see in Servoy, that is after reading the database schema, the field attached to will blindly inherit the database field properties, thats cool, but it will be great to have an intermediate layer where Servoy can do more Validation/Verification before going to the database.

Simple Example:
if I have a database field
name varchar(50) NULL

In one form I want this field to be Optional, so no problem here.
In the second form I want this field to be be required, so I have to write a code.
in fact in the second option it will be great to mark the field property called required(Yes/No).

Plus, Servoy should have a set of pre-defined error messages, saying this field is required, not just "cannot save form data"

Mohamad Sibai
Robert Huber
7r gmbh, Switzerland
SAN Developer
www.seven-r.ch
User avatar
Robert Huber
 
Posts: 1239
Joined: Tue Aug 23, 2005 6:52 pm
Location: Schaffhausen, Switzerland

Postby MSibai » Tue Jan 30, 2007 1:29 pm

Thanks Robert,

Infact I do not want Servoy to change the database properties ...
All what I want is to attach a property variable to every editable field (on the code layer) and upon save a function will check if that field is required and contains no value, an error will be prompt.

now this is regardless wither it is mandatory or not..

I other scenario, I have a table for user registration with two levels free and paid. The table contains Credit card information which are mandatory is the user tried to register as paid service.
I know that there is a work around that I can develop a quick function on save ..
but I need two different forms for each level ...

this is a simple scenario , and I can survive without having this feature, but it will be great to have such feature ...


This is too close to the field formatting option ... for example Servoy does not rely on the database to enforce certain format of the date .
Mohamad Sibai
http://www.Nothom.Com
User avatar
MSibai
 
Posts: 145
Joined: Tue Dec 05, 2006 7:17 am
Location: Saudi Arabia

Postby Harjo » Tue Jan 30, 2007 2:24 pm

As far as I know, column/table validation is comming in Servoy 3.2
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Postby Jan Blok » Tue Feb 06, 2007 11:03 am

Correct, it also will report with distinct error codes into the solution exception handler
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 11 guests