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

Two relationships, two portals and stuff... HELP!!


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

Recommended Posts

Posted

In relation to your first problem, there are two things to check.

Firstly, make sure that the key field in your Tasklines file is indexed and is of the same data type (eg number or text) as the calc field that it is matched to 'in Mainfile'.

Secondly, make sure that the option for "Allow creation of portal records" is enabled for the relationship which Portal1 is based on.

When both these things are done, the relationship should be valid and you should be able to create new records via Portal1 in Mainfile.

As regards your second requirement, I suggest that you create a script in your Mainfile (triggered from a button in Portal2) which uses the SetField script step to transfer the TaskID value from the current portal row (ie via the Portal 2 relationship) to a global field (gScriptTemp1) in the Tasklines file, a second Set Field to transfer the key field (field1 & field2) from the current record to a second global field (gScriptTemp2) in the Tasklines file, then calls an external script in the Tasklines file which runs as follows:


New Record/Request

Set Field ["TaskID", "gScriptTemp1"]

Set Field ["KeyField", "gScriptTemp2"]

Toggle Window [Hide]


This will deal directly with the related 'Tasklines' file without having to transfer data between portals, yet will return the user to the main file at the end of the procedure. As such it should avoid a host of possible headaches.

Posted

Thanks CobaltSky !!! It worked!!!

How will the Global field behave when it is many user of the same DB (MultiUser) an maybe someone try to make a new record and use the same Global fields in Tasklines at the same time?

Paul Ren

Posted

Hi Paul,

Glad it worked for you smile.gif

As regards multi-user mode, it should work perfectly.

When a database is shared, each user reads the original values for a global field from those stored with the main file, but changes made by client computers are held locally (and are lost when the client logs out - only changes made on the host are stored). In effect they are global to the database, while being local to the user. Thus multiple users may use the global fields simultaneously without experiencing record locking errors, or data conflicts.

This topic is 8192 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.