Jump 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.

How to Quickly Find Carriage Returns in a Field?

Featured Replies

I'd like to verify that a number of fields do not have any carriage returns (¶) in them.  I already have an auto-enter calculation that I am adding to each field to prevent this from happening in the future.

 

One solution is to create a secondary calc field that will return "1" if a carriage return is detected in 'FieldName':

PatternCount(FieldName; "¶") > 0

If I search for "1" in this secondary field it works great (and I can fix individually or quickly via Replace Field Contents), but changing the calculation is tedious to do for a large number of fields.

 

Is there instead a way I can enter Find Mode and enter something directly in the field I'm interested in fixing up?  I've tried the following, but no records are found:

  • "¶"
  • Char(13)
  • *"¶"
  • dat pilcrow

This is not easy to enter manually*, but using a script you can do:

Enter Find Mode [  ]
Set Field [ Table::Textfield; ""¶"" ]
Perform Find [  ]

--

(*) You need to enter an actual carriage return in between the quotes, but in Find mode this would trigger the Perform Find action - so I believe the only way to do this manually is to paste it.

  • Author

comment, you're a genius.  Copying and pasting "¶" (where the ¶ is the invisible character, of course) does work manually, and your suggestion to use a script got me thinking…  So, here's my script:

 

Script Name:  Find All Records with "¶" In Current Field

#
If [IsEmpty(Get(ActiveFieldName))]
  # Cursor not in any field
  Beep
  Show Custom Dialog [Get(ScriptName); "Please place your cursor in an active text field and try again."]
  Exit Script []
End If
#
# Attempt the find
Enter Find Mode []
Set Field By Name [Get(ActiveFieldTableName) & "::" & Get(ActiveFieldName); ""¶""]
Set Error Capture [On]
Perform Find []
#

Include this script in the menu, and now all I have to do is hit Command-6 (in my case) to immediately get what I want.  Perfect!

A small nitpick and a caveat:

 

 

This:

Set Field By Name [ Get(ActiveFieldTableName) & "::" & Get(ActiveFieldName); "abc" ]

does exactly the same thing as:

Set Field [ "abc" ]

Both rely on the cursor staying in the active field when you switch to Find mode.

 

When will this assumption fail? When the active field is a global field. In such case, the first version will throw a "This action cannot be performed because the required table is missing." error, while the second one will fail silently.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.