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.

Help Me Understand this...

Featured Replies

I am trying to search for a simple text string within a List of text strings and return a boolean result if the search text string exists within the list.  From what I understand, I can use FilterValues to accomplish this.

FilterValues ( "mySearchString" ; $MY_LIST_OF_VALUES )

If 'mySearchString' exists within the variable list 'MY_LIST_OF_VALUES', it will return 'mySearchString'.  I should then be able to use the GetAsBoolean function to return TRUE if the value is there and FALSE if the value is not found, correct?

If not, what's the correct method to do this?

 

Edit: Well from the Function reference for GetAsBoolean, I guess not.  Although even when I say:

If ( FilterValues ( "mySearchString" ; $MY_LIST_OF_VALUES ) = "mySearchString" ; True )

It returns false...

Edit 2: Well I'm stupid.  Turns out the function I was using to Add and Remove values from a list was adding a trailing ¶ to the first value once multiple values had been added to the list.  The above function returned True during the first creation of the global value list and then failed each subsequent time.  Now I know why...  

Code ( "mySearchString" ) ≠ Code ( FilterValues ( "mySearchString" ; $MY_LIST_OF_VALUES) )

but

Code ( "mySearchString" ) = Code ( FilterValues ( "mySearchString" ; $MY_LIST_OF_VALUES ) )

:facepalm:

Edited by James Gill

I should then be able to use the GetAsBoolean function to return TRUE if the value is there and FALSE if the value is not found, correct?

​No, that is incorrect. GetAsBoolean ( string ) does not test for the existence of string (unlike many other languages). The correct test is =

not IsEmpty ( FilterValues ( "mySearchString" ; $MY_LIST_OF_VALUES ) )

 

Is there is benefit to using this approach as opposed to PatternCount ( )?

Edit: Nevermind. I just realized you are trying to match the entire value, not just part of the string/value.

Edited by Josh Ormond

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.