Thanks Dan.
-----Original Message-----
From: Dan Goldberg <[email protected]>
To: "[email protected]" <[email protected]>
Date: Thu, 1 Feb 2018 18:44:24 +0000
Subject: RE: [RBASE-L] - File location
Do you use rbase to link the files to the database?
Here is a snippet of what I use to link the files to the line item in the
database.
SET VAR vefilename TEXT, vedir TEXT =(ENVVAL('userprofile') + '\Desktop')
SET VAR venewfilename TEXT, veloc INTEGER, velen INTEGER
SET VAR vefilename2 TEXT, veitemcnt INTEGER
SET VAR vefileexists TEXT, veyorn TEXT = NULL
--check for existing file
GETPROPERTY cfilename TEXTVALUE 'vefileexists'
IF vefileexists IS NOT NULL THEN
DIALOG 'File already is linked. Overwrite?' veyorn whtemp no +
CAPTION 'Link File'
IF veyorn = 'no' THEN
GOTO eendproc
ENDIF
ENDIF
--have user select the file and defaults to their desktop
PLUGINS loadfilename vefilename |fullpath on |TITLE SELECT file +
TO attach |view_mode list |initial_dir &vedir
--copy to folder
SET VAR venewfilename = ((CTXT(.VSupportID)) + (CTXT((JDATE(.#DATE)))) +
(CTXT +
(IHR(.#TIME))) + (CTXT(IMIN(.#TIME))) + (CTXT(ISEC(.#TIME))))
SET VAR vefilename2 = (SRPL(.vefilename,'.',',',0))
SET VAR veitemcnt = (ITEMCNT(.vefilename2))
SET VAR venewfilename = ('\\servername\sharename\RecAtt\ST' + .venewfilename
+ +
'.' + (SSUB (.vefilename2, .veitemcnt)))
--copy to the network share and gives it a unique name
COPY .vefilename .venewfilename
--place link name in db
PROPERTY cfilename TEXTVALUE .venewfilename
LABEL eendproc
CLEAR VAR ve%
RETURN
From: [email protected] [mailto:[email protected]] On Behalf
Ofjan johansen
Sent: Thursday, February 1, 2018 9:56 AM
To: [email protected]
Subject: [RBASE-L] - File location
My turn!
I need to make sure external documents are placed in the proper directory.
On the surface it's pretty easy.
However I have been running into some obstacles.
1. UNC/Mapped drive - machines on the network either use a UNC connection or
a mapped drive make it difficult to figure out the "home" directory
2. It appears (only occasionally) that the (CVAL('CURRDIR')) returns a
directory other that RBase if you have used the file explorer tool.
So I'm kind of looking for a fool proof way of making sure I have the proper
file location.
Suggestions?
Jan
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
[http://www.rbase.com/support/usersgroup_guidelines.php]
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected]
[mailto:[email protected]].
For more options, visit https://groups.google.com/d/optout
[https://groups.google.com/d/optout].
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
[http://www.rbase.com/support/usersgroup_guidelines.php]
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected]
[mailto:[email protected]].
For more options, visit https://groups.google.com/d/optout
[https://groups.google.com/d/optout].
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.