Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I have a recipe database. Think of it as a book with chapters such as "Deserts", "Salads", "Soups", etc.. Below those headings in the hierarchy are the recipes. In the preview mode, I can easily get a list of the chapter headings by putting the field in a Subhead part of the layout and sorting by Chapter.

I would like to be able to get such a list in Browse mode so that I could script individual buttons for each chapter. It seems to me there must be some way I could get the index of the Chapter field and use that as you might use a drop menu, but one that would be permanently "dropped." I can't figure out how to get the indexed list, however.

When a particular chapter was selected, the script would find the records for that chapter and they would come up, also in the form of buttons. (I have already got that part done, but the list is too long.)

I know I could get to a similar result by splitting the file in two, a parent file with chapter titles with child files being the recipes, but I don't like having to work through the limitations of portals -- they don't adjust well to displaying varying numbers of records.

Does anyone know how to get the index of a field, other than as a drop or pop-up menu?

thanks

Khasidi

Posted

Khasidi said:

I know I could get to a similar result by splitting the file in two, a parent file with chapter titles with child files being the recipes, but I don't like having to work through the limitations of portals -- they don't adjust well to displaying varying numbers of records.

Does anyone know how to get the index of a field, other than as a drop or pop-up menu?

Yes, portals. They are what you need here. Even within the same file with a SelfJoin and some filtering process. They have limits for Prints, not for browse.

Posted

How about as radio buttons, a global field? That's pretty much what you're doing, choosing one from the index. Then a separate button to "Find" recipes in that chapter. It would actually be a Go to Related Records [show, _gChapter::Chapter].

This would allow you to show the Chapters on the layout, but let the Recipe be the record.

Another approach would be to get the Chapters in a portal; so you didn't have to click the 2nd button.

This requires marking the 1st entry for each Chapter with a 1, via a script or clever lookup.

Then a Constant=1 field, with a relationship to that mark; and a portal based on that.

Works well, but requires maintenence, in the event someone deletes a recipe, and it's the 1st for the chapter.

Posted

Fenton said:

This would allow you to show the Chapters on the layout, but let the Recipe be the record.

In this case, the Chapter "extracted" as a global would show for each Recipe. If you were to move from records to records, this could become troublesome. Better would be to "store" it as a text field rather than a global, but true this might be another solution.

This topic is 7784 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.