May 23, 200817 yr 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
May 23, 200817 yr [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 ]
May 23, 200817 yr Author 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.
May 23, 200817 yr 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.
May 24, 200817 yr Author 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
May 24, 200817 yr 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.
May 28, 200817 yr Author 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!
Create an account or sign in to comment