Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

What's wrong with this simple script?

Featured Replies

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!

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.