Search these areas:
Help
Support Forums
Product Info



-Introduction
-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Views
-Templates
-Components
-Data Analysis
-Members
-Security
-Importing
-Exporting
-FTP
-JavaScript
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-Glossary
-New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
Script Library
Knowledge Base

Home > Support

Support Forum



Components - applying the same component view to many tables
simlarkin asked:
Forgive me if I've asked this before.  I searched and didn't catch it.

I have a view that I would like to apply to several different tables in my web.

For example, imagine having a view that showed and allowed you to edit the "First_Name" and "Last_Name" fields of a table.

You have 3 tables (A, B, C) that differ in other ways, but all of which contain First_Name and Last_Name.

You'd like to apply your cool looking view to the 3 different tables without recreating it 3 times.

So you create a component with parameter
pTableName

and put in the dataregion (inside the component)
src="#pTableName#"

However, this doesn't work.  You get the error
Access denied opening table '#pTableName#'
even after you set pTableName=A or B or C in the component declaration.

Is there a way around this?  It's like the #pTableName# isn't getting swaped out.

- Sim
 
  rossb (DataWeb) responded:
  You can't use # substitution in that attribute.  You'll have to copy it.

We don't allow this because typically you want to combine such tables into one.  What you could have here is a single table with all firstname/lastname combinations and then have three separate tables with all the other data that contain a lookup to the first table.

I realize that's not a great solution because we don't do a great job with 1:1 table relationships, but it's still usually the best way to do this.

:)ross
 
  simlarkin responded:
  I agree, but actually, there are number of times in Westside where you can't just combine easily, or wouldn't want to.

Examples:  Completely different uses that you want to be able to control security for independently.  Or data tables that aren't "set", that you want to keep changing around independantly (one table is in use, the other not).

In my case, I have different class signups that I keep in seperate data tables.  It would be much more complicated to code 4 classes into the same data table.

You might want to add this feature.  Just a suggestion.

Thanks,

- Sim
 
  dougl responded:
  Sim:

How many tables are we talking about here?

Can you hide dataregions within ws:htmlblocks and show the appropriate dataregion based on some table property?
 
  dougl responded:
  DataWeb considers this issue closed.
If you have additional questions or comments about this issue, please open it again.
If you have questions about a different topic please open a new support question.

Thanks,
DataWeb Support
 
  Please Log On
or create your own DataWeb Account.
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us