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.

Record # always "1" when I export Record as PDF

Featured Replies

  • Newbies

I have an invoice table, with a record number on it. Whenever I export the record as a PDF to email it, the record number shows as "1". So even though the record # shows as 8 or 9 or whatever in the record in FM, the PDF always shows 1.

Is there a way to fix this?

Also, is there a way to make my record number have 4 digits, and start at 1000 or something. I just started a new business and I don't want someone knowing that they're only my 10th customer. Maybe for some businesses this would be cool, but I'm only 22 years old and it highlights my inexperience.

I created the record number symbol by going to the Insert menu, and selecting Insert Record Symbol I believe (the program isn't in front of me right now but I think that's how I did it).

Thanks.

Howe is the record number generated? I'd guess using the GEt(RecordNUmber) functioon.

Does the save as pdf step only process the current record?

Get(RecordNumber) returns the number of the current record in the current found set. When you go into pdf, I think the record is the only one in the set, hence the eternal 1 (and let's not get all mystical here).

You might use Get(RecordID), which is a function that returns the unique ID number of the current record. This number is a decimal value (an integer) generated by FileMaker Pro when the record is created. Since you want to inflate the number, create a calculation:

Get(RecordID) + 1000

HTH,

David

The record ID is not a good choice for this because they could change if the database is cloned and the records imported back into it.

I'd suggest making a "record number" field which can at its simplest be an auto-entered serial number. Use this to uniquely identify the records.

Vaughan--

Yes, you're right about the whole clone thing. Ultimately, I think, the OP needs to recognize that data elements that might be required for future reference (e.g., Invoice numbers, prices billed, discounts applied, etc.) really have to be stored in permanent (ish) fields. I say "ish" because I have seen long discussions in a number different venues about the serious challenges that developers face in ensuring that stored data stay fixed.

Following your suggestion, you can use the field's auto-enter options to have the auto-entered serial number start at 1074 and increment from there.

Edited by Guest

Create a number field in your Invoices table, __kP_INV_ID (that's how I name primary keys), that is the primary key and invoice number. Set its entry options to be an autoenter serial and do not allow modification. You can increment by 3 if you'd like.

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.