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

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

Recommended Posts

Posted

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!

Posted

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.

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