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

Hi,

I'm trying to implement an unlimited depth directory-tree structure in FM, and faced a pretty annoying problem:

Directory structure is defined as:

id - number

parent_id - number

dir_name - text

there is also a relationship which links current directory with its parent directory: parent_id->id

and a calculation field targeted to recursively construct full path:

fullPath = id_to_parent_id_rel::fullPath & "/" & dir_name

As a result I expect to get full path to a directory tree's "leaf", in the form of: "/Level1/Level2/Level3/..."

logically, there shouldn't be any loops (of course, if dir structure is intact), but FileMaker tells me that this is a circular definition.

Anyone have any idea how to solve this problem? Or probably this is a limitation of FileMaker which can not be got around?

Any suggestions are welcome!

TIA,

Mike

It's circular because you're probably using a field in a calculation that references itself in the relationship. For instance, you probably have a field called "Folder_Name" that is set up to see the value of it's parent folder, which is the same field through the relationship.

I was trying something similar to this recently, and the workaround I used was to not use a relationship, but to use leading letters and numbers for the folder names. This worked for me because the solution was to create the folders using AppleScript. So my top level was 1. Top Level Folder and below that I had 1a. Sub Folder One, 1b. Sub Folder Two, etc.

Another possible workaround might be to use lookups instead of related fields. Let me know how it works.

Chuck

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.