dbTalk Databases Forums  

Sorting tableframe on child secondary index

comp.databases.paradox comp.databases.paradox


Discuss Sorting tableframe on child secondary index in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Anne Wainwright
 
Posts: n/a

Default Sorting tableframe on child secondary index - 03-27-2007 , 04:43 PM






Hi,

I think that I am chasing a rainbow

I have a number of tables normally in a 1-M relation thus

Author -->> Title -->> Edition -->> Book

Now I want to generate a form to see a simple one-line listing of every
book on the database, so a dm thus

Book --> Edition --> Title --> Author

and a tableframe does the job nicely, and since I have a secondary index
on the book reference number in the master table book.db I can see them
in that order easily.

Now when I want them in Author order .... the secondary index on the
Author name is on the last table and does not show up on the interactive
Format / Filter / Order-by option.

I suppose that is how it is, just please tell me that I am not missing
something here.

-----
Anne Wainwright
Please reply to group

Reply With Quote
  #2  
Old   
Tony McGuire
 
Posts: n/a

Default Re: Sorting tableframe on child secondary index - 03-27-2007 , 05:30 PM







Don't link any tables.

Build your own order-by stuff, using secondary indexes and setranges.

As you land on a table, switch each table to the proper index, and set the
appropriate range.

This gives incredible flexibility in showing relations/records on screen.

I did this with area codes, cities and zip codes.

Click on an Area Code, you get the cit[y,ies] and zip code[s] associated
with the area code.

Click on a City, get the zip/area code[s] that go with the city.

Click on a zip code, and you get the cit[y,ies]/area code[s] it applies to.

NO links in the data model.

Besides clicking, there was a search. As you begin typing in characters or
numbers (you had to select the master type), the 'master type' table began
filtering (setrange); once you arrived on a specific record, a click brought
the 'child' records on-screen.

This was a 3x implementation of a modified version of Liz's 'typeahead'
demo.

---------------------------------------------------------
Tony McGuire



Reply With Quote
  #3  
Old   
Anne Wainwright
 
Posts: n/a

Default Re: Sorting tableframe on child secondary index - 03-29-2007 , 04:15 PM



Tony, hi,

Thanks for that post. I had never used those methods before.

I made a form with a tableframe for each of the four tables and used
switchIndex and setRange in the tableframe Arrive method and indeed it
works. I made 2 forms and it works _both_ways_! I can start with a book
and click down to its author, or I can start with an author and click
down to his books.

I had to put in some more secondary indexes to step the other way of
course.

By way of explanation:

I wrote that my dm was thus

Book --> Edition --> Title --> Author

but it is really composed of M-1 relations

Book >>--> Edition >>--> Title >>--> Author

ie if I have books by 1250 assorted Authors, 2 titles from each, each
title published in 2 editions (p/b and hardcover) and I have 2 copies of
each of those then I have 10000 books. I want to scroll down a listing of
all 10000, one per line.

So I'll experiment some more and see where it takes me.

Regards
Anne

"Tony McGuire" <png.paradoxcommunity@com> wrote in
news:46099afa (AT) pnews (DOT) thedbcommunity.com:

Quote:
Don't link any tables.

Build your own order-by stuff, using secondary indexes and setranges.

As you land on a table, switch each table to the proper index, and set
the appropriate range.

This gives incredible flexibility in showing relations/records on
screen.

I did this with area codes, cities and zip codes.

Click on an Area Code, you get the cit[y,ies] and zip code[s]
associated with the area code.

Click on a City, get the zip/area code[s] that go with the city.

Click on a zip code, and you get the cit[y,ies]/area code[s] it
applies to.

NO links in the data model.

Besides clicking, there was a search. As you begin typing in
characters or numbers (you had to select the master type), the 'master
type' table began filtering (setrange); once you arrived on a specific
record, a click brought the 'child' records on-screen.

This was a 3x implementation of a modified version of Liz's
'typeahead' demo.

---------------------------------------------------------
Tony McGuire




--
-----
Anne Wainwright
Please reply to group


Reply With Quote
  #4  
Old   
Tony McGuire
 
Posts: n/a

Default Re: Sorting tableframe on child secondary index - 03-29-2007 , 04:21 PM




Quote:
I made 2 forms and it works _both_ways_!
Pretty cool, huh?

And you can change the index to various on the same form. Adds a
considerable degree of flexibility, not to mention simply getting around the
linked tables limitation of a datamodel.

The form I made had 3 tables. With the proper indexes, I could start on any
of them and drill down to whatever view I needed.

Liz really is a genius.


--
---------------------------------------------------------
Tony McGuire




Reply With Quote
  #5  
Old   
Anne Wainwright
 
Posts: n/a

Default Re: Sorting tableframe on child secondary index - 04-01-2007 , 07:52 AM



Yes, Tony, way cool!

I downloaded Liz's type-ahead file for study, so maybe some genius will rub
off on me. I could do with a little.

But I thought the way I swiftly came up with

Titles.switchIndex("authorNo")
Titles.setRange(authors.authorID)

without a single post to this group was neat! I was so chuffed that I took
a 'wow' coffee and rusk break when I saw it work.

Anne

"Tony McGuire" <png.paradoxcommunity@com> wrote in
news:460c2dcc$1 (AT) pnews (DOT) thedbcommunity.com:

Quote:
I made 2 forms and it works _both_ways_!

Pretty cool, huh?

And you can change the index to various on the same form. Adds a
considerable degree of flexibility, not to mention simply getting
around the linked tables limitation of a datamodel.

The form I made had 3 tables. With the proper indexes, I could start
on any of them and drill down to whatever view I needed.

Liz really is a genius.




--
-----
Anne Wainwright
Please reply to group


Reply With Quote
  #6  
Old   
Tony McGuire
 
Posts: n/a

Default Re: Sorting tableframe on child secondary index - 04-01-2007 , 10:15 AM




Quote:
But I thought the way I swiftly came up with

Titles.switchIndex("authorNo")
Titles.setRange(authors.authorID)

without a single post to this group was neat! I was so chuffed that I took
a 'wow' coffee and rusk break when I saw it work.

Exactly, and deserved.

:-)

--
---------------------------------------------------------
Tony McGuire




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.