Jump to content

Dynamic Tabs


This topic is 4905 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi.

I was wondering if it were possible to have tab controls based on field contents.

My situation is this. I have a table with (at least) two fields in it - called ITEM and GROUP. Each record where there is an item will be a member of GROUP - for example:

Record 1: ITEM="Hammer", GROUP="Tools"

Record 2: ITEM="Chicken", GROUP="Food"

Record 3: ITEM="Crowbar", GROUP="Tools"

The task I have is to have a portal with a tab control in it. I want there to be as many tabs in that tab control as there are unique GROUP records - in this case 2 (Tools and Food), yet if I change the GROUP of one record to something new, then next time that portal is displayed, there will be three tabs.

Now it doesn't specifically have to be tabs, although they are reasonable to work with, but the crux of the question is have some sort of flexible system by which the menus/categories change along with the data.

Absolutely, ideally ??? I'd like to have a portal window on the left with "flyouts" where clicking on "Tools" (one of the dynamic groups) unrolls a menu that displays the ITEMS with that category, then when selecting another GROUP, the original GROUP then rolls up again.

I've not seen anything quite like this, but as my main list is rather large, I'm trying to save the user to have to scroll down a single long list - having it categorised instead.

Anybody please point me in the right direction with a technique or article?

Cheers,

Greg

Link to comment
Share on other sites

Tab controls are not dynamic - they will always show the number of tabs you have defined in Layout mode. However, you could use a portal to the Groups table to select the viewed group - see this example for something very similar:

http://www.fmforums.com/attachments/uploads/1207779277-NavPortal.fp7.zip

Link to comment
Share on other sites

  • 1 month later...

Hi there.

I come in wearing my dummy/newbie hat again.

User "Comment" pointed me in the direction of a file called NavPortal so that I could have two portals on the one screen - the first/left one allowing me to select a master category, and then the right-hand one then brings up all items under that category.

It doesnt matter what I do, I have not been able to replicate this example into my environment, and ready to check myself in somewhere (after two weeks of trying) - and it's all over a (apparently...) simple relationship.

I have tried everything but cannot get it to work.

This example works on two tables, and whilst I have modified my database to work with two tables (to truly replicate NavPortal), ultimately it would be better with one (for me). Is there a solution whereby I can use two portals (with the correct relationships defined) from a single table to achieve this?

Many thanks to Comment again for your help, but the problem lies with me. I need a new approach.

Thanks.

Greg

Link to comment
Share on other sites

This example works on two tables, and whilst I have modified my database to work with two tables (to truly replicate NavPortal), ultimately it would be better with one (for me).

Do you mean you will not have a Groups table?

How many items, in how many groups, do you expect to have?

Link to comment
Share on other sites

Hi Comment.

Thanks for your reply.

I could use a Groups table if need be, but ultimately I was moving towards having a single table where there were multiples fields - two of them being: 1. Group/category and 2. Items.

Some records will have duplicate Group info.

In the "Groups" (category) table there could be anything from 5 to 50 items - depends on the client, and the items per group/category could be the same 5 to 50 items. It could be a lot more or less in both cases.

Cheers,

GReg

Link to comment
Share on other sites

Well, I am of two minds here because extending the method to a single table makes it more complex. Constructing a portal that will show only one row for each unique group is not a trivial task - and you say you haven't been able to implement the method with two tables...

How about starting with something simpler?

----

Note:

Keep in mind that with a single table, these three records will be in three separate groups:

Record 1: ITEM="Hammer", GROUP="Tools"

Record 2: ITEM="Screwdriver", GROUP="Tool"

Record 3: ITEM="Crowbar", GROUP="Toools"

Filter.zip

Link to comment
Share on other sites

Hi Comment.

Once again, thank you.

Yes, thats what I need - the relationship works perfectly in that example.

The only variation I was looking for (and this is where I got stuck) was to have the group displayed in a list (only one of each group name of course) in the left window/portal so that the user could see all the groups at once rather than selecting it from a drop down list.

As he/she selected the group (colour, shape, size) from the left hand list, the right hand list (second portal) would display those items under that selected group.

Did I just over complicate that? lol

Greg

Link to comment
Share on other sites

Hi Comment.

Once again thank you for your help. I'm working on where to do what with the button, and how, but am sure to crack it eventually. lol

Whilst I feel I am quite comfortable with many areas of Filemaker Pro, the one area that I really do lack in - and need to get a grip on - is table relationships that you've setup here - which I know is the base stuff of it all.

I simply dont understand how what you sent me works, and need to sit down for a while, study what you've done to understand it - otherwise I won't grasp the concept for next time I need it.

Anyway. Thanks again for your help.

Cheers,

Greg

Link to comment
Share on other sites

This topic is 4905 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.