Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Portal row not modifiable when using multiple relationship conditions


This topic is 6181 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

Posted

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.

  • Newbies
Posted

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

Posted

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.

  • Newbies
Posted

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.

This topic is 6181 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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