Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hi All,

I'm running 3.0 on W2k boxes. I have a contacts database that is about 10 years old and has about 16,000 records. I don't think FMP was relational when this thing was originally built so using a related file was not even possible then and I don't want to try to convert it into one now.

We have this big text field where the contact notes are kept. To keep users from having to do a lot of scrolling, our practice has been to add new notes to the TOP of the list. We like to have our user enter the date, his or her name, and a brief description of why contact was made. Example:

(1-1-95) - John Doe

This is the newer entry.

(8-1-94) - Jane Doe

This is the older entry.

For the past ten years our folks have been entering the date, their name, and bolding the text manually. I am frequently asked if there is a way to script this to eliminate all of the steps involved. I've tried SET FIELD but I lose prior formatting. I've tried PASTE but it wants to paste at the end of the field rather than the beginning.

Any ideas?

-TedS

Posted

Well, if you have a global field (gEnterTitle, result of text) that the users enter the date and name information into, and then another(gEnterText, result of text) that they enter the actual text into, then you can preset the first gEnterTitle format to bold and the gEnterText to plain.

Then you would have one more global for the transfer (gHoldData).

Create a layout with the fields on it (Lets call it Format Text block)

gHoldTitle, gHoldText, gHoldData, Your text field

Freeze window

Go To Layout [Format Text block]

Set Field ["gHoldData", ""]

Copy [select, "gEnterTitle"]

Paste ["gHoldData"]

Insert Text [gHoldData, " PP PP"]

Copy [select, "gEnterText"]

Paste ["gHoldData"]

Insert Text [gHoldData, " PP PP"]

Copy [select, "Your Text Field"]

Paste ["gHoldData"]

Copy [select, "gHoldData"]

Paste [select, "Your Text Field]

Set Field [gHoldTitle, ""]

Set Field [gHoldText, ""]

Go To Layout [original layout]

The PP PP is just two returns in the insert text command.

I know it looks a lot, and believe me I would prefer not to do this, but you would add the two new globals gHoldTitle, gHoldText to the layout and add a button to run the above script. It will retain your formatting for you, and all the user would have to do is click into the title field, enter the information and then (TAB) to the text field where they type in the text. Then click a button to make it apend to the beginning of the big text field.

Heck, if it was for the current user and time, you could script the title area automatically to

Set Field [gHoldTitle, Status(CurrentDate) & " " & Status(CurrentUserName) ]

Personally, I would prefer a related notes database, not just for aesthetics, but also to avoid max-ing out the field limit of 64k characters. Also if you want to search that field, gets clunky and reporting too.

Anywho, it is something to think over.

Posted

Andy,

This is fabulous! I have not tried it yet but it makes sense. I'll give it a whirl tomorrow.

I have broached the subject of going relational with the powers-that-be, but we are in the process of phasing out FileMaker so we don't want to put the effort into it. Thanks Andy!

-Ted

Posted

Andy,

I tried your method this morning but no success. The problem is I can't seem to paste the bold formatting from one field to the other. Here's what I did:

1. Created a global text field (1) and formatted it bold.

2. Created a global text field (2) and formatted it plain.

3. Created a script that copies field (1) and then pastes into field (2).

I enter some text into field (1) and it shows bold. I run the script and it pastes the text alright, just not bold. The Paste Without Style checkbox is not checked. If this works for you maybe the problem is related to the old version or the fact that this is Windows.

-Ted

Posted

OK, are you saying you are copying from your global 1 to global 2.

If so, then it won't show bold because you have set that field to display plain text.

The idea of the globals was for the user to enter the date&name info into the first global and the actual text into the second, then, using the copy paste, transfer to the third global gHoldData field. This was where you built the actual text field contents before transferring back to your text field.

Posted

Ok, I guess it must be getting late on a Friday afternoon. I must be missing something very basic and key so I will just reduce my question to one simple statement:

How does a guy copy text from one field to another and retain the formatting?

I can probably figure out all of the other steps involved but everytime I use copy and paste I lose the formatting. Even happens when I just use the clipboard.

-Ted

  • 3 months later...
Posted

Ok I have a very similar question. I have the need to create a new text field that contains consecutive strings of text from several other text fields.

I thought a simple series of copy and pastes would work as long as I followed the correct order for the copy and pastes.

For example:

Field 1: some date as text

Field 2: a global space character

Field 3: some text field that contains SOME words in color and bold but not all.

Field 4: a global return character

Field 5: the text field to receive all the pastes from the above

Now here is my script:

Copy [select, "datetotext]

Paste [select, "dateandnotes"]

Copy [select, "gSpace"]

Paste [select, "dateandnotes"]

Copy [select, "contact notes"]

Paste [select, "dateandnotes"]

Copy [select, "gReturn"]

Paste [select, "dateandnotes"]

When executed it returns the following as an example:

12/5/200112/5/2001called Ms. Gadzala and confirmed email address and title. GBcalled Ms. Gadzala and confirmed email address and title. GB

Instead of just :

12/5/2001 called Ms. Gadzala and confirmed email address and title. GB

It seems to me that the clipboard is not clearing out after each paste or should is it at the occurence of each new copy command.

I am making sure I do not select entire contents during each paste except for the very first one.

Can anyone help?

Thanks,

Don

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