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.

Looking for help writing a script to insert text into a field

Featured Replies

I have a text field called “Events”. Some of its values are as follows:

573495226_ScreenShot2021-10-09at1_44_46PM.png.38b782dd972d35f288bba33b2c529862.png

I’d like to write a script that will find all the records for which any of the values Alice_Austen_House_20?? appear and then do the following: 

1) Insert the text “Alice_Austen_House” into the Events field

2) Delete all the text Alice_Austen_House_20?? from the Events field

Here is the start of my script, intended to find the relevant records and then insert “Alice_Austen_House” into the Events field:

1355615699_ScreenShot2021-10-09at1_13_53PM.png.18adc86e554b5d2d166c9aac99c33f67.png

Here are the details of the first step of the script:

1579976270_ScreenShot2021-10-09at12_59_11PM.png.41f2d115b4c3a2c2fa256a4e8c1056b1.png

The first step correctly finds the relevant records, but then I see this error message:907062363_ScreenShot2021-10-09at1_17_31PM.png.e16331163cd4a2538b9edc83da8fe223.png

I’m puzzled by the error message because, as you can see below, I have included “Alice_Austen_House” in the value list for Events.

1024671296_ScreenShot2021-10-09at1_04_11PM.png.d70bc4e41fd9bdab832a0a939740ad62.png

What am I doing wrong? What do I need to do to get this to work?

I'm using FileMaker Pro 17 Advanced.

54 minutes ago, John Link said:

I’m puzzled by the error message because, as you can see below, I have included “Alice_Austen_House” in the value list for Events.

I believe you are experiencing the same problem as the one you did here:
https://fmforums.com/topic/106996-problem-with-script-inserting-text-into-field/?do=findComment&comment=483157&_rid=72594

Either use Set Field or at least enable the 'Select entire contents' option*.

--
(*) This is assuming Events contains a single value. If it's a checkbox or similar, then you will need to deploy a significantly different strategy.

 

 

Edited by comment

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.