Script the insertion of the asset, don't allow deletion of the record, and don't allow users to access the container field directly.
Thank you Mike,
How do you script the insertion if I want to do a drag n drop?
with another container field in the master table?
Possibly. Otherwise, you'll need to get kinda fancy with Script Triggers.
I suggest you use a popover, accessible only to authorized users, to populate the asset.
Does anybody have any idea how to copy the content from a cotainer field into another container field?
Is it possible?
You can use the Set Field script step on a container:
Set Field [MyData::ContainerDestinationField; MyData::ContainerFieldToCopy]
Thank you padaddy,
Stupid of me!
Will try asap.
Often the simple answers are the most elusive!
Did it; worked!
What happens if someone overwrites it rather than deletes it?
Solved it with the script below.
what I do the moment one dnd a file on the container field, with a trigger, automatically copies the file to another table.
Therefore the problem that you describe is not present.
One can update the file (evolve the record) rather than create a new record.
In sinc with the Log that I have for the rest of the fields in the table.
Hope this explanation helps!
Set Variable [ $ID_PP; Value:Persona_Puesto::ID Persona Puesto ]
Set Variable [ $RecordRef; Value:Get(RecordNumber) ]
Set Variable [ $LayoutRef; Value:Get(LayoutName) ]
Go to Layout [ “Adjuntos” (Adjuntos) ]
Set Field [ Adjuntos::OID Persona Puesto; $ID_PP ]
Set Field [ Adjuntos::Adjunto; Persona_Puesto::Adjunto ]
Refresh Portal [ Object Name: "P_Adjunto" ]
#Restore state - vuelve a donde estaba (layout y record)
Go to Layout [ $LayoutRef ]
Go to Record/Request/Page [ $RecordRef ]
[ No dialog ]
[ Flush cached join results; Flush cached external data ]