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

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

Recommended Posts

Posted

Hi

I am creating a database (FMP8.5 advanced) for sending invoices to clients.

Each invoice has a unique account reference number, a specific date and time fields and then several item numbers with fees.

The item numbers and fees are on a separate table and are viewed via a portal.

I would like to duplicate the record for that individual, so that I can create a new account, using some data that is repeated from the previous account, like the name, address, date of birth etc but I do not want to duplicate the information in some of the fields eg previous date of service and the previous item numbers and time fields.

Should I be looking at a script that duplicates data in selected but not all fields and then attach that script to a button called for example “create new record”?

If so can you please help with script steps to duplicate the data in selected but not all the fields?

Or is there another better method?

Thank you,

Posted

Depending on the remainder vs evaporator ratio, would I exploit the fields autoenter facilities' knowing which script actually performed the duplication.

Since you're on a developer version, have I made it CF'ed...

--sd

DupeAllOrSome.zip

Posted

Thank you for your thoughts and the script / calculation.

Unfortunately your solution is not quite what I am after.

Also I am not quite sure what you mean by:

remainder vs evaporator ratio and

CF'ed...

--sd

Nevertheless I appreciate your time and effort.

Posted

Unfortunately your solution is not quite what I am after.

Mission statement please??

remainder vs evaporator ratio and

CF'ed...

How many fields which should be affected by the implementation vs. the ones not. It could eventhough I made a CF (custom function) be a burden for the system to maintain. I have no idea of how flat'ish your relational structure might be, if the solution is normalized into 5th doesn't any field exist in the same table as the duplication is done in ... they're related and won't be updated by things happening to a table a relation away.

You should know when asking in abstract in a forum like this or any for that matter - are the chances anyone will hit it right on initially, would be taking long odds.

Please explain why you have the need and when - purpose and context. Here is it only the matters in the portalrows, if it is - can it still be pulled off:

http://www.fmforums.com/forum/showtopic.php?tid/192150/fromsearch/1/hl/duplication/tp/0/all/1/

...where you then put in the scripted exceptions I showed in my template.

--sd

  • 2 weeks later...
Posted

Hi Søren and others

Can it be this simple?

These are the script steps I used, attached to a button

Show Custom Dialog[“Duplicate account”; “Do you wish to create a new separate account?”]

If[Get(LastMessagaeChoice)=1]

Duplicate Record/Request

Clear [select; Biller::AccountRefereceNumber]

Clear [select; Biller::DateOfProcedure]

Clear [select; Biller::StartTime]

Clear [select; Biller::FinishTime]

Go to layout [original layout]

Go to field [biller::AccountRefereceNumber]

End If

By the way how can I copy my script from FileMaker Script maker and then paste it to a non FileMaker application like a word document or into this forum?

At present when in script maker if I copy the script the only option to paste it is into another script in the FileMaker program.

Thanks again for you help.

Posted

Can it be this simple?

Actually it can be a lot simpler if, instead of duplicating a record and erasing the fields specific to an account, you would create a new RELATED record for each account - leaving the common data in a SINGLE parent record for each individual. The way you have it now, if someone has 5 accounts, and they change their address - you need to update 5 records instead of one.

Posted

Comment's response is probably the best overall advice, but the easy answer to your question is to go to the field definitions for the fields you don't want to duplicate, check the data auto-enter checkbox and leave it blank.

Posted

Thanks for those elegant solutions and advice.

I see what you mean that it could be a problem if a person changes their address then you have to update all the previous records.

However maybe there is no reason to change them?

It might not matter what their previous address was as long as the invoice relating to those details has been paid then that account has been settled.

That being so, perhaps another thing to consider when creating a duplicate account is to have a line of text that appears something like:

“please check that all details eg mailing address are still correct”

before allowing the user to duplicate

Thanks again

Posted

It might not matter what their previous address was as long as the invoice relating to those details has been paid then that account has been settled.

That's possible. I am not sure what "account" means in your description, and how it differs from an invoice. But the address was just an example. Clearly, you are (a) storing the common data in more than one place, and (: doing more work than necessary. That's why splitting the data into two tables would be more appropriate.

Note that keeping duplicate data is sometimes desirable, for example if you have Clients and Invoices, you may want the invoice to store the client's address as it was at the time the invoice was created. The way to do this is to have the invoice lookup the address from the client's record. This way, the client's record is kept up-to-date at all times, but a change of address will affect only future invoices. I believe that is a more elegant solution than asking users to hunt for changes every time they create a new record.

Posted

Note that keeping duplicate data is sometimes desirable, for example if you have Clients and Invoices, you may want the invoice to store the client's address as it was at the time the invoice was created. The way to do this is to have the invoice lookup the address from the client's record. This way, the client's record is kept up-to-date at all times, but a change of address will affect only future invoices. I believe that is a more elegant solution than asking users to hunt for changes every time they create a new record.

In this situation, I'd go with a table of Addresses and a join table for Addresses and Invoices.

Posted

By the way how can I copy my script from FileMaker Script maker and then paste it to a non FileMaker application like a word document or into this forum?

At present when in script maker if I copy the script the only option to paste it is into another script in the FileMaker program.

Open ScriptMaker, select the script (but don't open it). At bottom, select Print. Print to PDF. Open PDF, Edit > Select All and copy it; paste it where you wish.

You can also install a text only printer which will print to text document and there may be other ways as well but I like the way this formats and looks when copied (I use it for creating tech docs).

LaRetta :wink2:

Posted

Hi LaRetta

Thanks, I was hoping someone would spot the question about coping and pasting the script steps.

I have tried what you suggested but when I open script maker and then select the script I get the following options:

(see attached)

I do not (in this menu area) seem to have the option (print to PDF) that you referred to?

Alan

script_maker.JPG

Posted (edited)

Select PRINT. When it opens, open your printer list and find Print to PDF. :wink2:

UPDATE: Hmmm, I was telling you according to vs. 9 which has the print icon at the bottom of the screen. But I had said "Select Print. Print to PDF." I wasn't clear that it was two separate steps and saying 'at the bottom' probably threw you as well.

Edited by Guest
Added update
Posted

Hi

I should have mentioned that I did try a few options after “selecting print”, before sending my last post.

I have also explored all the (advanced) properties of all the available printers, it does not seem like I have an option to print to PDF.

Cheers

print.JPG

print1.JPG

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