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

Despite how hard I try I can't incorporate the logic of recursive functions into a working syntax, so any help is appreciated:

The task is to selectively remove from a return delimited list either a certain number of characters from the start of each line or up to a certain character (e.g. inderscore _).

I suppose that the logic should be something like the following pseudo-code (as if it was a script):)

1. Count the number of lines

2. Define the number of characters from start

3. Go to first line

4. Loop

5. Do Replace Function (String; From;To;"")

6. Go to next line

7. Exit Loop if Line > Number of Lines

Another thing would also be to be able to define the search character up to which chars will be deleted.

Can anyone help?

P.S. Help can also contain simple teaching/learning tips if people kindness is great..

Custom functions are recursive, not iterative. So it might be better to:

1. Process the first value in the list;

2. If the list contains more than one value, call the function again with the remaining values as the parameter.

  • Author

Hmm. Not quite sure I understand what you mean :blond:, can you explain/give example?

To take a simple example of returning the first word of each item in the list:

FirstWords ( listOfValues )


Let ( [

item = GetValue ( listOfValues ; 1 ) ;

countValues = ValueCount ( listOfValues )

] ;

LeftWords ( item ; 1 )

&

Case (

countValues > 1 ;

¶ & FirstWords ( RightValues ( listOfValues ; countValues - 1 ) )

)

)

  • Author

Thanks a lot! I think I can tune this to my needs.

How do you suggest I should dive into the world of CF and learn swimming?

Can you suggest resources or approach?

There are lot of examples, both here and at:

http://www.briandunning.com/filemaker-custom-functions/

http://www.fmfunctions.com/functions.php

Some are worth learning from, some less...

  • Author

Thanks once again Comment! :thumbup:

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.