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.

Simple Script to add text to beginning of field

Featured Replies

I have a "Notes" field on a layout that is a text box that could potentially have alot of text in it.

What I want to achieve is a script that does the following:

Place the following text string before the existing text "abc: (carriage return) (carriage return)"

Place the cursor before the first carriage return for new input.

Does anyone know of a way to achieve this with scriptmaker?

Yes, I do, but I would suggest that you have a separate table for Notes and display these related records in a portal.

Then you can give each Note a CreatedDate, CreatedBy (AccountName) and perhaps a priority.

  • Author

actually, my "abc" string was going to be a time/date stamp and userName.

and for readability purposes, I just figured it would be easier to have it in one field...

Edited by Guest

You could gather all the notes into one field with List ( ).

  • Author

Ok... Let me think about this with you...

I am going to have a notes section in various tables - on a company level, on a contact level, and on an invoice level.

What benefit do I get from having a "notes" table rather than simply having a running field in the appropriate table, on the appropriate record?

Easier maintenance, searching, indexing, better normalized, etc.

If that's so, then there's more reason to have one Notes table. Just have the respective foreign keys in Notes. So a note record that belongs to an Invoice would have an Invoice foreign key, and perhaps a Customer foreign key. Not all foreign keys need to be populated.

  • 1 month later...
  • Newbies

I've been trying the same thing for years - did you ever get an answer? ( without Tables, and keys?)

  • Newbies

Worked this out yesterday:

I searched the web forever for months to try to solve this for myself, so yesterday I just sat down and tried 20 different things and I figured it out:

I'm using FM 7

In the Editing section of the Scripts, choose

Set Selection ( optional to name the field) ; Start Position 0

Insert text ( return )

Set Selection; Start Position 0

this will force you to the BEGINNING of the field where you can insert Date Time ( we insert user name) with appropriate insert test " " between date, time, user and after user

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.