June 20, 201213 yr I have 2 tables: Bids & Bids Flyers. Each Bid has a Bid ID, and each Bids Flyers has a Bid Flyers ID. I have a portal on my Bidsto show records for Bids Flyers. Some Bids may have 1 or more flyers I send. The problem is, each time I run this script it overwrites the original file name with the new data. I want it to make a new file for each one... Any ideas? Commit Records/Requests [] Set Variable [$filename; Value:Bids::Name & " Bids -" & Bids Flyers::City & " -" & Bids Flyers::Bids Number & ".pdf"] Set Variable [$folder; Value:Bids::Bids ID] Go to Layout ["Bids" (Bids Flyers)] Show All Records Go to Record/Request/Page [Last] Save Records as PDF [Restore; No dialog; "$filename"; Current record] Go to Layout [original layout] Set Field [bids Flyers::Sent; Get (CurentTimeStamp )] Maybe it's a relationship problem, I don't know, but I'll save a file name: "Jon Smith -Miami -100.pdf" (Meaning customer, city, and bids number) and it will be just fine on the first one). Then I will do a second one, and it will pull all the data and look great, but it saves the file name as the same, when I want it to be: "Jon Smith -Miami -101.pdf" Any help would be MUCCHHHHHHH appreciated!
June 20, 201213 yr You do this Set Variable [$filename; Value:Bids::Name & " Bids -" & Bids Flyers::City & " -" & Bids Flyers::Bids Number & ".pdf"] in the context of Bids. For the values from Bid Flyers, this will give you the values of the first record via the BidsFlyers relationship - each time the same values (until you create a new record which sorts to the top of the portal, if you have a sort order specified; then you get the values from that record). Set the variable when you're on the BidsFlyers record you want to save.
Create an account or sign in to comment