April 13, 20232 yr Greetings all: I want WebDirect users to be able to copy a .pdf from an existing record into another, but it being WebDirect nothing's easy so I installed the Base Elements plug-in (FMS v19.x) and scavenged some code to create a temporary export path of the existing container contents; this is the subscript which is PSoS: Set Variable [ $_PathPDF ; Value: "file:" & Get ( DocumentsPath ) & COPY::PDF_Filename__lxt ] Set Variable [ $_PathPDF_export ; Value:ConvertFromFileMakerPath ( $_PathPDF ; WinPath ) ] Set Variable [ $_exportPDF: Value: BE_ExportFieldContents ( COPY::PDF__lxr ; $_PathPDF_export )] Where I'm stuck is the subsequent script coding in the "parent" script after the subscript runs--what should it be? If I use Import Records, it'll create a new record; I'd prefer to insert the .pdf into an existing (empty) container, if possible. As always, TIA for your help. Rich Edited April 13, 20232 yr by WF7A
April 13, 20232 yr 3 hours ago, WF7A said: copy a .pdf from an existing record into another Couldn't this be done simply by setting a variable to the PDF, going to the target record, and setting the container field to the variable? That's assuming you really do need to duplicate the contents; in general, duplication of data is something you want to avoid in a relational database.
April 13, 20232 yr Author "D'oh!" Of course, you're right. There I go again, making things 10,000 times more complicated than they need to be. : P I _really_ gotta lay off taking too much antihistamine this time of year... Edited April 13, 20232 yr by WF7A
Create an account or sign in to comment