October 15, 201213 yr 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!
Create an account or sign in to comment