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.

Portal row not modifiable when using multiple relationship conditions

Featured Replies

  • Newbies

Hi all,,

I have a problem with portal. When I set up relationship between the two tables, and add portal on my layout. I can add new related records using the portal. But as I add more than one condition to the relationship and try to add new record in my portal I get a error message saying:

"This action cannot be performed because this field is not modifiable."

However I found out that I can change and modify existing records, so it seems that only creation of new records is forbidden.

I have checked the option "Allow creation of records in this table via this relationship"

Just to explain why I need multiple conditions:

I have two tables: Employees and Vacations

I want to see in my portal vacations for specified year only so I set up the relationships like this:

Employees::EmployeeId = Vacations::EmployeeId

AND

Employees::FilterYear = Vacations: VacationsFilter

(where VacationsFilter is a calculated value that returns year)

I would really appreciate this if anyone could help me with this.

thanks

Wyktor

When you create a record in a portal, Filemaker sets (or at least tries to set) the matchfields in the related record to the parent values. In your example, the EmployeeId of the new record in Vacations is set to the value of EmployeeId field in the current record in Employees. In the same way, the VacationsFilter needs to be set to the parent FilterYear value - but that cannot happen, since VacationsFilter is a calculation field. That's why you get the error message.

Try adding new records in an unfiltered portal, or by a script.

  • Author
  • Newbies

Thanks for the reply. It works with the script! Perhaps I'll try to think about different table setup so it'll work without the button because that is little uncomfortable.

But thanks for the advice:)

wyktor

Another work-around is to create an extra field, which "mirrors" the calculation field. It would be a regular field, whatever the result of the calculation is (text, number, etc.). It is used ONLY for this purpose.

Since the existing calculation field is a calculation (duh), it can look at the mirror field also.

Case (

not IsEmpty ( mirror field ); mirror field;

normal calculation here

)

You can then base your portal's relationship by targeting the mirror field. It will [x] Allow creation of related records, and the existing calculation will then use its value instead of its usual calculation.

A bit of a kludge, and it may have weaknesses (such as it will not change as a calculation normally should), but it will work.

  • Author
  • Newbies

Thanks for the help, I really appreciate it.

There's another problem that came up though:) The adding of the portal records now works fine, the only problem is that when I create new record by typing Date to the first field and commit the field. Both my date fields are auto-filled with the 1.1.2008 and 12.31.2008 (which are the filter dates set in the relationship graph). I then need to delete these values and replace it with the dates I need. Is there any way to prevent this auto-enter stuff? I looked in the auto enter stuff in the field definition but everything is turned off there.

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.