This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
bw:file_writer_tool [2019/10/14 15:21] runger [File Writer Tool] |
bw:file_writer_tool [2022/08/02 15:29] (current) akoehler |
||
|---|---|---|---|
| Line 20: | Line 20: | ||
| The **Datasource** output option is used to write the input data set as it is received and create the file with data records only. Use the **Custom String** output method if header and footer sections, or custom column headings, are needed as well. No Bizweaver looping is required. | The **Datasource** output option is used to write the input data set as it is received and create the file with data records only. Use the **Custom String** output method if header and footer sections, or custom column headings, are needed as well. No Bizweaver looping is required. | ||
| - | {{: | + | {{ : |
| - Enter the **Filename** (target folder and file name) for the output file. | - Enter the **Filename** (target folder and file name) for the output file. | ||
| Line 50: | Line 50: | ||
| </ | </ | ||
| - | {{: | + | {{ : |
| - Enter the **Filename** (target folder and file name) for the output file. | - Enter the **Filename** (target folder and file name) for the output file. | ||
| Line 96: | Line 96: | ||
| The image below illustrates the record structure. The column headings in yellow are used to obtain the needed data. | The image below illustrates the record structure. The column headings in yellow are used to obtain the needed data. | ||
| - | {{: | + | {{ : |
| - **ID** is the unique record ID in the table. | - **ID** is the unique record ID in the table. | ||
| Line 122: | Line 122: | ||
| * The FileContent variable indicates what data is to be written out | * The FileContent variable indicates what data is to be written out | ||
| - | {{: | + | {{ : |
| This process occurs for each record passed into the loop. The recreated files are created in the designated folder using their original name. | This process occurs for each record passed into the loop. The recreated files are created in the designated folder using their original name. | ||
| Line 132: | Line 132: | ||
| The Binary Output option can also be used to convert a signature captured in a Versago Form into a file on disk. The process is like the one described above but requires some additional pre-processing. | The Binary Output option can also be used to convert a signature captured in a Versago Form into a file on disk. The process is like the one described above but requires some additional pre-processing. | ||
| - | Signature data is stored in a column in the table used by the Versago Form. It is stored in a format that must be converted back to BASE64 | + | Signature data is stored in a column in the table used by the Versago Form. It is stored in a format that must be converted back to base64 |
| + | |||
| + | ====Option 1==== | ||
| + | When you know that a form will be capturing a signature, the conversion can be done in the **CustomPostExecute** procedure. The framework code shown below can be included in the CustomPostExecute procedure, the framework procedure can be called from the CustomPostExecute procedure. The framework | ||
| <code sql> | <code sql> | ||
| Line 139: | Line 142: | ||
| /* | /* | ||
| 12/AUG/2018 (R Unger / TWBS) | 12/AUG/2018 (R Unger / TWBS) | ||
| - | Used to convert a signature image from text to BASE64 Binary | + | Used to convert a signature image from text to base64 binary |
| -- | -- | ||
| @vgoRecNum and vgoRecNum are the primary key of the table. Change as needed. | @vgoRecNum and vgoRecNum are the primary key of the table. Change as needed. | ||
| + | @ObjectID is the form ID. Change as needed. | ||
| F2_SigCapture is the Versago table. Change name as needed. | F2_SigCapture is the Versago table. Change name as needed. | ||
| */ | */ | ||
| - | declare @ConvString nvarchar(max) | + | declare @ConvString nvarchar(max), @ObjectID int |
| + | set @ObjectID = 1 | ||
| -- | -- | ||
| -- Parse out image data from text string | -- Parse out image data from text string | ||
| Line 151: | Line 156: | ||
| from F2_SigCapture where vgoRecNum = @vgoRecNum | from F2_SigCapture where vgoRecNum = @vgoRecNum | ||
| -- | -- | ||
| - | /* Convert image data to BASE64 | + | /* Convert image data to base64 |
| + | Assumes a text field named “Name” is used to capture the signature name */ | ||
| insert into SignatureConvert | insert into SignatureConvert | ||
| (ObjectID, ControlID, RecordId, FileName, FileType, FileContent, | (ObjectID, ControlID, RecordId, FileName, FileType, FileContent, | ||
| select | select | ||
| - | 1,' | + | @Object,' |
| cast('' | cast('' | ||
| from F2_SigCapture where vgoRecNum = @vgoRecNum | from F2_SigCapture where vgoRecNum = @vgoRecNum | ||
| Line 162: | Line 168: | ||
| The image below illustrates the record structure of the “SignatureCapture” table. The column headings in yellow are used to obtain the needed data. | The image below illustrates the record structure of the “SignatureCapture” table. The column headings in yellow are used to obtain the needed data. | ||
| - | {{: | + | {{ : |
| The conversion to disk file is then the same as described in Uploaded Versago Data section above. | The conversion to disk file is then the same as described in Uploaded Versago Data section above. | ||
| + | |||
| + | ====Option 2==== | ||
| + | The signature image can also be converted as needed in a Bizweaver workflow. | ||
| + | |||
| + | ====File Writer Variables==== | ||
| + | ^Name ^ Description | ||
| + | | AppendData | ||
| + | | BinaryData| | ||
| + | |ColumnID| If create a file for records - grouped by is selected it will display the current record that is being grouped| | ||
| + | | CreateFileForAllRecords | ||
| + | | CreateFileForGroupedRecords |True or False if the create a file for grouped records radio button was selected| | ||
| + | | CustomSeparator | ||
| + | | DataSourceWorkFlowID | ||
| + | | EnableBinaryData |True or False if the binary data radio button is selected| | ||
| + | | EnableColumnHeaders | ||
| + | |EnableDataSource | ||
| + | | EnableStringBuilder |True or False if custom string radio button is selected| | ||
| + | | FileName | ||
| + | | FileType | ||
| + | |FormattedStringBody |The value that was entered in the body section of the custom string if any| | ||
| + | | FormattedStringFooter | ||
| + | | FormattedStringHeader | ||
| + | | StepMessage|During a failure the reason for failure will be populated here | | ||
| + | | StepStatus | ||
| + | |||