Home » Developer & Programmer » Forms » Validating Items - checking against Items in the same block. (6i Forms.)
Validating Items - checking against Items in the same block. [message #357495] Wed, 05 November 2008 10:59 Go to next message
rm_mainframe
Messages: 8
Registered: October 2008
Location: Liverpool, UK
Junior Member
Hello,

I'm working with a form that contains Usernames and Real Names.

In this case, the Usernames are a PK field, so on the username item, I've added a when-validate-item trigger that checks against the table that I'm inserting into, as well as sys.user$.

My question is:
How do I validate the usernames against other usernames within the same block? They haven't been saved yet, as the "commit form" is last, so, the when-validate-item trigger doesn't see the duplicates, as it's looking at the external table and sys.user$

What's the best way to check?
I've tried turning on (yes) the Primary Key value in the property pallate, but it didn't have any effect. Is there an easy way?

Ron.

Re: Validating Items - checking against Items in the same block. [message #357503 is a reply to message #357495] Wed, 05 November 2008 12:21 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Looping through all records might be one way to do that.
Re: Validating Items - checking against Items in the same block. [message #357562 is a reply to message #357503] Wed, 05 November 2008 19:05 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
You could always decide to do the 'commit' as you go as the 'commit' is currently last and making your life difficult. Alternatively, do a 'post' or maintain a 'record_group' that you populate as you go and check against it.

David
Previous Topic: load image into database from client machine
Next Topic: XML
Goto Forum:
  


Current Time: Sun Dec 04 06:51:26 CST 2016

Total time taken to generate the page: 0.13879 seconds