Normal Topic restrictions (Read 1274 times)
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
restrictions
Feb 17th, 2004 at 7:11pm
Print Post Print Post  
I want to set data entry restrictions on LE values, but only if there is data in the field. Does that mean I will have to add LE programming as opposed to setting Restrictions?
  
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: restrictions
Reply #1 - Feb 17th, 2004 at 8:08pm
Print Post Print Post  
It depends on the type of restrictions but if you have one of the restrictions as ok to be empty,  then I think, it should work. e.g

=; BC; BCPPO; United;
« Last Edit: Feb 19th, 2004 at 5:35am by Bharat_Naik »  
Back to top
 
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: restrictions
Reply #2 - Feb 17th, 2004 at 9:48pm
Print Post Print Post  
newp, that didn't work. thanx anyways =)
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: restrictions
Reply #3 - Feb 17th, 2004 at 10:32pm
Print Post Print Post  
Works for me. What kind of field/LE are you in? Are you in a subform, if so - table or form view?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: restrictions
Reply #4 - Feb 17th, 2004 at 11:34pm
Print Post Print Post  
I am in a form, LE is text. It is for a postal code field: if there is data, it should contain two characters. I had my restriction as: = ; ??

I suppose that restriction is somewhat of a paradox, but I only want an error message if data has been entered, otherwise, let the record be saved.

  
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: restrictions
Reply #5 - Feb 18th, 2004 at 12:38am
Print Post Print Post  
I tried the above formula in Q&A and Sesame both. In Q&A, it works as expected but not in Sesame.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: restrictions
Reply #6 - Feb 18th, 2004 at 1:23pm
Print Post Print Post  
What did it do in Sesame?

I just tried it and it worked exactly as I expected. I put in: "=;??" and it warned me if I put in any characters, but less than or more than two. It doesn't warn me if I put in two characters or none.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: restrictions
Reply #7 - Feb 18th, 2004 at 1:54pm
Print Post Print Post  
It works for me also. In Q&A, you get the message as soon as you exit the field and in Sesame you get the feedback when you save the record and as I was just testing and did not get the message while exiting LE, just did not see any need to save the record....  it struck me after reading your post that it worked for you as to what I was doing wrong and the difference of feed back methods.  Hopefully, now I would not forget this difference. I believe FPGroup also got confused and came to erroneous conclusion that the code did not work in Sesame. Thank you.
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: restrictions
Reply #8 - Feb 19th, 2004 at 4:03am
Print Post Print Post  
Quote:
I had my restriction as: = ; ??

FSGROUP, You need to remove the space after the equal sign, like so: "=; ??" or "=;??" or "??; ="

A space after other restrictions seems to be OK,  But if there is a space after the equal sign, you will always get a message that states "...elements do not meet the required restrictions...", even if you enter a value matching one of the other restrictions.

Note that it also now asks for a required restriction rather than an optional restriction as when there is no space.

Mark, I think this must be a bug since it won't, under any condition, let you save a record if there is a space after the equal sign.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: restrictions
Reply #9 - Feb 19th, 2004 at 1:32pm
Print Post Print Post  
Only sort of... What is happening, if you check the log, is that there is a syntax error in the restriction. Rather than let the user enter data that doesn't meet the restriction, Sesame acknowledges that a restriction is intended by the database's designer - but since it has a syntax error, everything fails to meet it.

If you see any unusual behavior in a newly designed application, always check the log.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged