Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tableframe index

Status
Not open for further replies.

Lewy

Technical User
Nov 16, 2001
170
0
16
GB
I have a form with 2 tableframes displayed with a 1 to many link. On moving through the master table I should like the records that are displayed in the detail table to be displayed by their secondary index. I thought that the switchindex("xxx") command would work but unless I am attaching it to the wrong object it doesn't. Any ideas please.

Thanks,

Lewy
 

You cannot 'switch index' on a tableframe linked to a master table on another index.

Instead, link the two tables by the secondary index.

Or don't link them, and switchindex/setrange on the child table programmatically.

Tony McGuire
"It's not about having enough time; we have the rest of our lives. It's about priorities.
 
Wow, that's a quick response, many thanks.

"Or don't link them, and switchindex/setrange on the child table programmatically. " Any clues on how this can be done?

Thanks

Lewy
 
Well, no doubt several ways.

uiName.switchindex("index_name")

for starters. uiName being the name of the child tableframe/object.

'index_name' being the name of the index.

So, if the field name you wish to limit the view of the child was 'machine', you might then

uiName.setrange(masterobjectName."fieldname",masterobjectName."fieldname")

This should place the child table in a restricted view, based on the index name, and with the restriction being the data in the 'fieldname' of the current record of 'masterobjectName' (tableframe?).

I did this with a zip code, phone, city set of tables. Depending on the field being used to 'search', all tables were switchindex()ed to the appropriate index and then limited with each character typed into the active 'search' field.

This allows 100% flexibility, with the same or better speed Paradox uses when tables are linked.

But there were no linked tables. Just several secondary indexes on each table. And each record in the table had a MEANINGLESS integer index; everything was done with secondary indexes.

Tony McGuire
"It's not about having enough time; we have the rest of our lives. It's about priorities.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top