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.

Featured Replies

This threw me for a loop.

I have a simple substitute calculation. I want to exchange the HTML %20 in a text string with a space.

I have escaped the "%" with a backslash and that works fine...

but when I substitute "\%20" with " ", the "20" part doesn't substitute. I get the following result:

...something like abcde\%20fghi turns into abcde 20fghi. I want it to become abcde fghi. (If it matters, this is Filemaker Pro 10 Advanced.)

I don't get it. It's a text string. It should treat the numbers the same as any other text shouldn't it and remove them... or am I missing something obvious?

There is no need to escape anything here:

Substitute ( YourHTML ; "%20"  ; " " )

should work just fine.

something like abcde%20fghi turns into abcde 20fghi.

Well, that's very strange, because using your formula the result should be "abcde%20fghi" (no change from the original). Perhaps there's something you haven't told us about.

---

BTW, a backslash is "\", not "/". But it makes no difference here.

Edited by comment

  • Author

Here's the string I passed to the calculation (via a user input box):

text%20moretext

Here's the calculation:

Substitute ( UserInput; "\%20" ; " " )

And here's the result:

text 20moretext

The desired result is: text moretext.

Hmmmm, I thought the % had to be escaped (with a backslash) because the calc wasn't working but I get the same result either way. I still don't understand why the "20" is still in there.

Something doesn't add up, because this:

Substitute ( "text%20moretext"; "%20" ; " " )

does result in this:

text moretext

  • Author

It does for me too.

But when I put it in a script and feed "text%20moretext" into the "Show Custom Dialog" box script step, the space is correctly substituted for the % sign but the "20" is still mysteriously there. Does that Show Custom Dialog input window do something I don't understand?

Just to provide some context... the user will be copying and pasting Firstname%20Lastname from a Web browser into the database.

But when I put it in a script and feed "text%20moretext" into the "Show Custom Dialog" box script step, the space is correctly substituted for the % sign but the "20" is still mysteriously there.

Mysterious indeed. Could you post a demo file showing this?

  • Author

Mysterious indeed. Could you post a demo file showing this? 

That turned out to be more complicated than I expected. There are a lot of dependencies in the calculations in this script. It does many other things, including searching to see if the entry already exists, starting a new one if it doesn't, stripping leading and trailing spaces (separate calculation from the one that is be-deviling me). Everything works great and has been working for some time, except the calc that takes out the % sign but not the number.

I'll try to separate it out and pare it down, but it's not trivial.

Create an account or sign in to comment

Important Information

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

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.