March 11, 201411 yr I am trying to write a recursive custom function which looks for any match between two lists and simply returns a 1 if there is a match or a 0 if no match exists. A list may contain 1 or more values. Here's what I have so far: Function: DivisionAccess ( rec_division ; my_division ) Let ([ thelist = my_division ; value = ValueCount ( thelist ) ; access = If ( rec_division = GetValue ( thelist ; value ) ; 1 ; DivisionAccess ( rec_division ; my_division - 1 ) ) /*access = Case ( rec_division = GetValue ( thelist ; value ) ; 1 ; DivisionAccess ( rec_division ; my_division - 1 ) ; 0 )*/ ]; If ( access = 1 ; 1 ; 0 ) ) I left everything in place so you can see what I'm trying to do. When I visit a record that I have access to, I do see that a 1 is returned. But when I visit a record that I do not have access to, I get a ?. I tried explicitly specifying an exit condition in the case statement (not shown), but that didn't work either. I'd love any feedback.
March 11, 201411 yr An example that includes the input data could be useful. In any case, I think that instead of: a recursive custom function which looks for any match between two lists and simply returns a 1 if there is a match or a 0 if no match exists. You could use = not IsEmpty ( FilterValues ( listA ; listB ) )
March 11, 201411 yr Author Brilliant.. I love it when I learn that I've been looking for a far more complex answer than is really needed. Your example solved it. Thanks so much!
Create an account or sign in to comment