|
||
This is the default procedure for creating, editing and deleting data sets.
This is a multi-mode form that is called with a parameter that tells it to be in INSERT, EDIT or DELETE mode.
In this mode the procedure is configured to add a new data set.
Procedure Features
Data Set Type
ProPath supports "Managed Folder" data sets (that live below the FOLDER:MAINData location) as well as data sets that are in other locations.
The default is to create new data set folders below the FOLDER:MAINData location.
If the "Select another location" option is selected, the Managed Folder name field will be disabled and the Full Data Path (as well as the [ ... ] FILE DIALOG button will be enabled.
The "Find a Managed Data Set Folder" button will be disabled if the "Select another location" data type is selected.
Data Set Name
By default ProPath will assign data set names based on the word "DataSet" and a number indicating the number of data sets added.
The user can change this descriptive name.
It is the name used to identify the data set in the list and all properties for the data set are stored with this name.
Managed Folder
By default ProPath will assign a folder name to that as the same as the suggested data set name.
The user can change this descriptive name.
It is the name used to create the managed folder below the FOLDER:MAINData location.
Full Data Path
By default ProPath will build this value using this formula:
FullDataPath = CLIP( FOLDER:MAINData ) & '\' & CLIP( ManagedFolder )
If the Data Set Type is to create a managed folder, then this field is read-only and the FILE DIALOG button is disabled.
Find Managed Data Set Folder Button
The "Find a Managed Data Set Folder" button allows the user to open a FILE DIALOG to browse for an existing folder under the FOLDER:MAINData location.
It is typically used to "re-connect" to a data set that was deleted from the list (files are NOT deleted when you delete a data set) or to select existing data sets for inclusion in a pick list.
Ok and Cancel Buttons
The Ok button creates the data set folder (for managed folders that do not exist), adds the data set to the pick list and closes the window.
The Cancel button exits the window without creating a new data set for the pick list.
New data sets are added to the pick list and activated as the current record.
In this mode the procedure is configured to add a new data set.
Note that certain features are enabled/disabled here based on the Data Set Type.
Managed Folder Data Types
When editing a Managed Folder Data Set, you see this screen view:
The user can change the Data Set Name.
They can also pick a new folder (from below the FOLDER:MAINData location) to relate to that name.
The Full Data Path and FILE DIALOG for it are disabled, but the Full Data Path will be updated if a different folder is selected.
Other Location Data Types
When editing a Other Location Data Set, you see this screen view:
The user can change is the Data Set Name.
They can also pick a new folder with the [ ... ] FILE DIALOG button.
The "Find a Managed Data Set Folder" FILE DIALOG button is disabled.
Note, the Find a Managed Data Set Folder button is a normal FILE DIALOG, it is just coded to open into the FOLDER:MAINData location and expects to pick up a folder from there. It takes the name of the folder and builds the path with the FOLDER:MAINData location and that value.
The [ ... ] FILE DIALOG button opens to the application folder and does no post file processing with the path.
In this mode the procedure is configured to delete new data set.
There is an extra warning that appears in this mode to make sure the user knows what they are doing.
All entry fields are disabled and the file dialog buttons are hidden.
Common Controls
In all modes the Ok button completes the action and closes the window. Cancel aborts the action and closes the window.
A Note About Deleting Data Sets
To prevent against accidental deletion of data, the actual folders and files are NOT deleted. The data set is merely removed from the pick list.
To actually remove the files have your users use the Explore button to access the data folder and then delete the files in Windows Explorer.
If a data set is accidentally deleted from the pick list, the user can add a new data set and then pick the managed folder or other path with the FILE DIALOG buttons to re link to the data.