Mark Gimpaya Posted June 6, 2024 Posted June 6, 2024 how to create a script that finds or search a record in a portal?
Søren Dyhr Posted June 6, 2024 Posted June 6, 2024 (edited) You'll go to a layout of the tables content shown in the portal, make a request there - and then do you go backwards from the child records found, to it's parents via GTRR - Here is a search made like ... give me all invoices where the item XX is present in the itemlines: ... where the crucial point being "Match found set" in line 6 of the script. --sd Edited June 6, 2024 by Søren Dyhr
Mark Gimpaya Posted June 6, 2024 Author Posted June 6, 2024 Here is my table that i want to create a search function. I have a variable field in Main table. and also here is my script. But it is not working. When I search for any text that isn't in the portal, the portal empties. However, when I search for a specific account name, it doesn't appear. What could possibly be wrong with my work here?
Søren Dyhr Posted June 6, 2024 Posted June 6, 2024 4 minutes ago, Mark Gimpaya said: What could possibly be wrong with my work here? You should go to a layout of the table occurrence called Main | Cart of Account | All ... which apparently is a relation away? 7 minutes ago, Mark Gimpaya said: text that isn't in the portal, the portal empties ... this seems like it's not a relation away, but a portal of the current table? But why is there these two "::" in front of the Account in both portals ... wouldn't a cartesian related selfjoin portal be better for the left portal, and then use the current table portal to the right? --sd
comment Posted June 6, 2024 Posted June 6, 2024 2 hours ago, Mark Gimpaya said: how to create a script that finds or search a record in a portal? That is not a clear requirement. A portal will always show all child records that are related to the current parent record (except records that have been filtered out by the portal's filter), regardless of the current found set in either table. You can specify a related field when performing a find. In such case, Filemaker will find records in the parent table that have at least one related child record that meets the criteria (and continue to show all related records in the portal). If you want something else, please clarify exactly what it is. Posting a script that does not do what you want does not explain what you do want.
Søren Dyhr Posted June 6, 2024 Posted June 6, 2024 However, do I think ... I get what you're after? --sd us-500 Converted.fmp12
bcooney Posted June 7, 2024 Posted June 7, 2024 From the screen shot, I’d suggest a list detail layout.
Søren Dyhr Posted June 7, 2024 Posted June 7, 2024 5 hours ago, bcooney said: From the screen shot, I’d suggest a list detail layout. Excellent suggestion, but there is a mismatch between the coding "style" and the knowledge to the inner workings of the tool at hand, here! My guess is that the solution here is inherited from an earlier employee, or bought a bought template only requiring a few fixes here and there ...but becoming the dangerous little knowledge, that won't really make it work! --sd
Recommended Posts
This topic is 418 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