|
developing your new Answer Box Type
| ▪ | First create a class within a DLL |
| ▪ | The class has 5 sub/functions which are referenced by Kontinuum |
| ▪ | They are inherited from the AnswerBoxTypeTemplate class and can be overridden |
| ▪ | The UpdateValueString is triggered when the form is submitted by the End User and the form is not being submitted for the first time |
| ▪ | The new value now being stored in the database needs to be set as the property ValueToReDisplay for the ref_Answer parameter |
| ▪ | The InsertValueString is triggered when the form is submitted by the End user and the form is being submitted for the first time |
| ▪ | The value for the column(s) that are being inserted into needs to be appended to the ref_Cols string and the values that are being inserted need to be appended to the ref_vals string |
| ▪ | The columns must be separated by a comma |
| ▪ | The Draw Function draws the Answer Box Type in web forms and when required in Parameter forms and Item/Task Lists |
| ▪ | This should return a text string of how to draw this item |
| ▪ | The GetDatabaseValue Sub must populate the ValueInDatabase property for the ref_Answer parameter |
| ▪ | The GetValue Sub must determine what the current value to display should be |
| ▪ | For example: If the user fills out the Answer Box type and a form refresh occurs what should be the new value in the Answer box |
| ▪ | Below is the syntax required for creating an Answer Box Type in VB.NET |
| ▪ | The Answer Box Type has the following format: |
| ▪ | Inherits WebandFlo2005External.AnswerBoxTypeTemplate |
| ▪ | Public class NewAnswerBoxType |
| ▪ | 'When updating a value the procedure must update the ref_SetClause which is an SQL set clause |
| ▪ | Public Sub UpdateValueString(ByRef ref_SetClause As String, _ |
| ▪ | ByRef ref_Answer As WebAndFlo2005Form.Answer) |
| ▪ | 'When inserting a value the procedure must update the ref_SetClause which is an SQL set clause |
| ▪ | Public Sub InsertValueStrings(ByRef ref_Cols As String, _ |
| ▪ | ByRef ref_Vals As String, _ |
| ▪ | ByRef ref_Answer As WebAndFlo2005Form.Answer) |
| ▪ | 'The HTML to display when the Answer Box is drawn in a Data Capture Form or Itemlist: |
| ▪ | Public Function Draw(ByRef ref_Answer As WebAndFlo2005Form.Answer) As String |
| ▪ | 'Get the property of the Answer to the value retrieved from the database |
| ▪ | Public Sub GetDatabaseValue(ByRef ref_Answer As WebAndFlo2005Form.Answer, _ |
| ▪ | ByRef ref_RS As SqlDataReader) |
| ▪ | 'Get the property of the Answer to show to the user |
| ▪ | Public Sub GetValue(ByRef ref_Question As WebAndFlo2005Form.Questions, _ |
| ▪ | ByRef ref_Row As WebAndFlo2005Form.Row, _ |
| ▪ | ByRef ref_NoFormCheck As Boolean, _ |
| ▪ | ByRef ref_Answer As WebAndFlo2005Form.Answer, _ |
| ▪ | ByVal val_RowNumber As Short) |
integrating the new Answer Box Type into Kontinuum
| ▪ | Open your local Kontinuum website |
| ▪ | Login with Username and Password given to you by your Kontinuum Administrator |
| ▪ | Select Admin à System from the top menu bar |
| ▪ | Click on the User Defined Answer Boxes folder |
| ▪ | Click Add Answer Box from the Pop Up menu |
| ▪ | In the form that appears type in the bottom right frame enter the name of the dll and the Class you have created |
| ▪ | Note: This name must be exact and is case sensitive |
| ▪ | Select the rules that apply to this answer box type |
| ▪ | Click once on the Submit button |
| ▪ | Gates are loaded into memory when the Kontinuum Workflow suite starts |
| ▪ | Copy your dll into the bin directory for the Kontinuum suite and this will cause Kontinuum to restart |
| ▪ | Note: When doing this everyone using Kontinuum will be forced to login again and any forms they may have been filling out at the time will be lost
|
|