March 17, 200718 yr Hi, It's kind of difficult to explain, but I'm trying to find a good way to insert text (current date) into a field called details. What I have now is that sometimes the field can include on top: Bumped from 3/14/2007. Here the text begins,... Now I'd like to insert text (date) between those lines, so like this: Bumped from 3/14/2007. Robin - 3/16/2007. Here the text begins,... I tried to find a good way to insert it into this place, but it's difficult since the top date after "bumped from" can change, month can either be one number (1-2-3-...), or two numbers (10-11-12), so I can't base it on a fixed number from the left either, how can I solve this? Thanks Robin
March 17, 200718 yr Hi Robin, Have each entry as a separate record instead of combining them into one field? Truly, it is much easier to work with records. What if Manager wants to see all of (and only) Robin's entries? Or only entries from year 2007? Anyway, if you have no other choice, try this: Set Selection [ yourTable::yourNoteField ; Position ( yourTable::yourNoteField ; ¶ ; 1 ; 1 ) + 1 ] Insert Calculated Result [ yourTable::yourNoteField ; UserName & " - " & Get ( CurrentDate ) & ".¶" ] LaRetta Edited March 17, 200718 yr by Guest added full calc
March 17, 200718 yr Author Hi LaRetta, Thanks for your reply, indeed I don't really have another choice at the moment. I'm going to try your script right away, thanks a lot.. Robin
March 17, 200718 yr I doubt you'll have any problem, Robin, but I noticed I was sloppy (I had just woke up). I'm pretty sure you could figure it out but I wanted to clarify ... Set Selection displays dialog requesting a start position and an end position. You only want the start position here. The start position would be the entire: Position... etc formula. And there is NO end position. Also, I gave you a generic formatting here and I see from your example that you want to come down another line before you start. So in the Insert Calculated Result[] it should be: ¶ & UserName & " - " & Get ( CurrentDate ) & ".¶" Set Selection[] is cool because it can place the cursor where you wish and this is one of the few times Insert Calculated Result[] is a better choice than Set Field[]. Also, on Insert Calculated Result[], you do NOT want 'Select Entire Contents' checked; if you do, it replaces the field value. I should have also reminded you to back up first. I apologize for my slop. LaRetta
Create an account or sign in to comment