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

Display all info upon selecting a record from a list, all in one layout


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

Recommended Posts

Posted

Hi,

I saw an online image of a Filemaker layout that displays a list of names on one side of the layout, which when clicked upon, will display all the information associated with the selected name on the other side. I wanted to make such a layout but have limited knowledge on how to achieve it.

The image in question:

layout_in_filemaker.png

I would also like to allow the users to create new records in the same layout and filter the names like in the image. I would really appreciate if anyone can give me some advice, or point me to an example/tutorial so I can learn and mimick. Many thanks in advance for your help.

The MacGuffin

Posted

The display part works by putting a script on the field in the left portal, which when clicked populates a global field with the primary key of the clicked Company entry.

This ID in turn drives a relationship(s) which display the values on the right-hand area. Editing the Contacts of a Company works the same way, without a filter, but also

using its own, dedicated global field to establish a "current record" which can be edited.

The filter part for the portal on the left normally works by setting up a calculation in the Company table which generates permutations of the name,

separated by line breaks, and as a final line adds a catch-it-all string (like a " "). This method is known as multiline-key, because FMP considers each line in this field

as a key value in its own right. (Since all criteria in the Relationship Definition dialogue work as AND, this is the only way to set up a relationship with a bit of OR).

As an aside, note that the left-hand side of the relationship may be a multiline-key, too, but this is not pertinent to the system discussed here.

Generating the values for the multiline-key will/should involve recursion, but there are freely available Custom Functions which you can use for this purpose.

(The method was also used in pre-FM7 solutions sans recursion, where these key values had to be generated by painstakingly using the Left() function a fixed number of times and

concatenating the results. Recursion is much more precise, elegant and scalable and uses exactly as much storage as is necessary for a given record.)

Be aware that this calculation must be stored because it works as the right side of the relationship. This will increase your file size, and record creation will be a bit slower.

The filter field on top is a global field which functions as the left side of the relationship. Typing in a string will find all matching records, and clicking the x will start a script which

puts in a blank (or your catch-it-all string of choice) to reset the list and show all records. In the screenshot I also see a looking-glass, which I guess commits the filter field

and triggers the filtering. You can use a script trigger to make the filtering dynamic - "filter as you type" - though this may work slow over a WAN/LAN connection. Another use for a script trigger would be to clear the leading " " when the user enters the field, because the effectively (invisible) " " and the search string would not yield any results and potentially confuse the user (speaking from experience here…).

Creating new records works (of course) by writing a script, which in a barebones variant without any error capture or mode check may look like this: Go to a layout based on a TO

of Company, create a new record, store its primary key in a variable, go to your original layout and set the global which drives the relationship for the selected entry. (Or in the script

you can write the new primary key directly into the global field; being a global, it is available from any context.) Make sure to add some generic name or label to alert the user

to the fact that they are editing a new record.

I hope this description was somewhat useful. Let me know how you get along. :thumbsup:

  • Like 1
Posted

@ afen:

that's a nice (and fast) use of portal filtering, and it works great for navigation. Alas, you can't implement some interface elements shown in

the screenshot, e.g. the found count, since the pertinent functions work with the complete (unfiltered) set of related records from the relationship,

and not only those displayed in the portal.

EDIT: Here's a solution to this particular problem … (credits to Paul Minich)

btw, if you use portal filtering, then I guess your profile is not up-to-date … ;)

  • Like 1
Posted

Hi eos and efen,

Efen thanks for the quick example you gave me. It's very simple and I think I'll start a trial base on your file to learn its pros and cons.

Also thanks Eos for the advice and the link you sent me. I'm taking a deeper look in the link and will probably have some questions about the suggestions you gave me. Need a little time to digest them though as I'm very new to all these concepts and the FileMaker scene.

Again a million thanks for your time and help.

The MacGuffin.

Posted

@eos

As usual, I missed/ignored some of the information provided by the poster - I only noticed/replied to this part:

layout that displays a list of names on one side of the layout, which when clicked upon, will display all the information associated with the selected name on the other side.

...and filter the names like in the image

Alas, you can't implement some interface elements shown in the screenshot

Thanks for that link.

if you use portal filtering, then I guess your profile is not up-to-date …

It is - FM 11 is only at workplace.

Posted

Be aware that this design has some implications.

In order to display the list of names in the scrolling list on the left, the *entire* list of names and other information must be downloaded from the server to the client when the layout is first displayed. Once it's downloaded the first time it is cached, but FMP must flush the cache if the data changes.

When the name count gets into the 1,000s or if the network is slow the lack of responsiveness will be noticeable, and there will be no way to improve the situation because the design requires it.

  • 4 weeks later...

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