ListFound_Conditionnal ( Field ; start ; filterField ; filterItem )
List of values of one Field of a table under condition of the value (filterItem) of a second field (filterField) of the same table
Average rating: 4.5 (36 votes) Log in to vote
Frederic Bruckert - Show more from this author |
TABLE:Employees
Field::Name, Field::Job
Field::Job has several values (doctor, secretary, nurse,..)
nicole
alexis
lisa
nikki
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function is useful to summarize fields of a table without table occurency.
it's easy to load the result in a global variable to use it in the solution.
Comments
Bruce Robertson Feb 6, 2011 |
||
The function can be simplified as shown below. Oddly, I find the empty string before the second getNth is required to ensure the calc operates properly. Case( start <= Get(FoundCount) ; Let([ thisvalue = Case( GetNthRecord ( filterField; start ) = filterItem ; "" & GetNthRecord ( field ; start ) ); next = ListFound_Conditional ( Field ; start + 1; filterField; filterItem ) ]; List( next; thisValue ) ) ) |
||
Bruce Robertson Feb 6, 2011 |
||
Oops, that should be list( thisValue; next) | ||
Frederic Bruckert Feb 6, 2011 |
||
Hi Bruce. Thanks for your comment.That's another approach, more simple and clear. I did not think to simplify, because my CF was working. Best regards. |
||
Andrew Yates, London, UK Feb 18, 2016 |
||
I seem to be having really mixed results with this. It's exactly what I've been looking for, but I'm getting this to list a related field. The results show as expected. But it seems that if I narrow down the search (of the parent table where the list field is), it shows up blank. Any thoughts? | ||
arthur Nov 11, 2019 |
||
I experience the same thing as Andrew. The full list is generated when the parent file is showing all clips, but when narrowing down information gets lost. Very difficult for me to troubleshoot this one. | ||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.