Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

How to limit the records being shown to a user selected choice based on the 'Type' of reco


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

Recommended Posts

Posted

Sorry for the rather vague subject, I'm not sure how to pose this question...

I'm essentially working on a contact management database. There are five different Categories of contacts, and multiple Types of contacts within each Category.

Lets say one Category is 'Press & Media'. Within this Category are Types e.g. Journalists, Photographers, News Agencies, Newspapers etc...

Another category is 'NGOs'. Within this category are Types e.g. Local Partners, Diaspora Groups, Lobbying Organisations etc...

The file will be shared over the network and there are 20+ users. Each user will need to work primarily with a different set of contacts which they need to be able to selectively turn on and off for viewing and editing records, however they will also need to have access to the whole database (albeit where there are private contacts for a particular team on a record level which will be turned on and off via permission set to a specific field).

I need some sort of check box list based on 'Type' so that from the main layout view, each user can selectively work with a chosen set of contacts, such that when they are navigating through the contacts one record to the next, they are limited to see only the contacts they have chosen to work with.

One way I could do this is to script trigger a find from a global check box list so that onModify, it loops through the global field and creates new find requests based on the user selection, but then the user is always working within a particular found set of records.

So I was wondering if there was a relationship way to limit the records being viewed?

I know can create a global field in another table called e.g. NewTable::gType and set this to be a check box value list from Contact::Type. Then I create a relationship between gType and Type, followed by a layout based on NewTable. This allows me to select different values in the gType checkbox and see all related records from Contact in a portal.

But I don't want to see the records in a portal. I really want to be able to base my layout on Contact not on NewTable so that I can use the next / previous record buttons and only limit the records being shown to those selected in the checkbox list. Is the only way to do this via a find? or is there some sort of self-join that would help here?

I've tried a self join of CNT::gType to cnt_CNT:Type, but this doesn't work without a portal and either you see all contacts or you can't navigate past the first record.

My other thought was that I could write a script on the Next Record button. It would need to say something like:

Go to next record that matches one of the Types selected in the global field gType.

But this would need some sort of Find again and would be rather server intensive each time they clicked next record.

I think my other option is to create a new layout with the checkbox above and a portal down the left. When they click a record in the portal on the left, it loads that record in full into the right hand frame I guess via copying the details into global fields or via Getnthrecord?...

However, the relational way seems so much neater if it can be done.. Does this make sense? Can anyone provide some pointers?

Thanks so much

Chris

Posted

I don't understand the "private" contacts part of your requirement. However, it doesn't seem that you need to limit view/edit privs via Record Level Access, since you allow a user to see all records at times.

What is wrong with a simple find in Contacts? Once they are in their found set, they can go Next/Previous and still be in the same set of records.

PS: Welcome to FMForums!

Posted

;) ) Hi, thanks for the welcome and your reply.

Some records would need to be made 'private' as they would be specific to particular teams. i.e. While everyone can view most of the contact records, some contacts in the database should only be able to be viewed by one of the five teams that work from the data as each team have some contacts which are confidential to their work as a team, or to them as an individual.

I can definitely work with a found set of records and modify scripting on the show all records button etc... to always reset show all records back to whatever is selected in the 'Type' checklist, however I just wondered if I was missing something in the relationship set up which would make things more efficient / better.

I imagine lots of finds and remembering found sets is going to cause me more issues in scripting and also ask more of the server than a relational approach. i.e. Whenever the user does something to the found set e.g. find a subset of records or email out documents, I always need to bring them back to their preferred selection of records rather than the database as a whole. If the checklist / relationship idea was to work, then I would never have to worry about where they were or if they were already working within a found set.

Does that make sense?

  • 2 weeks later...
Posted

A little bit. I'm not worried about the private records though. I just want a more elegant solution to limiting the type of records viewed other than a find.

e.g. lets say I the user just wants to work with journalists. Sure they could do a find, or I could produce a fancy button and script which does the find for them, but none of the scripts that I run from these layouts can ever say 'show all records' as they would always be working in a found set. Where as if I was working on a layout based on a relationship, I wouldn't have to worry about this.

Another scenario... I have a medical research database. There are 3 types of participant in the database. One user generally wants to work with just the records from one type of participant. - A subset of the study data. I don't want to limit this user by record level access to only view this type of participant as they should have access to the whole database as well. At the same time, I don't want them to have to work within found sets all the time.

If they do a subsequent custom find and then do a show all records, they will be back to seeing all records, not just their preferred working set. Does this make sense?

Posted

"I don't want to limit this user by record level access to only view this type of participant as they should have access to the whole database as well. At the same time, I don't want them to have to work within found sets all the time. "

It's a bit of a conundrum, then, isn't it?

Perhaps a portal on a participant Type form, and to edit/view the user clicks the portal row (participants of this type) and views a popup window. So, no list view and therefore no "Show All Records".

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