Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4171 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted
/*
GetValues ( listOfValues ; listOfNumbers )
*/


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

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.

  • Like 1
Posted
@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

This topic is 4171 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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