Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4049 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

 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?

Posted

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

Posted

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.

Posted

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.

Posted

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.

Posted

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.

This topic is 4049 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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