Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Struggling with relationship and records...


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

Recommended Posts

Posted

Below was my first post... The work around I found is if I have a Dialog Box and ask for the Test field, I can enter the Quote Number, then set that as the variable and everything works fine. However, I can't figure out how to set the variable automatically. It always pulls the first or last one.

I have a table called Quotes. Each quote may have 0 or more Flyers. They are related by the Quote ID and I have a portal in Quotes. My goal is to add a Flyer, which makes a nice PDF of the FLyer with the info I put in. THe problem is, all the Flyers have the same Quote ID so they don't Save As PDF correctly. Here is my script:

Commit Records/Requests

Set Variable [ $number; Value:Quotes Flyers::Quote Number ] <--Each quote has a quote number

Go to Layout [ "Quotes Flyers" (Quotes Flyers) ]

Perform Find [ Specified Find Requests: Find Records ; Criteria: Quotes Flyers::Quote Number : "=$number" ]

Set Variable [ $filename ; Value:Quotes::Name & "Quote -" & Quotes Flyers::City & " -" & $number & ".pdf" ]

Set Variable [ $folder ; Value:Quotes::Quote ID ]

Go to Layout [ "Quote" (Quotes Flyers) ]

Save Records as PDF [ File Name: "filewin://XXXXXXXXXXXXXXXXXX/$folder/$filename" ; Current Record ] <--X's just mean my file path

Go to Layout [ Original Layout ]

My problem is, it saves the first quote each time, not the correct one. Any advice on how to make that work?

Thanks!

This topic is 4482 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.