<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dataflex.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Peter+Brooks</id>
	<title>DataFlex Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dataflex.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Peter+Brooks"/>
	<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Special:Contributions/Peter_Brooks"/>
	<updated>2026-04-21T14:50:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Add_Workspace_Parameter&amp;diff=1530</id>
		<title>Add Workspace Parameter</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Add_Workspace_Parameter&amp;diff=1530"/>
		<updated>2007-12-09T22:29:48Z</updated>

		<summary type="html">&lt;p&gt;Peter Brooks: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to add a parameter in your .ws file and pass it in to your program. In this example I need to know where the document folder is found for each user, usually the same location for all users. This then allows the Docs folder to be found anywhere on a network. I use a global variable to store the location. If not defined in the .ws file default it from the home location.&lt;br /&gt;
&lt;br /&gt;
I just put this code near the bottom of the source (.src)&lt;br /&gt;
&lt;br /&gt;
 Function MyValueWS String sKey Returns String&lt;br /&gt;
    String sValue&lt;br /&gt;
    String sWorkspaceWSFile &lt;br /&gt;
    Handle hoWorkspace hoIniFile&lt;br /&gt;
    Move (phoWorkSpace(ghoApplication)) to hoWorkspace&lt;br /&gt;
    Get psWorkspaceWSFile of hoWorkspace to sWorkspaceWSFile &lt;br /&gt;
    Get Create U_cIniFile to hoIniFile&lt;br /&gt;
    Set psFilename of hoIniFile to sWorkspaceWSFile &lt;br /&gt;
    Get ReadString of hoIniFile &#039;Workspace&#039; sKey &#039; &#039; to sValue&lt;br /&gt;
    Send Destroy of hoIniFile &lt;br /&gt;
    Function_Return sValue&lt;br /&gt;
 End_Function&lt;br /&gt;
 &lt;br /&gt;
 Get MyValueWS &amp;quot;DocsFolder&amp;quot; to gsDocsFolder &lt;br /&gt;
 If gsDocsFolder eq &amp;quot;&amp;quot; Begin&lt;br /&gt;
    Get psHome of (phoWorkspace(oApplication(Self))) to gsDocsFolder&lt;br /&gt;
    Move (gsDocsFolder-&amp;quot;Docs&amp;quot;) to gsDocsFolder&lt;br /&gt;
 End&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 //The .ws file may look like this:&lt;br /&gt;
 [Workspace]&lt;br /&gt;
 Home=..\&lt;br /&gt;
 BitmapPath=.\Bitmaps&lt;br /&gt;
 DataPath=c:\Members\CEPU&lt;br /&gt;
 HelpPath=.\Help&lt;br /&gt;
 ProgramPath=.\Programs&lt;br /&gt;
 FileList=c:\Members\CEPU\Filelist.cfg&lt;br /&gt;
 Description=MASS - Membership Administration Software Solution - CEPU&lt;br /&gt;
 DocsFolder=c:\Test\Docs&lt;br /&gt;
&lt;br /&gt;
[[Category:How To]] [[Category:Cookbook]]&lt;/div&gt;</summary>
		<author><name>Peter Brooks</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Add_Workspace_Parameter&amp;diff=1529</id>
		<title>Add Workspace Parameter</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Add_Workspace_Parameter&amp;diff=1529"/>
		<updated>2007-12-09T22:26:51Z</updated>

		<summary type="html">&lt;p&gt;Peter Brooks: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to add a parameter in your .ws file and pass it in to your program. In this example I need to know where the document folder is found for each user, usually the same location for all users. This then allows the Docs folder to be found anywhere on a network. I use a global variable to store the location. If not defined in the .ws file default it from the home location.&lt;br /&gt;
&lt;br /&gt;
I just put this code near the bottom of the source (.src)&lt;br /&gt;
&lt;br /&gt;
 Function MyValueWS String sKey Returns String&lt;br /&gt;
    String sValue&lt;br /&gt;
    String sWorkspaceWSFile &lt;br /&gt;
    Handle hoWorkspace hoIniFile&lt;br /&gt;
    Move (phoWorkSpace(ghoApplication)) to hoWorkspace&lt;br /&gt;
    Get psWorkspaceWSFile of hoWorkspace to sWorkspaceWSFile &lt;br /&gt;
    Get Create U_cIniFile to hoIniFile&lt;br /&gt;
    Set psFilename of hoIniFile to sWorkspaceWSFile &lt;br /&gt;
    Get ReadString of hoIniFile &#039;Workspace&#039; sKey &#039; &#039; to sValue&lt;br /&gt;
    Send Destroy of hoIniFile &lt;br /&gt;
    Function_Return sValue&lt;br /&gt;
 End_Function&lt;br /&gt;
 &lt;br /&gt;
 Get MyValueWS &amp;quot;DocsFolder&amp;quot; to gsDocsFolder &lt;br /&gt;
 If gsDocsFolder eq &amp;quot;&amp;quot; Begin&lt;br /&gt;
    Get psHome of (phoWorkspace(oApplication(Self))) to gsDocsFolder&lt;br /&gt;
    Move (gsDocsFolder-&amp;quot;Docs&amp;quot;) to gsDocsFolder&lt;br /&gt;
 End&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 //The .ws file may look like this:&lt;br /&gt;
 Workspace]&lt;br /&gt;
 Home=..\&lt;br /&gt;
 BitmapPath=.\Bitmaps&lt;br /&gt;
 DataPath=c:\Members\CEPU&lt;br /&gt;
 HelpPath=.\Help&lt;br /&gt;
 ProgramPath=.\Programs&lt;br /&gt;
 FileList=c:\Members\CEPU\Filelist.cfg&lt;br /&gt;
 Description=MASS - Membership Administration Software Solution - CEPU&lt;br /&gt;
 DocsFolder=c:\Test\Docs&lt;br /&gt;
&lt;br /&gt;
[[Category:How To]] [[Category:Cookbook]]&lt;/div&gt;</summary>
		<author><name>Peter Brooks</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Category:How_To&amp;diff=1423</id>
		<title>Category:How To</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Category:How_To&amp;diff=1423"/>
		<updated>2007-12-04T23:16:29Z</updated>

		<summary type="html">&lt;p&gt;Peter Brooks: Workspace file - passing additional information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to add a parameter in your .ws file and pass it in to your program. In this example I need to know where the document folder is found for each user, usually the same location for all users. This then allows the Docs folder to be found anywhere on a network. I use a global variable to store the location. If not defined in the .ws file default it from the home location.&lt;br /&gt;
&lt;br /&gt;
I just put this code near the bottom of the source (.src)&lt;br /&gt;
&lt;br /&gt;
Function MyValueWS String sKey Returns String&lt;br /&gt;
   String sValue&lt;br /&gt;
   String sWorkspaceWSFile &lt;br /&gt;
   Handle hoWorkspace hoIniFile&lt;br /&gt;
   Move (phoWorkSpace(ghoApplication)) to hoWorkspace&lt;br /&gt;
   Get psWorkspaceWSFile of hoWorkspace to sWorkspaceWSFile &lt;br /&gt;
   Get Create U_cIniFile to hoIniFile&lt;br /&gt;
   Set psFilename of hoIniFile to sWorkspaceWSFile &lt;br /&gt;
   Get ReadString of hoIniFile &#039;Workspace&#039; sKey &#039; &#039; to sValue&lt;br /&gt;
   Function_Return sValue&lt;br /&gt;
End_Function&lt;br /&gt;
&lt;br /&gt;
Get MyValueWS &amp;quot;DocsFolder&amp;quot; to gsDocsFolder &lt;br /&gt;
If gsDocsFolder eq &amp;quot;&amp;quot; Begin&lt;br /&gt;
   Get psHome of (phoWorkspace(oApplication(Self))) to gsDocsFolder&lt;br /&gt;
   Move (gsDocsFolder-&amp;quot;Docs&amp;quot;) to gsDocsFolder&lt;br /&gt;
End&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//The .ws file may look like this:&lt;br /&gt;
Workspace]&lt;br /&gt;
Home=..\&lt;br /&gt;
BitmapPath=.\Bitmaps&lt;br /&gt;
DataPath=c:\Members\CEPU&lt;br /&gt;
HelpPath=.\Help&lt;br /&gt;
ProgramPath=.\Programs&lt;br /&gt;
FileList=c:\Members\CEPU\Filelist.cfg&lt;br /&gt;
Description=MASS - Membership Administration Software Solution - CEPU&lt;br /&gt;
DocsFolder=c:\Test\Docs&lt;/div&gt;</summary>
		<author><name>Peter Brooks</name></author>
	</entry>
</feed>