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.

Recursive Function

Featured Replies

Hi Everyone! I am new to recursive functions and need some help

I am setting a global field using the function (field names) in a file called "test" that has a relationship to another file called "test2"

It generates something that looks like this into the global field based on the fields on the layout

field1

field2

field3

field4

test2::first_name

test2::last_name

test2::zip_code

field 1, 2, 3 and 4 are on the layout and are part of the test database and test2::first_name, test2::last_name and test2::zip_code are related fields on the same layout

I need to strip away the test2:}:( from the global field so I am left with

field1

field2

field3

field4

first_name

last_name

zip_code

I need this to work in a recursive function as opposed to using a script to loop thru the global.

It's a little tricky! Can anyone help

Thanks in advance

Stu

Would a simple statement like this work? No recursion required from what I can see.

Substitute(originalText; "test2::"; "")

  • Author

thanks for the quick reply.. I explained my problem in a simplified form. Yes the substitute function will work but this has to work across many layouts with many different realationships on those layouts.

so on 1 layout it might be

field1

field2

field3

field4

test2::first_name

test2::last_name

test2::zip_code

and on another it might be

field1

field2

field3

field4

test3::first_name

agents::last_name

billing::zip_code

Their are just to many combination for me to use the substitute function on. thats why im looking for a recursive function.. Thanks again

Edited by Guest

Try something like this (untested)}:(

MyFunction ( listOfFields ) =

Let ( [

field = GetValue ( listOfFields ; 1 ) ;

countFields = ValueCount ( listOfFields )

] ;

RightValues ( Substitute ( field ; "::" ; ¶ ) ; 1 )

&

Case (

countFields > 1 ;

MyFunction ( RightValues ( listOfFields ; countFields - 1 ) )

)

)

  • Author

Thank you Thank You!! Works like a charm!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.