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.

Featured Replies

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.

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

Important Information

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

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.