[Valentina General] using a method to track a recursive path
Daniel Crowder
daniel at monumental-i.com
Fri Sep 10 20:37:09 CDT 2004
>
> Do methods have control structures such as IF, CASE, WHILE ?
I don't think so but even so I would not need them.
Basically, you have a record, object pointer, and a method field called
'path'. The object ptr references the same table to create infinite
parent/child relationships for categories.
Basically 'path' is a formula that outputs a string.
PATH = MY RECID + SOME DELIMITER + THE PATH VALUE OF RECORD REFERENCED
BY MY OBJECT_PTR
So basically, if you create a new top level record it's PATH field will
be it's RECID. Let's say it's recid is 5 so '5' would appear as the
path value. Now if I create a new record that points to that record
(let's say it's recid is 12) then it's PATH value will be "5,12" and if
I create a new record that points to recid id 12 in the same table it's
path value will be "5,12, 32" since it has a RecID of 32 etc.
I've got a great solution working just fine in lingo - I'm more
interested in learning about how to use methods.
On Sep 10, 2004, at 8:10 PM, Gunnar Swan wrote:
>
>
> If so, then you should be able to execute this.
>
> If not, Lingo is the tool.
>
> Good Luck!
>
>
> 9/10/04 3:50:20 PM, Daniel Crowder <daniel at monumental-i.com> wrote:
>
>> If I understand you correctly, I'm already doing that in software
>> (lingo) I want to be able to do that in a method base object in the
>> database itself. That's what I would like to do and would like to see
>> examples of or suggestions on how to do that.
>>
>>
>> On Sep 10, 2004, at 6:42 PM, Gunnar Swan wrote:
>>
>>>
>>> Recursively call the same method or object. In the new instance, walk
>>> through everything at that level.
>>> We do this on our software Table of Contents.
>>> This allows the Table Of Contents to change, but not have to change
>>> any code.
>>>
>>> We do this as a parent script.
>>>
>>> g
>>>
>>> 9/10/04 3:00:05 PM, Daniel Crowder <daniel at monumental-i.com> wrote:
>>>
>>>> Still having a blast working on my first project. One question: I
>>>> currently have an infinitely recursive category table that I use to
>>>> classify products. Basically it is just a table that has
>>>> object_pointers to other fields in the same table. Basic relational
>>>> stuff. I currently have the program 'climb' up to the parent from
>>>> the
>>>> child in the application - but I am wondering if I could use a
>>>> method
>>>> to do this for me? (return an array/properylist). I'm not sure how
>>>> to
>>>> approach this but something like:
>>>>
>>>> MYMETHOD =parent's MYMETHOD+','+myRECID
>>>>
>>>>
>>>> Any suggestions really appreciated!
>>>>
>>>> - Daniel
>>>>
>>>> _______________________________________________
>>>> Valentina mailing list
>>>> Valentina at lists.macserve.net
>>>> http://lists.macserve.net/mailman/listinfo/valentina
>>>>
>>>>
>>>
>>>
>>> Best Regards,
>>> Gunnar Swan
>>> Practice To Pass
>>> 1.888.307.2050
>>> http://www.PracticeToPass.Com
>>>
>>>
>>>
>>> _______________________________________________
>>> Valentina mailing list
>>> Valentina at lists.macserve.net
>>> http://lists.macserve.net/mailman/listinfo/valentina
>>>
>>
>> _______________________________________________
>> Valentina mailing list
>> Valentina at lists.macserve.net
>> http://lists.macserve.net/mailman/listinfo/valentina
>>
>>
>
>
> Best Regards,
> Gunnar Swan
> Practice To Pass
> 1.888.307.2050
> http://www.PracticeToPass.Com
>
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
More information about the Valentina
mailing list