Normal Topic Request for an event (Read 388 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Request for an event
Dec 4th, 2007 at 5:52pm
Print Post Print Post  
Would it be possible to develop a "Form - On Form Save (or Commit)" event?
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Request for an event
Reply #1 - Dec 4th, 2007 at 5:56pm
Print Post Print Post  
Infinity wrote on Dec 4th, 2007 at 5:52pm:
Would it be possible to develop a "Form - On Form Save (or Commit)" event?

On Form Exit is tied to commit in most cases.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Request for an event
Reply #2 - Dec 13th, 2007 at 7:05pm
Print Post Print Post  
Here's my problem:  In my Customer database have an drop-down element, Checkcode, which fills with a concatenation of the customer Name, City, State and Customer Code when any of these elements changes.  The Checkcode element is used for a picklist used when searches and XLookups are done, and it fills the drop-down list On Retrieve Spec Open with this programming:
Code
Select All
var vCheckcodeLookups as string

// Populates the Checkcode combo box
IF @MODE() = 2
THEN
	{
	vCheckcodeLookups = @XListValues(@FN, "Customer!Checkcode")
	vCheckcodeLookups = @SortstringArray(vCheckcodeLookups,0)
	vCheckcodeLookups = @Replace(vCheckcodeLookups, "&", "\&")
	PopulateListElement(Checkcode, vCheckcodeLookups)
	} 



Groovy so far.

However, once the record is retrieved the pick list remains filled, and the user can select the element again, choose a different checkcode (representing a different customer record) and save the record, overwriting the correct checkcode for that record.

I have On Form Exit programming as follows:
Code
Select All
// Populates the CheckCode

If not Checkcode=(@lt(COMPANY,15) + " " + @lt(CITY,10) + " " + STATE + " " + @STR(CODE))
then
	{
	Checkcode=(@lt(COMPANY,15) + " " + @lt(CITY,10) + " " + STATE + " " + @STR(CODE))
	} 


Theoretically, this should change the Checkcode back to the original when the user saves and exits.  But it does not.

Any idea where I've missed the boat?
  

**
Captain Infinity
Back to top
IP Logged