Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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.

Posted

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 ) )

This topic is 3921 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.