Newbies sbcooler Posted November 4, 2008 Newbies Posted November 4, 2008 I have a notes field that I keep track of my relationships with prospective clients. I set up a short script that every time I click on my notes field (large field with 20 lines) that the date and time populate the field with a script. Then I enter the bulk of the conversation as I talk on the phone so I have a good record of it all. The problem I am having is that I want the cursor to start in the upper left hand part of my notes field, insert 2 lines, THEN put the date and time, then add 2 spaces, then leave the cursor right there for me to type. Pretty simple actually. This way I can always see my latest conversations on top and the less recent ones below...and if I scroll down I can go to really old conversations. Anyone know how I can accomplish this? Thanks -
Vaughan Posted November 4, 2008 Posted November 4, 2008 Though this can be done, I prefer to do it relationally. Create a Notes table. Each record is a new "note" that is separate from the others, so it's hard to accidentally delete or change existing information. The notes are displayed in a portal so they are easy to see.
Newbies sbcooler Posted November 4, 2008 Author Newbies Posted November 4, 2008 I will investigate the portal method. If I were to do it the way I was suggesting can you tell me how I would do it? Thanks-
Vaughan Posted November 4, 2008 Posted November 4, 2008 It'd be scripted, in two steps: add the date and lines to the beginning of the note text position the cursor The trick is to know where to position the cursor: work this out by first putting the new text into a variable then calculating its length. Set Variable [ $newtext ; Get( CurrentDate ) & " " & Get( CurrentTime ) & " " ] Set Field [ notefield ; $newtext & notefield ] Set Selection [ notefield ; Length( $newtext ) ; 0 ] You'll have to fiddle with the set selection settings, probably adding a character here or there to get it to position the cursor just right. Give that a try and see how it goes. This is untested.
T-Square Posted November 4, 2008 Posted November 4, 2008 Ah, but Vaughan, your first answer was so much better! Especially as you can set your notes table up with auto-enter date, time and initials fields (to track who's making the note). Then, when you want to add a note, you click on an empty line in the portal and start typing. Since you set up your relationship to allow creation of records, a new record is created with the current info automatically, and you don't have to mess with any scripts at all. David
Vaughan Posted November 4, 2008 Posted November 4, 2008 Lol David, you're right! But I'm giving the customer what they want... ;-)
Ocean West Posted November 4, 2008 Posted November 4, 2008 another option... http://www.filemakermagazine.com/articles/methods-for-taking-notes.html
Newbies sbcooler Posted November 6, 2008 Author Newbies Posted November 6, 2008 Ok, this works, but I am trying to do 1 more thing. I want the date (no time) to be left justified on the top and this works. Then I want some blank spaces and then begin typing. On line 2-infinity I want those lines to start not LEFT JUSTIFIED but rather 1 tabbed stop to the right so it's lined up with my manually added notes. I almost have it but for one tiny issue. This step seems to vary because the date field is different lengths. 10/10/2008 has a different number of characters than say 1/1/2009 and 11/5/09 is different than both of these. So my 2nd line and down always line up perfectly. But that first line that my script does, well it varies by 1 or 2 or 3 spaces depending on how long the date field is. Now I tried to position the curser but it keep changing slightly based off of the length of the date. What I really want is the date to print out and then 1 tab key and it positions the cursor exactly right on that first line, but I don't know how to add a tabbed stop in a script? I tried to set position at 16, but it always varies based on the length of the date. I test this by changing the date on my MAC by the way. So I know what it looks like. Does this make sense? Any ideas? Thx again for your help-
NDCinc. Posted December 11, 2008 Posted December 11, 2008 I've watched this video over and over and cut and pasted all the code and the notes are not working. It doesn't let me click into the notes field and just start typing and when it does take my note...the seperator line goes to the bottom of the notes. Also, when I create a new client and try entering a new note, it pulls up all the notes from the last client. I'm new to all this is the one main function I need for my database, so if anyone can help. I would be very thankful. I am using Filemaker 9 Advanced.
Recommended Posts
This topic is 5885 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 accountSign in
Already have an account? Sign in here.
Sign In Now