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.

Is there something peculiar about the # character?

Featured Replies

I have a membership 'type' of Regular. I can, via script, change it to Regular#. OK.

But, if I run the same script to change it back to Regular it doesn't work. The get(foundcount) is 0.

Ideas?

Thanks

Ron

I have a membership 'type' of Regular. I can, via script, change it to Regular#. OK.

is this value from value list. To be a "UNIQUE" search for Regular#, you would need a cf i think or Delimit the ¶Regular#¶ in order to

find the exact match.

You are using teh repleacefieldcontents via script ? Why not just set a Flag or something rather than adding the # at the end?

-i

Edited by imoree

  • Author

My application allows the user to define (in a portal) what their membership Types are. They are free to type in whatever they want.

I was just trying different things and I noticed that when I changed a previous Type to Type with a # that the ViewList would update but the find/replace functions would not. This seems to only happen with names that have #.

is this value from value list. To be a "UNIQUE" search for Regular#, you would need a cf i think or Delimit the ¶Regular#¶ in order to

find the exact match.

You are using teh repleacefieldcontents via script ? Why not just set a Flag or something rather than adding the # at the end?

-i

You are close. My script via 'onenter' collects the current $$PriorType name. Then onexit, it collects the $$NewType name. Next it does a search on $$PriorType. If the foundcount>0 it replaces $$PriorType with $$NewType. This find/replace function won't work if $$NewType has a # sign. Why? I don't know.

is this value from value list. To be a "UNIQUE" search for Regular#, you would need a cf i think or Delimit the ¶Regular#¶ in order to

find the exact match.

-i

Ian, what were the results when you tried doing exactly this and confirmed whether it worked before - yet again - submitting an untested and non-functioning suggestion?

Ian, what were the results when you tried doing exactly this and confirmed whether it worked before - yet again - submitting an untested and non-functioning suggestion?

Noted. .. Escape any filemaker special chars..

thanks

What about filtering the data directly in the field? if not i would use this to filter the data in the field via script:


Filter( FieldTO::Filter ; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvqwxyz1234567890" )

this will allow only capital and lowercase alpha chars and numbers 0 -9.

  • Author

What about filtering the data directly in the field? if not i would use this to filter the data in the field via script:


Filter( FieldTO::Filter ; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvqwxyz1234567890" )

this will allow only capital and lowercase alpha chars and numbers 0 -9.

Thanks for the idea. But, when I type Able #, for example, eveything reverts to Able *until after the script is run* then I get Able # ???

Here is my little script:

If[get(triggerkeystroke)="#"]

show custom dialog

set field[MemberTypePopup::MbrType; filter (MemberTypePopup::MbrType; "abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ")] This results in the # still showing after the script is run.

I have also tried SetField to "" and that command results in just #.

The confusing part for me is that after get(TriggerKeystroke)="#" recognizes the # character FM proceeds, after the script is run, to put the undesired character back into the field. What's the point of that?

Thanks

Ron

Check this out:http://sixfriedrice.com/wp/script-triggers-using-the-keystroke-trigger/

post-105143-0-40758300-1334046359_thumb.

Thanks for the idea. But, when I type Able #, for example, eveything reverts to Able *until after the script is run* then I get Able # ???

Here is my little script:

If[get(triggerkeystroke)="#"]

show custom dialog

set field[MemberTypePopup::MbrType; filter (MemberTypePopup::MbrType; "abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ")] This results in the # still showing after the script is run.

I have also tried SetField to "" and that command results in just #.

The confusing part for me is that after get(TriggerKeystroke)="#" recognizes the # character FM proceeds, after the script is run, to put the undesired character back into the field. What's the point of that?

Thanks

Ron

this is what i tested & works for Only the # character; you can enter any other you want to escape

"My application allows the user to define (in a portal) what their membership Types are. They are free to type in whatever they want."

Huh? How do you report on membership types, then?

"My application allows the user to define (in a portal) what their membership Types are. They are free to type in whatever they want."

Huh? How do you report on membership types, then?

Good point!
  • Author

The Type is field. It's contents come from popup list that refers to a table as it's source. To report on the Membership Types, I just refer to the Membership::Type field with a subsummry on Type.

How is this relevant to keeping the # character out of the Type portal field?

How is it NOT related? Nobody knows; and at this point it is impossible for anybody to know: you are being extremely unclear.

You said the type comes from a popup list; it restricted to limited values.

And you said that the type can be ANYTHING; including the user arbitrarily adding oddball characters to the field such as the # character.

Seems like time to upload an example or do a substantially better job of explaining the problem in detail.

  • Author

Problem solved thanks to Imoree. He/she posted this link: Check this out:http://sixfriedrice.com/wp/script-triggers-using-the-keystroke-trigger/ which pointed out that, in my script, I needed to add Exit Script [False] which eliminates the trapped character.

As usual, this forum came through. Thanks to all who read and responded.

  • Author

Ian

The FMForums provides a linking tool for this 9th icon, 2nd row.http://sixfriedrice....stroke-trigger/

or

if you had left a space between the "out:" and pasted it http://sixfriedrice....stroke-trigger/ it would have also provided an ability to click on it.

Great article. It really cleared up some 'fuzzy thinking' on my part about script triggers and their affects and sequences. Thanks for the links.

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.