Valentina Digest, Vol 22, Issue 18

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Oct 25 00:08:25 CDT 2004


On 10/25/04 12:02 AM, "Thomas" <totoole at rocko.lab.csuchico.edu> wrote:

>> Okay I see your task.
>> 
>>     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)))
>> 
>> Aha. So you try to build string that contains 2 numbers sorted in ASC
>> order.
>> I see. Correct.
>> 
>> I think you get problems because for cases when ptrs are equal you
>> produce
>> string 'False'.
>> 
>> This means that you can have 2 and 3 and more time the same string
>> 'False'.
>> And this is why you get NOT UNIQUE error.
>> 
>> Right ?
> 
> No. This is not the problem.

I still think it is
 
>>> Base Object Method won't allow import of new Lookup_Table records.
>>> Would like to import 50 to 40, 50 to 10, etc. But Base Object Method
>>> thinks these are not unique.
>> 
>> Wait. How you are going import values into RecID field ?????
>> This is READ ONLY field.
> 
> No. This is not the problem either.
> I import to Lookup_Table ObjectPtrs. Lookup_Table has Base Object
> Method that is causing problem. It is Lookup_Table that has to have
> unique records. I put data in fact table and collect Fact_Table RecIDs
> first.
> 
> I tested with simplest case: new database, one table, two fields (type
> = short), one base object method (unique set to true). No importing, no
> ObjectPtrs, no RecIDs involved.
> Still, not able to add records with VAPP interface.
> 
> So I moved 'False' to other end of Base Object Method:
> if(ptr_parent_rcd>ptr_child_rcd,concat(ptr_parent_rcd,'-
> ',ptr_child_rcd),if(ptr_child_rcd>ptr_parent_rcd,concat(ptr_child_rcd,'-
> ',ptr_parent_rcd),¹False¹))
> Still not able to add records.

But this is the samm. No difference.

> Removed 'False':
> if(ptr_parent_rcd>ptr_child_rcd,concat(ptr_parent_rcd,'-
> ',ptr_child_rcd),if(ptr_child_rcd>ptr_parent_rcd,concat(ptr_child_rcd,'-
> ',ptr_parent_rcd)))
> Not able to add records after first record.

Here it needs to look deeply.


> Removed nested If statements:
> if(num_one>num_two,concat(num_one,'-',num_two),concat(num_two,'-
> ',num_one))
> Now able to add records. But have to delete existing records first.

This one looks to be correct and simple.

> I can send simplest case files if you like, or you can create the same
> simple test very easy.

I think you have resolve you task


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list