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.

Remove value in field list based on 1st character

Featured Replies

I'm having a challenge figuring out how to identify and remove a single value from a list of values within a single non-repeating text field.

The value to be removed always starts with "V" while the values that will stay do not start with "V".

For example:

123-12345

123-23456

123-345456

[color:red]V123-removeThisValue (not just the V)

123-234567

Thanks for any help.

Do you need to do this with a calc? Cant you script it? If not you can use a Recursive Custom Fuuction. Something like:

RemoveV ( field )


Let ( j = ValueCount ( Field );

      Case ( j > 0;

             Case ( Left ( GetValue ( Field ; 1 ); 1 )  ≠ "V"; GetValue ( Field ; 1 ) &  ¶ ) &  

                    RemoveV ( RightValues ( Field ; j - 1 ) )

           )

     )

Edited by Guest
Added CF

Or a non recursive one ;)

http://www.briandunning.com/cf/747

Try:

FilterValues ( listOfValues ; Substitute ( ¶ & listOfValues ; "¶V" ; ¶ ) )

Note that this is case-sensitive, so it will remove all values starting with "V", but not values starting with "v" (this can be fixed easily by a slight modification, if so desired).

As it happens, the credit for this idea also goes, at least partially, to Agnès Barouh - adapted from:

http://www.fmforums.com/forum/showpost.php?post/273449/

  • Author

Thanks Comment (and others) - Fast and simple.

I guess I've never looked at FilterValues. It's time to review some functions.

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.