Tiberiu Tiprigan
unread,Mar 16, 2026, 11:36:30 AM (14 hours ago) Mar 16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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.