DGEE Posted May 23, 2008 Posted May 23, 2008 Let me first apologize if this post is in the wrong category. I am trying to figure out how to include a notes field that uses a button to insert the current date and places the cursor next to it ready to go. This part I can figure out... What I can't figure out, is how to create this notes field as a running entry with multiple, dated notes with new entries above the last entry. Every time I insert a current date it overwrites the previous note / field contents. Should this be a repeating field, a portal, or something else? Your assistance is greatly appreciated, thanks. -Dgee
grumbachr Posted May 23, 2008 Posted May 23, 2008 [color:black]I think I borrowed this from DatabasePros.com. I use it on a field where I really don't need a separate notes table. #Add Set Selection [ Tickets::NoteLog; Start Position: 1 ] Insert Calculated Result [ "¶" & TextStyleAdd ( DayName ( Get ( CurrentDate ) ) &", " & MonthName ( Get ( CurrentDate ) ) & " " & Day ( Get ( CurrentDate ) ) & ", " & Year ( Get ( CurrentDate ) ) & " - " & Get ( CurrentTime ) & " ¶" ; Bold ) & "¶" & "------------------------------------" ] Set Selection [ Tickets::NoteLog; Start Position: Get(ActiveSelectionStart) - 37 ]
DGEE Posted May 23, 2008 Author Posted May 23, 2008 Thanks for the reply. A quick follow-up to that... I can only think of the one "notes" field that would go into such a table, so how would each customers record add to and then display that field? Wouldn't the portal want to display all the entries in the table into every record's portal? Kinda confused... thanks for your time.
bcooney Posted May 23, 2008 Posted May 23, 2008 The Notes table needs these fields, most likely: __kP_NoteID _kF_CustID DateCreated CreatedBy Note If you create a relationship btw customers and Notes, such that Cust:_kP_CustID=Notes:_kF_CustID then each customers record would only see the notes that pertain to them. The portal would be using the relationship above.
DGEE Posted May 24, 2008 Author Posted May 24, 2008 Thanks for the additional post. I have been trying for a day now, and still can't wrap my head around it. If you wouldn't mind... I am trying to: From a customer record, add a new note into the note field in the notes table. On that same customer record should be this notes portal that displays all previous notes for this customer. As I tab out of the new note, it is added to the top of the list in the portal. I added the above fields to the notes table you suggested. I have set the relationship as: customer table: _kp_customer_id linked to: notes table: _kf_customer_id I no longer get "unrelated table" error, so I know I must be close Any thoughts are most appreciated, thank you. -DGee
bcooney Posted May 24, 2008 Posted May 24, 2008 If your problem is that you cannot add a new note, then edit the relationship btw customers and notes to Allow Creation of Records" in Notes. This will put an "empty" notes record in the portal. As you fill in the note, a note record will be created. If you want the portal sorted by creation date desc., double-click the portal in layout mode, and set the sort order.
DGEE Posted May 28, 2008 Author Posted May 28, 2008 I got that to work, thank you for your help. I had originally set the portal to first row and it was not adding, but overwriting records. Moving it to last worked, and to add a date I added a timestamp field before the related 'note' field. Although not elegant, it seems to be working. Thanks!
Recommended Posts
This topic is 6083 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