Skip 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.

How to export selected (found) records to a portal in a related table.

Featured Replies

Hello. I have been able to export selected records to a portal in a related table before by including a specific Find criteria in a script, but now I'm trying to create a script that allows me to export a set of records selected after performing a Find with a specific criteria (search criteria NOT in script) to a portal in a related table and it is not working. Can somebody shed some light? Thanks.

 

NR

 export selected records to a portal 

 

This bit does not make sense... export is to another file outside of FM.  A portal is for displaying related records.  Can you expand a bit on your description, what is it that you are trying to do, what kind of errors are you getting?

  • Author

I have two related tables. Table #1 has a portal (from Line Items Table) that I use to show records from Table #2. Now, if I go to Table #2, I want to be able to perform a Find with certain parameters and send the found set of records to my portal in Table #1 by clicking a button. I don't know how to write this script. I hope I make more sense now. Thank you.

 

NR

After the find in table 2, you are already looking at the found set, why would you then want to "transport" that found set to table 1 for looking at it?  Seems like an unnecessary step.

  • Author

Wim:

 

Table #1 is "Orders" and Table #2 is "Products". When I create a new order in Table #1, I select a client (no problem with that part) and then select the products this client is ordering in the portal (Line Items). There are hundreds of products and sometimes a client orders products from different categories in the same order. I don't want to manually select each product because it would be very time consuming. The best choice (I think) is to perform a Find in "Products" based on the client's request and "transport" the found set to the portal in Table #1. I don't have a problem with bringing to my portal all the products that are under a specific category. I was able to do that. My problem is when a client requests 3 out of 10 products from one category and 2 out of 12 products from another category and 6 out of 100 products from another category, etc. I have hundreds of categories and the process can be really tedious.

Table #1 is "Orders" and Table #2 is "Products".

 

Do you also have a third table of LineItems? If not, you should. If yes, you can import the selected products into the LineItems table, then populate the OrderID field in the imported set with the OrderID of the new order.

  • Author

Understood but that is precisely my problem: I don't know how to import the selected products.

After establishing the found set in Products, switch to the LineItems layout and import records from the Products table (in the same file). When a file is open, Filemaker will only import the found set from it, so that's all you need to do. Of course, this can (and should) be scripted.

 

 

 

You might also want to take a look at the demo posted here:

http://fmforums.com/forum/topic/61693-go-to-portalrow-script-problem/#entry291726

 

Think of Attributes as Products and Objects as Orders.

  • Author

Thank you all. Now it works fine. Thanks again.

 

NR

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.