Wiki

Scale Your Enterprise

User Tools

Site Tools


bw2:file_writer_tool

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
bw2:file_writer_tool [2021/02/09 16:39]
akoehler
bw2:file_writer_tool [2024/09/24 16:22] (current)
dlee [File Writer Variables]
Line 1: Line 1:
-====== Introduction (File Writer)====== 
- 
-This page describes the use of the “File Writer” tool in Bizweaver. Information regarding the associated File Operations and File Reader tools is found in separate documents. 
  
 ====== File Writer Tool ====== ====== File Writer Tool ======
Line 113: Line 110:
 The first step within the loop is to gather the detail for each specific record. The SQL statement to do this is: The first step within the loop is to gather the detail for each specific record. The SQL statement to do this is:
  
-<code sql> Select FileNameFileContent from TWBS_VGO_FormAttachments where [ID] = +<code sql>SELECT fileName 
- +     ,fileContent 
-WorkFlow(SQLCommand1).Get({FIELD_ID}) </code>+FROM twbs_vgo_formAttachments  
 +WHERE id = WorkFlow(SQLCommand1).Get({FIELD_ID}) </code>
  
 The two values are then used in the File Writer step. The two values are then used in the File Writer step.
Line 158: Line 156:
 /* Convert image data to base64 Binary and insert it into a holding table named SignatureCapture. /* Convert image data to base64 Binary and insert it into a holding table named SignatureCapture.
 Assumes a text field named “Name” is used to capture the signature name */ 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, CreateDateTime) (ObjectID, ControlID, RecordId, FileName, FileType, FileContent, CreateDateTime)
-select +SELECT 
-@Object,'SigCapture',@vgoRecNum, isnull(Name,'None'), 'image/png', +     @Object 
-cast('' as xml).value('xs:base64Binary(sql:variable("@convstring"))', 'varbinary(max)'), getdate() +     ,'SigCapture' 
-from F2_SigCapture where vgoRecNum = @vgoRecNum+     ,@vgoRecNum 
 +     ,ISNULL(Name,'None') 
 +     ,'image/png' 
 +     ,CAST('' AS xml).value('xs:base64Binary(sql:variable("@convstring"))' 
 +     ,'varbinary(max)') 
 +     ,GETDATE() 
 +FROM F2_SigCapture 
 +WHERE vgoRecNum = @vgoRecNum
 </code> </code>
  
Line 174: Line 179:
 ====Option 2==== ====Option 2====
 The signature image can also be converted as needed in a Bizweaver workflow.  In this case, a SQLCommand step is used to parse out the signature data using <code sql>substring(Signature,23,999999)</code> on the database column that holds the signature data.  This step feeds into a FileWriter step using the Binary Output option to convert the base64 data back to an image file, saved to disk for subsequent use. The signature image can also be converted as needed in a Bizweaver workflow.  In this case, a SQLCommand step is used to parse out the signature data using <code sql>substring(Signature,23,999999)</code> on the database column that holds the signature data.  This step feeds into a FileWriter step using the Binary Output option to convert the base64 data back to an image file, saved to disk for subsequent use.
 +
 +
 +====File Writer Variables====
 +^Name         ^ Description         
 +| AppendData         | True or False if the append data radio button was selected        |
 +| BinaryData|      The value that was entered in the binary data section if any              |
 +|ColumnID| If create a file for records - grouped by is selected it will display the current record that is being grouped|
 +| CreateFileForAllRecords          | True or False if the create file for all records radio button was selected|
 +| CreateFileForGroupedRecords |True or False if the create a file for grouped records radio button was selected|
 +| CustomSeparator         |Will display the customer separator if any is selected|
 +| DataSourceWorkFlowID          |The source of the data that is being used in the file writer tool|
 +| EnableBinaryData |True or False if the binary data radio button is selected|
 +| EnableColumnHeaders          |True or False if the enable column headers radio button is selected|
 +|EnableDataSource          |True or False if there is a data source used|
 +| EnableStringBuilder |True or False if custom string radio button is selected|
 +| FileName          |The file location where the file that is being created is being saved with extension|
 +| FileType          |The file type that is selected ex. JSON,XML,Comma Seperated|
 +|FormattedStringBody |The value that was entered in the body section of the custom string if any|
 +| FormattedStringFooter         |The value that was entered in the footer section of the custom string if any|
 +| FormattedStringHeader         |The value that was entered in the header section of the custom string if any|
 +| StepMessage|During a failure the reason for failure will be populated here |
 +| StepStatus        |True or False|
 +
 +----
 +**[[bizweaver:Home|Home]]**
bw2/file_writer_tool.1612906767.txt.gz · Last modified: 2021/02/09 16:39 by akoehler