Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

how to create a script that finds or search a record in a portal?

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:

Skærmbillede 2024-06-06 kl. 04.59.49.png

... where the crucial point being "Match found set" in line 6 of the script.

--sd

Edited by Søren Dyhr

  • Author

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?

image.png.ecda909eb29ea12d7a101ac3bdb64715.png

 

image.thumb.png.821e510e0e2c492904598638f13ca3b0.png

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

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.

 

From the screen shot, I’d suggest a list detail layout. 

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

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.