Can't get secondary index in table frame to work

Can't get secondary index in table frame to work

Post by Joseph He » Thu, 04 Jul 1996 04:00:00



I'm trying to sort records in table frame "tableFrame" by secondary
index "PageName."  The following, placed on a pushButton, doesn't work:

     var
        ui UIObject
     endVar

     ui.attach(tableFrame)
     ui.switchIndex("PageName")

The following also does not work:

     var
        tc tcursor
     endVar

     tc.attach(tableFrame)
     tc.switchIndex("PageName")
     tableFrame.resync(tc)

I would expect either of these to work, but in both cases the scripts
run to completion (even when I have "Compile with debug" and place
each statement within an "If not. . .then errorShow() endIf").  The
tcursor is attaching properly, but at the end of the program the
tableFrame is still sorted by its primary index.

Any ideas?

Joe Herl
--

School of Music                              I am not called to be successful;
University of Illinois                          I am called to be faithful.
Urbana, Illinois 61801 USA                                   -- Mother Theresa

 
 
 

Can't get secondary index in table frame to work

Post by Bob Barro » Fri, 05 Jul 1996 04:00:00



>I'm trying to sort records in table frame "tableFrame" by secondary
>index "PageName."  The following, placed on a pushButton, doesn't work:
>     var
>        ui UIObject
>     endVar
>     ui.attach(tableFrame)
>     ui.switchIndex("PageName")
>The following also does not work:
>     var
>        tc tcursor
>     endVar
>     tc.attach(tableFrame)
>     tc.switchIndex("PageName")
>     tableFrame.resync(tc)
>I would expect either of these to work, but in both cases the scripts
>run to completion (even when I have "Compile with debug" and place
>each statement within an "If not. . .then errorShow() endIf").  The
>tcursor is attaching properly, but at the end of the program the
>tableFrame is still sorted by its primary index.
>Any ideas?
>Joe Herl
>--

>School of Music                              I am not called to be successful;
>University of Illinois                          I am called to be faithful.
>Urbana, Illinois 61801 USA                                   -- Mother Theresa

If the tableframe is bound to a detail table (i.e., a table linked to
a master table in the data model), you won't be able to get it to use
a secondary index.. The data model constrains it to the primary index.

Hope this helps
Bob Barrows

 
 
 

Can't get secondary index in table frame to work

Post by Scottde » Sat, 06 Jul 1996 04:00:00


Try opening the Tcursor on the table (.DB) itself, instaed  of attaching
it to the UIobject tableframe. Use the index you want in the open command,
and then your resync should work.
Scott

 
 
 

Can't get secondary index in table frame to work

Post by Ted Richar » Tue, 09 Jul 1996 04:00:00



:
: >I'm trying to sort records in table frame "tableFrame" by secondary
: >index "PageName."  The following, placed on a pushButton, doesn't work:
:
: If the tableframe is bound to a detail table (i.e., a table linked to
: a master table in the data model), you won't be able to get it to use
: a secondary index.. The data model constrains it to the primary index.

Not true. You can specify any index you want in the data model.  The
default is the primary index, but if you click on the detail table, and
then click on the Link button, it brings up a dialog box that lets you
choose the index of the detail table.

If you always want the detail table sorted on the secondary index, that's
the way to go.  If you want to change the order by pushing a button, that
won't work.  I could never figure out how to do that. I could change the
order for the current master, but it always reverted to the default order
when I moved to a new master.

--

ISG Technologies Inc.   6509 Airport Rd., Mississauga  Ont.  Canada   L4V 1S7

 
 
 

Can't get secondary index in table frame to work

Post by Bob Barro » Wed, 10 Jul 1996 04:00:00



>> The data model constrains it to the primary index.
>Not true. You can specify any index you want in the data model.  The
>default is the primary index, but if you click on the detail table, and
>then click on the Link button, it brings up a dialog box that lets you
>choose the index of the detail table.

Right, I should have said "The data model constrains it to the index
chosen when defining the link"
Thanks for the catch.

Bob

 
 
 

Can't get secondary index in table frame to work

Post by Joseph He » Wed, 10 Jul 1996 04:00:00


Quote:>>> The data model constrains it to the primary index.
>>Not true. You can specify any index you want in the data model.  The
>>default is the primary index, but if you click on the detail table, and
>>then click on the Link button, it brings up a dialog box that lets you
>>choose the index of the detail table.
>Right, I should have said "The data model constrains it to the index
>chosen when defining the link"
>Thanks for the catch.

Okay, I've tried this, but when I change to a secondary index and click
on OK the link is broken.  Don't the linked fields have to be the same
in both tables for the link to work?

Joe
--

School of Music                              I am not called to be successful;
University of Illinois                          I am called to be faithful.
Urbana, Illinois 61801 USA                                   -- Mother Theresa

 
 
 

Can't get secondary index in table frame to work

Post by Bob Barro » Thu, 11 Jul 1996 04:00:00



>Okay, I've tried this, but when I change to a secondary index and click
>on OK the link is broken.  Don't the linked fields have to be the same
>in both tables for the link to work?
>Joe
>--

I've done some investigating myself. . It turns out that the first
field in whatever index you choose to use in the detail table must be
the same as the linking field in the master table. When I tried a
secondary index in the detail table whose first field was not the same
as the linking field in the master table, the link was rejected. But
as long as the first field is the same, you can choose any index you
want.

Hope this helps
Bob Barrows

 
 
 

Can't get secondary index in table frame to work

Post by Ted Richar » Thu, 11 Jul 1996 04:00:00


: >>> The data model constrains it to the primary index.
:
: >>Not true. You can specify any index you want in the data model.  The
: >>default is the primary index, but if you click on the detail table, and
: >>then click on the Link button, it brings up a dialog box that lets you
: >>choose the index of the detail table.
:
: >Right, I should have said "The data model constrains it to the index
: >chosen when defining the link"
: >Thanks for the catch.
:
: Okay, I've tried this, but when I change to a secondary index and click
: on OK the link is broken.  Don't the linked fields have to be the same
: in both tables for the link to work?

Define your secondary index with the link field as the first sort field,
followed by whatever other fields you want to sort on.

Having said that, as I recall from your second posting, you are trying
to sort your second table by a field in the third table.  I don't know
how that would work (but then I haven't looked at it in detail, so there
may be a way to do so).

--

ISG Technologies Inc.   6509 Airport Rd., Mississauga  Ont.  Canada   L4V 1S7

 
 
 

1. Ordering Records in Table Frame Using Secondary Index

I have designed a form for signing up people for seminars that has the following
data model:
  Seminar.DB--->>Signup.DB--->Customer.DB

Because of this data model, the data for Signup.DB and Customer.DB are both
within the same table frame.  The idea here is that a given customer may sign
up only once for each seminar offered, but I only want to store their customer
id in the Signup.DB table, not all their customer data.

The Signup.DB table has the following structure:
  Seminar ID  *
  Customer ID *
  Signup Date
  Status

I have created a secondary index on Status & Signup Date (in that order).

Now to the problem:  I want records in the table frame to be displayed in order
according to the secondary index.  I tried applying the secondary index to the
Signup.DB table in the data model as shown in the "Creating design documents"
chapter in the User's Guide, but the Signup.DB table is grayed out and I can't
select it so that I can pick the index.  Only the master table of the relation-
ship, Seminar.DB is available for choosing.

So the question is:  How can I get the table frame to use this secondary index
so that the records will always be displayed in the order I want?  This is
really critical to the design of this application because I've set it up so that
those enrolled for a seminar will show up first in the table when the index is
applied.  This enables people signing up new attendees to see if the maximum
# of attendees has been exceeded by simply looking at the record # field that
is displayed.

Thanks in advance for the assistance.
+==========================================================+
|     /\  ~~                   Ernie DeVries               |
| ~~ /  \/\      End User Computing & Information Services |

|   Northern Arizona University   "The Mountain Campus"    |
+==========================================================+

2. Link Server Error 7399

3. 2nd Secondary Index Doesn't Work

4. sql7.0 server linked other different server

5. Getting frame URL from whithin another frame or at the server side

6. Analysis Manager failed to process all rows during cube processing

7. Descending secondary index not working

8. ORA-01034: ORACLE not available

9. Table frames linked to table frames in a report

10. TQuery's and secondary indexes?

11. Help - Pdox 7 can't see secondary indexes

12. Can't set secondary index

13. Can't get rid of secondary indexes [WIN 4.5, 5.0]