12 posts in this topic
I hope that someone on this community is able to assist me in a rather complex dynamical filtering of portals... I am working on a pretty complex CRM based on this demo for dynamical filtering of portals by Sara Severson: http://www.soliantconsulting.com/blog/2013/03/dynamically-filtering-filtered-portals
But I have an issue when trying to dynamically filter the portal based on several relationships, that someone here maybe can answer... This is my situation:
Filemaker file A (the CRM) contains a portal which I filter. The portal show posts from file B (Contact database) with the use of a relationship X. The relationship match fields in the two files are global fields containing just "1" - which matches all posts.
The filtering of the portal here is working great. I can filter posts from the Contact database without any issues. But I would like a second dynamical filter field in relationship with a file C (an Order database) so I can narrow down the contacts in regards to what they ordered.
So I made, in file A, another relationship between file B (relationship X) and file C (Order database). Here I match a client ID in file B with a client ID in file C. And adjusted the portal filter criterias accordingly, so it took notice of this second filter field.
And yes, now it seemed that I could filter out specific orders, to find, for example, only clients in city X (from the file B, the contact database) which has bought item A (from the file C, the order database). But I noticed it didn't find every client with a particular order - after some debugging I found out that this procedure did only find the latest order a client made, in file C.
In other words:
If client A (from contact database) ordered item A and then later item B (posts in the order database), the filter did only find the client's order of item B. If I try to filter for item A, it found other clients that ordered this item, but not the client which ordered both A and B.
It seems that the relationship between file B and C only matches the latest match, which seems a little odd.
If I put a portal in file B (the contact database), with relationship of Client ID with file C (the order database), Filemaker found all orders, but only the first row in this unsorted portal here is found by the filter in file A.
Any ideas? How can I make the relationship between file B and C in file A to find all orders?
Here an image of the tables in file A, with some complementary information: https://postorder-hstrom.tinytake.com/sf/MTUxODk5N181Mjg2NDAz
With kind regards,
By Per Waagø
I seem to find variating answers to this topic, so here I try again.
How do I use a variable to perform a find in a script? I want to use the field contents of the current record to search for similar records.
Background: We send a lot of people out to different countries and I want to make a script that makes an excel sheet with various data based on the country field of the current record. Hence, if the current record is going to France, I want to see everybody that we currently have in France etc. However, we have two return dates so I need to do two searches:
1. Country+ departure date <=// + arrival date >=//
2. Country+ departure date <=// + Extended arrival date >=//
Is it really true that perform find cannot handle a variable?
Hope you can help.
I am having trouble with Find Operation getting slower and slower each day. There are some design consideration as per some articles i have read recently which i will be doing as well.
I inherited this solution from another developer, Find is based on some Calculation fields which are based further on some other calculation fields (both calculation fields have 'Do not store results' option checked)
I know its not the best of designs, i wanted to ask for any possible improvement to Find process as its getting clumsy now.
I have indexed relevant fields though, data in the table isn't huge, around 2000 records with 50 fields but Find is based on unstored calculation fields mainly.
Can PSOS be used in Find Operation?
Is there any other thing i must do at the beginning.
By Wayne Irvine
I have a FileMaker layout with a portal to another table. The relationship shows all unassigned records (related < 1). On each portal row I have a button which runs a script. The idea is that when you press the button the a value from the main record is copied and pasted into a field in the portal row (and as a result the portal record becomes 'assigned' and is removed from the portal.
I have the button running a script and pasting the value from the main record but it is pasting it in the first portal record, not the one whose button was clicked.
Is there a simple way of having the value pasted into the portal record where the button was clicked or do I have to store the record number (or something) and paste back to that record?
I have two separate questions regarding portals and how they work. Before I start let me describe what I'm doing. I'm constructing DB for local karate club. I have one table/layout with general info about members, I have second table/layout with records about belts (including color of the belt, when & where the belt was obtained, the mentor of the member & sparing partners of the member etc.) and I have 3rd table/layout that shows various activities of each member (there are also several other tables but not important for this topic). All tables are connected via key field (ID number)
I have no problem creating portals on 3rd layout to show me which belts particular member has with all additional info from the second table that go along with it. BUT I don't know how to create a portal that shows all members of the club that had particular member as sparing partner. Thing is that I have 3 separate fields for sparing partner because each member can have up to 3 sparing partners and I simply don't know how to connect them all so I can see the list of all members that have particular member as one of three possible sparing partners.
I know how to place count of related records in filtered portal but I'm not sure how to get a Total of this counts.
Any help is much appreciated!