Add files to the XTRDOCDATA of a PRSN

63 views
Skip to first unread message

Tiberiu Tiprigan

unread,
Mar 16, 2026, 11:36:30 AMMar 16
to Softone Developers Network
Hello everyone. 
I'm trying to add files / document from a local folder into the softone database , more specifically, into the "personal file" (which i think is the XTRDOCDATA with REFOBJID being the PRSN.PRSN) of each prsn.

So each prsn will have a set of documents attached , so that other users(HR, ACCOUNTANT, ETC) from other machines can look through the documents where necessary, and access them in a common point. 
They will open the specific prsn, see the attached files tab, where the documents will be .

It sounds pretty easy on paper, and I'm guessing it should be done with inserts. I've tried the manual adding of files on prsn to see what the SQLMonitor does, and here is what it does:

First it selects : SELECT XDOC FROM XDOC WHERE SOFNAME=:1 '--path to the sofname here'
Then it inserts into XDOC: INSERT INTO XDOC (NAME,SOFNAME,SOCOMPUTERNAME,CRTDATE,SOFILETYPE,SOFILESIZE,DBWHOUSED,INSDATE,INSUSER,UPDDATE,UPDUSER,SODATA) VALUES ('GDPR_Semnat.pdf' ,'fullpathhere' ,'machinenamehere' ,:1 ,'pdf' ,476008 ,1 ,:2 ,108 ,GETDATE() ,108 ,:3 )

and then the insert into xtrdocdata:
INSERT INTO XTRDOCDATA (REFOBJID,SOSOURCE,LNUM,LINENUM,NAME,SOFNAME,SOCOMPUTERNAME,CRTDATE,DBWHOUSED,PARENTFOLDER,USERS,DEFXTRDOC,XDOC,XDOCTYPE,SOMD) VALUES (55,20 ,4 ,2 ,'GDPR_Semnat.pdf' ,fullpathhere' ,'machinenamehere' ,:1 ,1 ,0 ,108 ,0 ,12 ,1 ,0 )
UPDATE XTRDOCDATA SET LINENUM=3  WHERE REFOBJID=55  AND SOSOURCE=20  AND LNUM=3   -- 16/03/2026 2:14:30 PM

My ideal flow would be : Press a button which will look for a folder where the generated documents are locally, and it should add all those documents present in that folder into the softone prsn db

IMPORTAT : DBWHOUSED is the flag that tell if the file will be saved into the database or just locally

If someone can help me with this, this would be a great help.


Νίκος Μάλιακκας

unread,
Mar 20, 2026, 12:57:46 PMMar 20
to Softone Developers Network
We have a solution already made for this (for every object that supports the XTRDOCDATA/XDOC implementation) it is called scanDOC.
You will find details in the Softone solution store cataloque. 
You can connect it to the scaner, if any, or with 2 folders that you save the scanned pdfs. You can also see them inside the app, no need to open any external reader.
Reply all
Reply to author
Forward
0 new messages