checking field of record on inserting [message #397860] |
Tue, 14 April 2009 04:32 |
m_najmi
Messages: 4 Registered: April 2009
|
Junior Member |
|
|
hi,everybody.
I want to creating some records,after inserting first record in next records i should check some field with last ones.
how can i store last records for checking with current record?
and in which trigger i should do it(for exp:when_validate_item) or etc.
may you help me,please?
thanx.
|
|
|
Re: checking field of record on inserting [message #397865 is a reply to message #397860] |
Tue, 14 April 2009 05:08 |
danish_fsd@yahoo.com
Messages: 38 Registered: February 2008 Location: Pakistan
|
Member |
|
|
Hi,
You can use global variables and assign them values when you save current record. And when you insert another record you can compare this with global variable. You can use ON-COMMIT trigger at form level.
Also you can get last record by writing Select Query from database and compare current record's attributes.
Regards
Danish.
|
|
|
Re: checking field of record on inserting [message #398313 is a reply to message #397865] |
Thu, 16 April 2009 00:35 |
m_najmi
Messages: 4 Registered: April 2009
|
Junior Member |
|
|
Hi.
Thanx for your response.
I have another question related with last one.please help me about it.
i want to insert some records in table by form interface,
and i dont want to save it record by record,i want to insert some record and at last i want to save it to insert on that table.
though when i still input data to records ,wanna check current record field with previous ones.i mean may be some untidy data i inputed in last ones,so how can i find the right place of current record data in inputed record to compare fields of it with last and next one?
Regards.
|
|
|
Re: checking field of record on inserting [message #398590 is a reply to message #398313] |
Thu, 16 April 2009 20:11 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
I suggest using a non-database block and not global values. The non-database block would have items that match those in your database block and by using a post-record trigger on your database block you would populate those items before going to the next record.
You would then be able to compare the new database record against its predecessor by comparing an item against its matching item in the non-database block.
I do not like your design philosophy and recommend that you reconsider it.
David
|
|
|