Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Add a date into field

Featured Replies

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

Hi Robin,

Have each entry as a separate record instead of combining them into one field? :wink2:

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 by Guest
added full calc

  • 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

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. :blush2:

LaRetta

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.