Table Alias 
Author Message
 Table Alias

Hi group
I've defined a Party table for records of different business parties, e.g.
Suppliers, Asset Keepers, Maintenance Vendors (that is, different type of
parties, same data fields).  Because the user will be looking-up records for
all of the three types on the same Entry form, I went the ALIAS way, and
defined Keeper ALIAS(Party), Maintenance ALIAS(Party) and  Supplier
ALIAS(Party).  Then realised that the fieldlookupbuttons required me to
create 3 lookup forms (browse with select), that is one per alias.  OK, not
too much work.  Three browses, same layout, different fields. But would the
next step be to also create 3 (THREE) update forms, one per alias, if I want
to add updatebuttons on each of the 3 browseforms? (although the same Party
table is actually updated).  Something I could learn from someone who has
been there?
TIA
Johan


Mon, 30 Dec 2002 03:00:00 GMT  
 Table Alias
Are you using ABC or legacy?

    Dennis



Mon, 30 Dec 2002 03:00:00 GMT  
 Table Alias


Quote:
> Hi group
> I've defined a Party table for records of different business parties,
e.g.
> Suppliers, Asset Keepers, Maintenance Vendors (that is, different
type of
> parties, same data fields).  Because the user will be looking-up
records for
> all of the three types on the same Entry form, I went the ALIAS way,
and
> defined Keeper ALIAS(Party), Maintenance ALIAS(Party) and  Supplier
> ALIAS(Party).  Then realised that the fieldlookupbuttons required me
to
> create 3 lookup forms (browse with select), that is one per alias.
OK, not
> too much work.  Three browses, same layout, different fields. But
would the
> next step be to also create 3 (THREE) update forms, one per alias, if
I want
> to add updatebuttons on each of the 3 browseforms? (although the same
Party
> table is actually updated).  Something I could learn from someone who
has
> been there?
> TIA
> Johan

>Hi Johan,

Not sure I get the picture but I'll offer a suggestion based on how I
interpreted your message.

It sounds like you want to keep a Category file for your business
records.  Create the Category browse and form.  On the browse of the
file with the business records, have a drop-list containing the
Category Name and Category Number from the Category file.  For the
"Use" variable of the drop-list, create a local long variable and when
a Category is selected, assign the Category number to the local
variable.

Then in the "Conditional" tab of the browse properties, set the range
limit to the value of the local variable. After the drop-list
selection, ThisWindow.Reset(1) (i think that's the syntax).  Every time
you select a different Category, the browse should show only those
records.  Fine tune after that.

Make sure you have a 1-to-many relation from the Category file to the
file with the records you want to categorize.

Hope that helps. Sorry if my understanding of the problem was off.
Ed

Sent via Deja.com http://www.deja.com/
Before you buy.



Mon, 30 Dec 2002 03:00:00 GMT  
 Table Alias
Johan:
    No, you just have to update Party (your main file).
You may have to Reset your other browses after you update it to
keep your views on sync.

Regards,

Ygnacio Moreno.



Quote:
> Hi group
> I've defined a Party table for records of different business parties,
e.g.
> Suppliers, Asset Keepers, Maintenance Vendors (that is, different
type of
> parties, same data fields).  Because the user will be looking-up
records for
> all of the three types on the same Entry form, I went the ALIAS way,
and
> defined Keeper ALIAS(Party), Maintenance ALIAS(Party) and  Supplier
> ALIAS(Party).  Then realised that the fieldlookupbuttons required me
to
> create 3 lookup forms (browse with select), that is one per alias.
OK, not
> too much work.  Three browses, same layout, different fields. But
would the
> next step be to also create 3 (THREE) update forms, one per alias, if
I want
> to add updatebuttons on each of the 3 browseforms? (although the same
Party
> table is actually updated).  Something I could learn from someone who
has
> been there?
> TIA
> Johan

Sent via Deja.com http://www.deja.com/
Before you buy.


Mon, 30 Dec 2002 03:00:00 GMT  
 Table Alias
I'm using ABC 5.5. PE

Sorry if I'm not clear...
Procedures:
-----------
ViewAssets
   '--UpdateAssets
      '--SelectSeller
         '--UpdateSeller
      '--SelectMaintenanceVendor
         '--UpdateMaintenance
      '--SelectKeeper
         '--UpdateKeeper

Note:  Seller, MaintenanceVendor and Keeper use ALIAS(PartyTable)

TIA
Johan



Quote:
> Are you using ABC or legacy?

>     Dennis



Tue, 31 Dec 2002 03:00:00 GMT  
 Table Alias
Hi all,

Quote:

> Note:  Seller, MaintenanceVendor and Keeper use ALIAS(PartyTable)

  Well then you have several options, one being using an three alias.

I would create one browse to select the values from,
pass the browse parameters to indicate which tab to use and select that one
and hide/disable the others.
or
Create on list box no tabs and set the sort order, filter/range limits, if
any, and the format string of the list box based on the parameters passed.

in the this window init method, late in the method
case parameter_1
  of x
     Brwx.ListControl{prop:format} = 'FORMAT STRING'
     Brwx.SetOrder('Pre:FieldName')
     Brwx.AddRange(if needed)
     Brwx.SetFilter(if needed)
  of y
    ...
end

Update procedure, if the form contains several different fields, I would use
one file and create three forms.  Call the correct update form for each of
the parties from the select browse by changing the value of the AskProcedure
property.

  case something
     of x
        Brwx.AskProcdure = 1
     of y
       Brwx.AskProcedure = 2
     ...
   end

   If the forms have just a couple of different fields, then use one form
and hide/disable the unused fields, you could also create the form only with
the standard fields and create the others.

    Dennis



Tue, 31 Dec 2002 03:00:00 GMT  
 Table Alias
Thanks for the trouble, Dennis
Regards
Johan



Quote:
> Hi all,

>    If the forms have just a couple of different fields, then use one form
> and hide/disable the unused fields, you could also create the form only
with
> the standard fields and create the others.

>     Dennis



Sun, 05 Jan 2003 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. 1 -> MANY and Alias Table

2. Alias table not updating

3. Alias table example

4. Best design using Alias tables

5. Opening one table multiple times and tBrowseing each alias

6. To Alias or not to Alias

7. Why not alias an alias?

8. alias component(Not alias language construct)

9. Converting data from TPS table to MS SQL 7 table getting wrong values

10. Converting from TPS tables to MSSQL 2000 tables

11. Lookup to ODBC table repositions browse to 1st row in table

12. Classy(2) demo of creating a table class based upon a table structure

 

 
Powered by phpBB® Forum Software