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.

Bug in Substitute Function >> Can any1 check it?

Featured Replies

The bug I found is about the Substitute Function

However everyone can check himself:

1) Create a new fmp7 file

2) Define 2 simple text field (text1 and text2).

3) Create 1 simple Script in which Set field text2 as Substitute(text1; "sometext"; "someothertext")

4) go in browse mode and fill text1 field with text to reach more than 4.000 chars

(obviously u must insert the word "sometext" of the Substitute function above.)

5) Run the Script and unfortunately you'll find in text2 field the

word "someothertext" doubled (practically "someothertextsomeothertext")

Please may anybody check it and give me a feedback?

Thanks guys

  • Author

just one more information. I found that the exact limit of chars over than the issue come out is 4096. That is if the text field contains 4096 chars all goes fine.

Neosoft -

I ran into this too. Until FileMaker fixes this, I found that if you make the field active FIRST and then do the substitute that it works much better. It is only when I used the substitute function on a field I didn't make active first that the duplication occurred.

Hope this helps short term.

SR

Has this been reported to FM?

I ran into this bug a few weeks ago and did report it, but I would encourage you to report it anyway. My solution was to add one occurrance of the search text to the beginning of the text block, which blocked the bug, for some reason. Then use a middle function to remove the substituted text from the beginning of the text field. e.g.:(

Middle ( Substitute ( "sometext" & "blah blah blah sometext blah blah" ; "sometext" ; "someothertext" ) ; 14 ; 999999999 )

I'll have to try the active field trick.

-Terence

  • Author

Has this been reported to FM?

Ya [color:"orange"] hayesk , I reported yesterday to FM support and I'm waiting for their reply.

Thanx [color:"orange"] Neverland and [color:"orange"] Murphy at Carnegie for your test.

Your solutions make the job.

If i'll receive some feedback from FM Team I'll surely post it in a new Thread.

Andrea

  • 1 month later...

Hi Everyone,

I can confirm this bug exists as well. And, yep, I reported it to FileMaker when I first came across it a couple of weeks ago.

Thankfully, the work-around (using the middle function) seems to work without problems...even when the text to perform the substitute on is quite large.

Cobra

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.