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

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


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

Recommended Posts

  • Newbies
Posted

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.

Posted

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?

Posted

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

Posted

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.

Posted (edited)

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
Posted

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.

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