Base Object Method Prevents Adding Records
Thomas
totoole at rocko.lab.csuchico.edu
Fri Oct 22 20:17:39 CDT 2004
Hi all,
The following Base Object Method is causing trouble in VAPP.
if(ptr_parent_rcd = ptr_child_rcd,'False',if(ptr_parent_rcd >
ptr_child_rcd,concat(ptr_parent_rcd,'-
',ptr_child_rcd),concat(ptr_child_rcd,'-',ptr_parent_rcd)))
It applies to a table with the following fields:
ptr_parent_rcd (an ObjectPtr to one side of a many to many join)
ptr_child_rcd (an ObjectPtr to the other side of the many to many join)
This is a recursive many to many so the target of both ObjectPtrs is
the same, but they point to different RecIDs in the target table.
The Base Object Method's Unique property is set to true.
The purpose of the Base Object Method is to prevent duplicate records
from being added to the table.
If there is a record relating parent RecID 10 to child RecID 11, I need
to prevent another record relating
RecID 10 to RecID 11 from being created, regardless of which RecID is
in the parent column and which is in the child column.
So if we have a record:
ptr_parent_rcd ptr_child_rcd
10 11
We need to prevent the following record:
ptr_parent_rcd ptr_child_rcd
11 10
Furthermore, records where parent and child pointers are equal need to
be prevented. So I create one unused
record where this is the case, and the Base Object's Unique property
prevents any others.
The problem is, the Base Object Method will not allow valid records to
be added using the import method or the VAPP interface.
No error is returned. The import method runs, but the records are not
added.
The Base Object Method does not stop the make-new-record-with-data
method from adding valid records.
Any ideas much appreciated.
Thomas
More information about the Valentina
mailing list