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.

Get specified values

Featured Replies

I am looking for a custom function that will get values based upon a list of value numbers.

 

Example:

 

Data = a¶b¶c¶d¶e¶f¶g

Value Numbers = 3¶5¶6

 

Result should be = c¶e¶f

 

Or if I can choose my own separator, that would be great.

 

Any help I can get would be greatly appreciated.

  • Author

Thank you for the reply.

 

That function does not get specific values. It gets every 2nd or 3rd or 4th and so on.

/*
GetValues ( listOfValues ; listOfNumbers )
*/


Let([
$i = $i + 1;
v = GetValue ( listOfValues ; GetValue ( listOfNumbers  ; $i  ) )
];
Case(
$i ≤ ValueCount ( listOfNumbers ) ; List ( v ; GetValues ( listOfValues ; listOfNumbers ) );
Let ( $i = "" ; "" )
)
)

Try something like:

 

GetValues ( listOfValues ; valueNumbers ) =

Let (
countValues = ValueCount ( valueNumbers )
;
GetValue ( listOfValues ; GetValue ( valueNumbers ; 1 ) )
&
Case ( countValues > 1 ; ¶ & GetValues ( listOfValues ; RightValues ( valueNumbers ; countValues - 1 ) ) )
)

To use your own separator, just substitute it with ¶ when calling the function, then reverse the substitution on the result.

@Nick
 
What should be the result if:
 
Data = a¶b¶c¶d¶e¶f¶g
Value Numbers = 8¶1¶2
 
?
 
If it shoud be:
a¶b than my CF is OK
else
If it shoud be:
¶a¶b than Comment's CF is OK
  • Author

Raybaudi, I tried your function and it works perfectly. Thank you!

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.