I have a pictures table that has a TO for ten different tables. This is because I am placing a portal on each of the ten parent tables. Is this the correct method?
To build relationships you should in most cases have to different tables. But if you want to related other pictures in the same table to same picture you have to do
PICTURE to PICTURE_Related relationship
Then you need a field in your Picture table that could be called ID_ForeignPicture and I assume that you already have a ID_Picture field that is a unique value.
Then build the relationship
ID_Picture from TO PICTURE to ID_ForeignPicture in TO PICTURE_Related
On your layout based on Picture you can the have portals show PICTURE_Related records
It may be beneficial to post a screen shot of your Relationship Graph. Use Advanced Editor (if you need to attach PDF or Excel), otherwise JPG & PNG may be pasted "inline".
Having a picture storage table for all the pics, then creating multiple (10) TO's for it to separately define how the data relates to ten parent tables is pretty common.
I attached the jpg inline
My goal is to have a validation through calculation in the Fotodatabase which gets triggered if one of the parent tables has a value in the field "Locked". This is not possible because the validation through calculation for a field can only be done through the context of one of the Fotodatabase TOs
Why not have your "Lock" on the Fotodatabase table istead?
If you want the lock to persist through whatever perspective you look at it...put it on the table where the container is...
Would this mean the following? The user triggers a script that enters "1" in the lock field of the parent table. The same script would then go to the child table and do a perform find for the related records and then enter "1" in the lock field of the child table
I'm guessing at your minute to minute use of the data, but my guess leads me here:
You want to lock a picture when you take some action on it (approve it, email it, make it available for sale, whatever).
If this is the case, the script that takes said action also sets a lock field in the Fotodatabase record to "1" or "Locked".
Nothing needed on the parent.
Conversely, if the action locking the picture is done from the parent, and you want ALL children of that parent locked as a result...again, Lock the child records by setting a lockfield in the child records to "1" or "Locked".
Either way, your lockfield exists on the child, not the parent.
Doing it this way, the child record shows as locked regardless of which TO you are looking at it from.
If the lock is pertinent to the child record...pout the lock on the child record, not somewhere else.
Thank you for year reply. I would like the parent record and child records to be locked. It does work when I have the child record read the value of the "lock" field from the parent table which is based on the evaluation of a single table context. This unfortunately does not work when I want this field to use multiple contexts.
I hope that my problem definition is clear to you..
I was able to reach my goal. I created a OnRecordLoad script that creates a global variable based on if the lock field contains a value. The child tables have a validation based on that global field..
Retrieving data ...