How comfortable are you with scripting at this point? Have you written a loop to go through all records in a found set yet? A technique for doing this is basically combining 3 major ideas:
1. Writing a looping script to go through all records in a found set.
2. Using a script variable.
3. Writing a calculation to concatenate a bunch of text.
It might be easier to go through either of these before showing you the full solution. What is your familiarity with these concepts?
Our database has had various scripts in it since before I started so generally, I just copy parts of a script and hope for the best LOL. So if you can walk me through the steps I would greatly appreciate it. It took me half a day to figure out one contact export and I thought I had emailed myself what I did, but sadly it won't work again
Well let's first say that if you want to export the data out to something like Excel, you can do that from the File > Export Records menu. That won't give you the exact format you want, but you could use something like a mail merge between word and excel to get it into that format.
We do have a training that talks through a script for looping through a found set here: People Goal 5 - Part 7: Loop through a found set of records
This training lesson has a good example of writing a calc to concatenate fields into a variable People Goal 5 - Part 8 - Use a script parameter
Can you read through those first and see if they can help you get a little closer, then come back and I can try to fill in the gaps?
I am comfortable with exporting to Word and Excel all the fields I need, but I have to do extra afterwards like remove tabs or soft returns when I can just have Filemaker do that for me.
Anyway, I won't have time to do the tutorials so I will just export as I have done in the past.
I think I just need to know how operators work. What is the formula to string several fields together with spaces in between on one line, and on the next line have another field, then go to the next record, etc.
I want to avoid the message "AN OPERATOR IS EXPECTED HERE"....and not know where 'HERE' is.
Alright Mel, then I'm going to take the text you gave above, and give you a sample calculation that would do this for you:
Prefix 2 (space) First Name (space) Last Name
City, Prov, Pcode
Would look something like this:
Prefix 2 & " " & First Name & " " & Last Name & ¶ &
Title & ¶ &
Org & ¶ &
Address & ¶ &
City & ", " & Prov & ", " & Pcode
I'm using ¶ to give you returns, and I'm using spaces or spaces and commas inside quotes (for example " " = a space).
That worked, thank you!!!! Now, I need to be able to do that for multiple contacts...to Word or email, and eventually have a button that does it automatically.
In the meantime I have emailed myself your formula, using our actual fields so I can repeat this tomorrow.