August 16, 200223 yr 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.
August 16, 200223 yr Author 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
August 16, 200223 yr Hi Paul, Glad it worked for you 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.
Create an account or sign in to comment