close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Using lookup tables - re administrative pages (in my industry updates app)

Thread began 12/04/2013 5:44 pm by david_allen | Last modified 12/27/2013 6:46 pm by Ray Borduin | 4443 views | 10 replies |

david_allen

Using lookup tables - re administrative pages (in my industry updates app)

As explained earlier, my fairly straightforward app will input regularly updating information about an industry (via human keyboarding), into a db that then becomes basis to create weekly reports of the industry updates. Hence, the input side of this app is similar to an administrative backend.

To fill some of the items on an individual input page, lookup tables (in relational-speak) need to be used for all the stock descriptors; they will be used in specifying an industry update (for example, to specify region of the world). In other words, in addition to the table being populated with individual industry updates, there need to be additional tables, static lookup tables, accessible to the page where industry updates are being input.

Of course, this also means on the update insert page there will be dynamic pulldown menus that have been populated from the lookup tables.

To this end.

I have watched the youtube tutorial on using relational tables. An earlier version of DataAssist there, but entirely helpful on an 'include,' I think.

https://www.youtube.com/watch?v=dOB-hfpuCLc&feature=c4-overview-vl&list=PL1F359A82D04D2329

Does the notion of the Insert plug-in, through Framework Builder, still apply here? (To get an 'include,' I think.) But I will not be including a page, only the results from the query into the lookup table. I see Dynamic Plugin there - what do I need to know about its use?

What do I need to know / anything further needed to make this work in my case?

Have also read through the tutorial, Manage relational tables.

http://www.webassist.com/tutorials/Manage-relational-tables

Deep down in this tutorial, re the MRT server behavior: Will the machinery accommodate lookup tables, which I believe (uncommonly) share the parent table's Primary key? So only one key, between the two tables.

[CORRECTING my own error, here: Lookup tables do not typically share the Primary key. To note the typical case, subset tables, in a one-to-one relation, share the Primary key with the parent.]

Again, does anything else need to be known in this regard?

Finally, I have not yet identified the tutorials for creating dynamic pulldown menus. May I check where I go to get myself up to date on that?

And best to check, what / where else should I be looking to get arms around this?

Thanks as always, David

Sign in to reply to this post

Jason ByrnesWebAssist

as far as lookup tables go, in the data assist wizard, on the Manage pages tab, go to the Field settings section

for the columns that will use lookup data, set them to use a menu as the display, click the lightning bolt to access the menu settings and select the loop table use, set the ID column and the label column.

what this will do is add a recordset to the page for be used to populate the menu and add a join query to the main recordset to lookup the label to display on the results page.

do this with a small sample to inspect the results and get a better idea.

Lookup tables are used to create a 1 to Many Data relation ship, the Relational tables concept is used for creating a Many to Many relationship. For example:

lets take the concept of Products and Categories. In some cases, you may set up products so that they can only belong to 1 category. This would use the linking table concept using a structure like this:

categories:
categoryID - Primary Key
categoryName

products:
productID - Primary Key
productCategoryID - Relates to categories.categoryID
productName
etc

in this structure the category is set in the products table so that the product is limited to belonging to only one category.

If you wanted to allow the product to belong to many categories, you would use a third relational table. the products table would not contain the productCategoryID column. you would create another table as:

productcategories:
productcategoriesID - Primary Key
productcategoriesCategoryID - Relates to products.productID
productcategoriesProductID - Relates to categories.categoryID

Sign in to reply to this post

david_allen

Thanks so much indeed, Jason, for this detailed picture. Am busy digesting, trying, and learning what does what.

David

Sign in to reply to this post

Jason ByrnesWebAssist

You're welcome

Sign in to reply to this post

david_allen

Onward.

Sign in to reply to this post

david_allen

Jason, may I check and understand a next part, please?

Above you outline creating dynamic menus in DataAssist. I have also found, in the Dreamweaver Server Behaviors panel, WebAsssist -> Dynamic Dropdown -> Create Dynamic Array. (I notice this latter apparently is javascript.)

When to use one, and when to use another?

(And since overdue, let me notice that, in my newbie-ness, I misstated - in the initial post in this thread - and suggested that lookup tables share the parent table primary key. That is incorrect generally. It is one-to-one relations, typically with subset tables, where the primary key is shared.

(Important to make this correction for any future reader of this thread. I will add a correction to my misstatement in the original.)

Thanks as usual. And best of the holidays.

Sign in to reply to this post

Ray BorduinWebAssist

Dynamic Dropdowns and Create Dynamic array is for forms that have two select list menus (dropdowns) that have a parent-child relationship where one filters the other on the fly.

For instance an application where you ask people for the make and model of a car and when they choose the make you only want model options for that particular make to be available.

With one to one relationships you can just populate a list with the related table and update the id in the parent table directly. Intermediate tables and manage relational table options are only needed for one to many and many to many relationships.

Sign in to reply to this post

david_allen

Thanks so much, Ray - I appreciate. Particularly re the three relation types.

Sign in to reply to this post

david_allen

In MRT - Single Record Insert session variable

The first panel of the MRT server behavior indicates: For an insert, the key value is the session variable declared in the Single Record Insert server behavior.

May I get a pointer to usage? Perhaps to the single Record Insert behavior? To be set in advance? Accessed via the lightning bolt?

Thanks.

Sign in to reply to this post

Ray BorduinWebAssist

On an insert page you shouldn't ever need to use "Manage Relational Table"... you can just do a multiple insert.

Manage relational table will delete any old records as well as insert new ones. Since you are on an insert page there are no old records to delete, so insert multiple should suffice.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...