blissland Posted November 14, 2023 Posted November 14, 2023 I have been slowly redoing my solutions with the relatively new feature of using a portal to filter the results from the same table on a Form layout. This takes the place of having a list view and then clicking on the item to get the form view. I have a table of Lessons. One of the fields is Topics. I would like to have the functionality where I could select, within the Lessons Form, from a list of Topics, and then the self-portal on the form would show me all the lessons on that topic. Then I could select that lesson for other details to be displayed. It appears that I cannot use two self-portals to achieve this. I also tried using a global field with a value list of topics and I tried a self-join in the relationship graph where I matched the global field in one occurrence with the topic field in the other occurrence, but I was not successful in finding a way to make that work. Perhaps that was the right idea but not implemented properly. I also realize that I could perform a Find on the topic field, but I don't find that to be as elegant as I would like it to be. Surely there's an easy solution to this....
comment Posted November 14, 2023 Posted November 14, 2023 2 hours ago, blissland said: the relatively new feature of using a portal to filter the results from the same table What is this "new feature" that you mention? AFAIK, a portal to the current table (a.k.a. a list-detail layout) cannot be filtered. It will always show all records in the current found set (and only records in the current found set). OTOH, both of these options should be quite easy to implement: Use a portal that shows a related set from a self-join relationship (you say you tried this, but you don't say how - so it's not possible to tell where you went wrong); Trigger a find upon modifying the global field (why wouldn't this be more elegant than adding to the relationships graph?). The other point that's not entirely clear is how many topics can a lesson have. 1
blissland Posted November 14, 2023 Author Posted November 14, 2023 "new feature"=list-detail layout A lesson can only have one topic in this case. The number of topics is fixed to about a half-dozen. I'd like to make the portal option work. I can create a self-join between lesson1 and lesson2 table occurrences. Which fields am I joining them with? Which part of the layout goes with lesson1 and which with lesson2? Sometimes these things are very clear to me and other times very muddy.
comment Posted November 14, 2023 Posted November 14, 2023 Here's a basic demo. A more elaborate solution would use a calculation field as the match field - so that when the global field is empty, all records would be shown. SelfJ.fmp12
blissland Posted November 14, 2023 Author Posted November 14, 2023 (edited) This is great! thank you! Now I got it! Edited November 14, 2023 by blissland
Recommended Posts
This topic is 373 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 accountSign in
Already have an account? Sign in here.
Sign In Now