Jump to content

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

Recommended Posts

  • Newbies
Posted

I have been using fmp for about 6 months now and am slowly getting the hang of basic scripts but i now wish to use filemaker for my letters out and faxes.

My wish is to set up a blank letter and blank fax

- i would like to set up a selection of standard letters and faxes that i could then choose which was required and copy the appropriate text into the blank fax/letter and edit as required.

I this something that someone can help me with or do i need to get a professional in to help me?

Posted

There are a number of ways to do this - whether you get professional help or not - but you can certainly make a start yourself.

An approach you might like to consider is one in which you create a number of standard letters which are generated from your data by script and placed within a 'LettersLog' file, where you then are able to adjust or customize as required.

This can be done by creating a global field in your main database for each basic type of letter, and within the letter text that you enter, inserting 'placeholders' in square brackets everywhere you want data from a field to go. Like this:

Dear [FirstName],

I received your letter dated [LetterDate] and wish

to acknowledge your generous contribution to the

[FundTitle] fund. (etc etc...)

The script which generates your letter then uses a set field which targets a global text field in your 'LettersLog' file, with a formula along the lines of the following:

Set Field ["LetterLog::gLetterTemp.ID", "ClientID"]

Set Field ["LetterLog::gLetterTemp.date", "Status(CurrentDate)"]

Set Field ["LetterLog::gLetterTemp.txt",

"Substitute(Substitute(Substitute(gLetter1, "[FirstName]", FirstName),

"[LetterDate]", LetterDate), "[FundTitle]", FundTitle)"]

Perform Script [sub-scripts, External: "LetterLog.fp5"]


Where the external sub-script in the LettersLog.fp5 file has half a dozen or so steps which run:

New Record/Request

Set Field ["LetterClient", "gLetterTemp.ID"]

Set Field ["LetterDate", "gLetterTemp.date"]

Set Field ["LetterText", "gLetterTemp.txt"]

Go to Layout ["Letter Editor"]

Refresh Window [bring to front]


This approach then provides you with an indexable/searchable log of all actual letters sent. It also provides you with the capacity to create a link from your main file (eg in this instance by ClientID) so that a portal on your main file can display a scrolling list of all letters sent to each client (with a button within each portal row attached to a 'Go To Related Record' command so that you can view the text of any letter (or print a copy etc) with one click.

There are many variations on the theme and many ways to extend or 'embellish' the framework, but the above should provide you with some thoughts to toss around...

  • Newbies
Posted

Rigsby,

Thanks very much for your assistance - exactly what i was looking for but i have run into a small problem. It all goes well - The drop down is all working in the master file with teh appropriate letter names - the relationship is defined but when i get to the bit 'setup the field lettertext in the main file' .

when i go into the define fields and select the field letter text and click options I dont get the same window that you obviously do and therfore dont get the options to contiinue. My window has nothing to do with lookups.

I have contacted filemake tech on this and they end up with teh same problem. They tell me they will get back to me but wondered if you had any ideas why this happens.

ANy ideas would be appreciated outher wise thanks for getting me this far

Posted

Oh! Well, that sounds like very sound advice from the FMP Help-Line. LOL!!

If you are getting another options display, then I would guess your field is defined incorrectly. Make sure it is set up as text. Maybe you can also tell me what version of FMP you are using?

Posted

As Rigsby says, different field types (calculation, global, text etc) have different options dialogs.

However when you go into options for a data-entry field (eg a text field) the resulting dialog has several different 'panels' - typically named 'Auto-enter', 'Validation' and 'Storage'. How to move between these 'panels' varies between versions and platforms (pop-up menus, filetabs etc). However the options you are looking for (eg "Looked-up value") will be on the 'Auto-enter' panel.

  • Newbies
Posted

thanks to all who have helped me here - i had mistakenly made both field in the master file global files and after changing the lettertext field back to a text field have sorted the problem.

THis has got me started and i will not look to develop from here.

This is the first time i have used fmforums and thanks to your assistance will not be the last

Posted

Glad you clarified that, bartinuk... smile.gif

Was sounding as though you'd decided to throw in the towel!!!

Posted

Ray,

I was referred to this thread because I have the same type of question. I am an amatuer user. I have seen others naming fields starting with a "g" or others as in "Set Field ["LetterLog::gLetterTemp.ID", "ClientID"]". What is the purpose of this? Is it an organizational thing?

thanks

Mike

Posted

Lower case 'g' is used to distinguish global fields from record fields. I use '_' (underscore) instead for globals. If you display your defined fields by 'field name', these will all fall to the bottom of the list.

Posted

Hi Mike,

Yes, it's one of a number of 'standards-based' approaches to development which make it a little easier to see at a glance what is happening - and to alphasort, as Steve says.

At the other end of the field name, extensions can be used to identify variants of a similarly named field eg ".date"). Again, the common 'stem' (eg "LetterTemp") will then group corresponding fields together when 'by name' is the method used to list field names. Moreover the logical role they perform, as well as their relationship to each other is relatively clear from the name.

There are a number of documents around proposing 'standards' - which in iteslf partially defeats the purpose smile.gif - and on the whole a sensible approach is to selectively use those that help and to be aware of the options so that you can adopt 'standards' appropriate to the needs of a given project.

A couple of examples of proposed standards frameworks that are out there are:

http://www.coresolutions.on.ca

http://www.dataworks.ca/dwstandards.pdf

but there are others. Needless to say observance of standards becomes increasingly important where:

- cross-platform or web implmementations are involved

- more than one developer may work on a solution (simultaneously or at different times in its history)

- a solution is large or complex - or may become so in the future.

Posted

I would add that the nomenclature protocol implied by Ray's example of a field name "LetterTemp" is a good way to formulate, i.e a single word (as opposed to "Letter Temp"). I mention this because at some future point it may be decided to publish some (or all) of the db solution over the www. Field names which have spaces in them can be problematic in a browser solution. A single word (or "joined_word") name protocol resolves that problem a priori.

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