softone blackbook eng_v.1.0

Upload: nick

Post on 05-Jul-2018

339 views

Category:

Documents


8 download

TRANSCRIPT

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    1/321

      Contents

    1 | P a g e  

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    2/321

      Contents

    2 | P a g e  

    CONTENTS

    CHAPTER 1 Screen Forms ............................................................................................................ 11 Overview ................................................................................................................................................. 12 

    A. Form Design ....................................................................................................................................... 13 A.1 Design Options ..................................................................................................................................................................................... 15 

    A.2 Toolbar Overview ................................................................................................................................................................................. 16 

    B. Layout Controls .................................................................................................................................. 24 B.1 Tabs .............. ................. ................ ................. ................ ................ ................ ................. ................ ................ ................. ................ .......... 24 

    B.2 Panels ................ ................ ................. ................ ................ ................ ................. ................ ................. ................ ................ ................. .... 25 

    B.3 Nested Panels ........................................................................................................................................................................................ 26 

    B.4 Sub Forms................................................................................................................................................................................................ 27 

    C. Data Controls ...................................................................................................................................... 31 C.1 String Textbox ....................................................................................................................................................................................... 31 

    C.2 Numeric Textbox .................................................................................................................................................................................. 33 

    C.3 Memo Textbox ...................................................................................................................................................................................... 35 

    C.4 Password Textbox ................................................................................................................................................................................ 36 

    C.5 Webpage / Email Textbox ................................................................................................................................................................. 37 

    C.6 Datagrid ................................................................................................................................................................................................... 38 

    C.7 Selector List ............................................................................................................................................................................................ 40 

    C.8 Combo Box ............................................................................................................................................................................................. 41 

    C.9 Text Picker ............................................................................................................................................................................................... 42 

    C.10 Checkbox............................................................................................................................................................................................... 43 

    C.11 Multiple Checkbox ............................................................................................................................................................................ 44 C.12 Image ................. ............... ................. ................ ................. ................ ................. ................ ................. ............... ................. ................ .. 45 

    C.13 HTML Editor ......................................................................................................................................................................................... 46 

    C.14 SoftOne Spreadsheet ....................................................................................................................................................................... 47 

    C.15 Datetime ................ ................ ................ ................. ................ ................. ................ ................. ................ ................ ................ ............. 48 

    D. Dialog Controls .................................................................................................................................. 50 D.1 File Picker ................................................................................................................................................................................................ 50 

    D.2 Color Picker ............................................................................................................................................................................................ 51 

    D.3 Printers Picker ................ ................ ................. ................ ................. ................ ................ ................. ................ ................ ................. .... 52 

    D.4 Time Scheduler ..................................................................................................................................................................................... 53 

    E. Command Controls ............................................................................................................................ 54 E.1 Buttons ................. ............... ................. ................ ................. ................ ................. ................ ................. ............... ................. ................ .. 54 

    E.2 Hyperlinks ................ ................ ................ ................. ................ ................. ................ ................. ................ ................ ................ ............. 56 

    F. Editor Commands ............................................................................................................................... 57 

    G. Editor Attributes ................................................................................................................................ 58 

    CHAPTER 2 Browsers ................................................................................................................... 59 

    Overview ................................................................................................................................................. 60 

    A. Toolbar Buttons ................................................................................................................................. 61 

    B. Columns & Attributes ........................................................................................................................ 62 

    B.1 Field Settings .......................................................................................................................................................................................... 63 B.2 General Settings .................................................................................................................................................................................... 64 

    C. Filters ................................................................................................................................................... 65 

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    3/321

      Contents

    3 | P a g e  

    D. Grouping ............................................................................................................................................ 65 

    E. Sorting ................................................................................................................................................. 66 

    F. Parent / Child Browsers ..................................................................................................................... 67 

    G. User-defined Tables .......................................................................................................................... 69 

    CHAPTER 3 Printout Forms ......................................................................................................... 72 

    A. General Printing Features ................................................................................................................. 73 A.1 Printer Settings...................................................................................................................................................................................... 73 

    A.2 Available Printing Methods .............................................................................................................................................................. 74 

    A.3 Printout Form Types............................................................................................................................................................................ 74 

    A.4 Import / Export Printout Forms ...................................................................................................................................................... 75 

    B. Internal Printout Forms ..................................................................................................................... 76 B.1 Sections ............... ................ ................ ................ ................. ................ ................. ................ ................. ............... ................. ................ .. 76 

    B.2 Toolbar...................................................................................................................................................................................................... 77 

    B.3 General Form Operations .................................................................................................................................................................. 78 

    B.4 Page Size .................................................................................................................................................................................................. 79 

    B.5 Draft Printout Fonts ............................................................................................................................................................................. 80 B.6 Image Printout Fonts .......................................................................................................................................................................... 80 

    B.7 Recurrent Zone ...................................................................................................................................................................................... 81 

    B.8 Band Image ............................................................................................................................................................................................. 81 

    C. Ms-Word Printout Forms .................................................................................................................. 82 C.1 Add Form ................................................................................................................................................................................................. 82 

    C.2 Form Design ........................................................................................................................................................................................... 82 

    C.3 Filters – Sorting – Grouping ................ ................. ................ ................ ................. ................ ................. ................ ................ .......... 83 

    C.4 Field decimals ........................................................................................................................................................................................ 83 

    C.5 Report Footer ......................................................................................................................................................................................... 84 

    C.6 Item Image .............................................................................................................................................................................................. 85 

    C.7 Text wrap ................................................................................................................................................................................................. 86 D. Ms-Excel Printout Forms ................................................................................................................... 87 

    D.1 Insert Form ............................................................................................................................................................................................. 87 

    D.2 Form Design ........................................................................................................................................................................................... 87 

    E. Label Printout Forms.......................................................................................................................... 88 

    F. Crystal Reports Printout Forms......................................................................................................... 89 F.1 Basics ......................................................................................................................................................................................................... 89 

    F.2 Crystal Report Design ......................................................................................................................................................................... 90 

    F.3 Reports using tables ............................................................................................................................................................................ 91 

    F.4 Create Reports using commands ................................................................................................................................................... 93 

    F.5 Import Crystal Report into SoftOne .............................................................................................................................................. 94  G. Automations ....................................................................................................................................... 95 

    G.1 Auto Email............................................................................................................................................................................................... 95 

    G.2 Auto Save to file ................................................................................................................................................................................... 96 

    CHAPTER 4 Event Driven Actions (EDA - Alerts) ...................................................................... 97  

    Overview ................................................................................................................................................. 98 

    A. Events & Conditions .......................................................................................................................... 98 A.1 Field Rule (On Change) ...................................................................................................................................................................... 98 

    A.2 Table Rule ................................................................................................................................................................................................ 99 

    A.3 Module Rule ........................................................................................................................................................................................ 100 A.4 Index – Search Conditions ............................................................................................................................................................. 102 

    B. Actions .............................................................................................................................................. 103 B.1 Send Message ..................................................................................................................................................................................... 103 

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    4/321

      Contents

    4 | P a g e  

    B.2 Display Message (Notification) .................................................................................................................................................... 104 

    B.3 Error Display (Exception) ................................................................................................................................................................ 104 

    B.4 Run .......................................................................................................................................................................................................... 104 

    B.5 Update ................................................................................................................................................................................................... 104 

    B.6 Reminder .............................................................................................................................................................................................. 104 

    C. Examples ........................................................................................................................................... 105 C.1 Field Rule – Message display ........................................................................................................................................................ 105 

    C.2 Table Rule – Error message display ........................................................................................................................................... 105 

    C.3 Object Rule – Message send ........................................................................................................................................................ 106 

    C.4 Index –  search condition ................................................................................................................................................................ 106 

    CHAPTER 5 Defined Fields ........................................................................................................ 107  

    A. Basics ................................................................................................................................................. 108 

    B. Operation Options ........................................................................................................................... 109 B.1 Line Balance / Calculation .............................................................................................................................................................. 109 

    B.2 Calculation of line+totals ............................................................................................................................................................... 116 

    B.3 SQL command .................................................................................................................................................................................... 116 

    B.4 Question ................ ................ ................. ................ ................. ................ ................ ................. ................ ................ ................. ............ 117 B.5 SQL Filter ............................................................................................................................................................................................... 119 

    B.6 Single filter / Multiple filter ........................................................................................................................................................... 119 

    B.7 Function ................................................................................................................................................................................................ 119 

    CHAPTER 6 Database Designer ................................................................................................ 120 

    A. Basics ................................................................................................................................................. 121 

    B. Fields ................................................................................................................................................. 124 B.1 Field Data Types ................................................................................................................................................................................. 125 

    B.2 Field Properties .................................................................................................................................................................................. 125 

    B.3 Editor Fields ......................................................................................................................................................................................... 126 C. Tables ................................................................................................................................................ 127 

    C.1 Table properties ................................................................................................................................................................................. 127 

    C.2 Tables in memory .............................................................................................................................................................................. 131 

    C.3 Child Tables ......................................................................................................................................................................................... 135 

    D. String Lists ........................................................................................................................................ 138 

    E. Database Views ................................................................................................................................. 139 E.1 Create Database View ...................................................................................................................................................................... 139 

    E.2 Database view redirection .............................................................................................................................................................. 139 

    E.3 Database View Examples ................................................................................................................................................................ 140 

    F. Objects ............................................................................................................................................... 144 F.1 Create Objects ..................................................................................................................................................................................... 144 F2. Object Properties ............................................................................................................................................................................... 145 

    F.3 Table Properties ................................................................................................................................................................................. 147 

    F.4 Field Properties ................................................................................................................................................................................... 150 

    F.5 Calculated Fields ................................................................................................................................................................................ 151 

    F.6 Linked Tables ....................................................................................................................................................................................... 152 

    F.7 Browsers Design ................................................................................................................................................................................. 153 

    F.8 Forms Design ....................................................................................................................................................................................... 154 

    F.9 Display Object in Menu ................................................................................................................................................................... 156 

    F.10 Printout Forms .................................................................................................................................................................................. 157 

    F.11 Object Examples .............................................................................................................................................................................. 158 

    G. Virtual Tables ................................................................................................................................... 162 G.1 Design Virtual Table ......................................................................................................................................................................... 162 

    G.2 Virtual Table Example ...................................................................................................................................................................... 162 

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    5/321

      Contents

    5 | P a g e  

    H. Report Objects ................................................................................................................................. 164 H.1 Design Report Object ...................................................................................................................................................................... 164 

    H.2 Report Object Example ................................................................................................................................................................... 167 

    CHAPTER 7 Advanced Tools ...................................................................................................... 169 

    A. Auto Login from Windows Shortcut.............................................................................................. 170 

    A.1 Create a Windows Shortcut .......................................................................................................................................................... 170 A.2 Configuration of XCO connection file ....................................................................................................................................... 170  

    A.3 XCO file Commands ......................................................................................................................................................................... 171 

    A.4 EXEC Commands ............................................................................................................................................................................... 171 

    B. Maximum Entries per Module (Select Top) .................................................................................. 172 B.1 How to use ........................................................................................................................................................................................... 172 

    B.2 User define top entries .................................................................................................................................................................... 173 

    C. Design Menu – Menu Jobs .............................................................................................................. 174 C.1 Create Job ............................................................................................................................................................................................ 174 

    C.2 Job Types .............................................................................................................................................................................................. 175 

    C.3 Menu job parameters – Menu Commands ............................................................................................................................. 176 

    C.4 Examples of Menu Jobs .................................................................................................................................................................. 177 

    CHAPTER 8 Schedule Tasks ....................................................................................................... 178 

    A. Remote Server .................................................................................................................................. 179 A.1 Activation ............................................................................................................................................................................................. 180 

    A.2 Remote Server Commands ........................................................................................................................................................... 181 

    A.3 Send SMS - Email .............................................................................................................................................................................. 182 

    B. Windows Scheduler ......................................................................................................................... 184 B.1 SoftOne Scheduler Commands.................................................................................................................................................... 184 

    B.2 Windows Scheduler Task ................................................................................................................................................................ 185 

    B.3 XCO Connection File ........................................................................................................................................................................ 188 C. SoftOne Scheduler ........................................................................................................................... 189 

    C.1 Create Task .......................................................................................................................................................................................... 190 

    C.2 Scheduler Commands ..................................................................................................................................................................... 192 

    D. Messages – Reminder ...................................................................................................................... 193 

    CHAPTER 9 Form Scripts ........................................................................................................... 194 

    A. Object Methods ............................................................................................................................... 195 BATCHEXECUTE ......................................................................................................................................................................................... 195 

    BEEP ................................................................................................................................................................................................................ 195 

    CANCELEDITS ............................................................................................................................................................................................. 195 CLOSEAPPLICATION ................................................................................................................................................................................ 195 

    CLOSEFORM ................................................................................................................................................................................................ 195 

    CLOSESUBFORM (SubFormName: string) ....................................................................................................................................... 195 

    DBDELETE ..................................................................................................................................................................................................... 196 

    DBLOCATE (KeyData: variant) .............................................................................................................................................................. 196 

    DBINSERT ..................................................................................................................................................................................................... 196 

    DBPOST ......................................................................................................................................................................................................... 197 

    EXCEPTION (Message: string) .............................................................................................................................................................. 197 

    FIELDCOLOR (FieldName: string; UserColor: integer) ................................................................................................................ 197 

    FOCUSFIELD (FieldName: string) ........................................................................................................................................................ 198 

    FREE ................................................................................................................................................................................................................ 198 

    INVALIDATEFIELD (FieldName: string).............................................................................................................................................. 198 

    INCLUDE (filename: string) .................................................................................................................................................................... 198 

    OPENSUBFORM (SubFormName: string) ........................................................................................................................................ 198 

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    6/321

      Contents

    6 | P a g e  

    QUICKVIEW (ObjectName: string, ListName: string, Keydata: string) .................................................................................. 199 

    PRINTFORM (FormCode: integer; PrinterName: string; FileName: string) ............... ................ ................ ................ .......... 199 

    REFRESH ....................................................................................................................................................................................................... 199 

    RUNSQL (ASQL: string; AParams: Variant) ...................................................................................................................................... 199 

    SETDECIMALS (FieldName: string; Decimals: integer) ................................................................................................................ 199 

    SETDOCPRINT (PrintNum, Mode, TemplD: integer; PrinterName, Caption: string) ........................... ................ ............ 200 

    SETFIELDVALUE (FieldName: string; Value: Variant) ................................................................................................................... 200 

    SETPROPERTY ('MERCHANGELOG'; 'True or False') .................................................................................................................... 200 SETPROPERTY ('FIELD', FieldName', 'CAPTION', 'NewCaption') ............................................................................................. 200 

    SETPROPERTY ('FIELD or PANEL', Name', 'VISIBLE', 'True or False')...................................................................................... 200 

    SETFIELDEDITOR (FieldName: string; Editor: String) ................................................................................................................... 201 

    TOFILE (FileName, AMessage: string) ............................................................................................................................................... 201 

    WARNING (Message: string) ................................................................................................................................................................ 201 

    B. Object Functions .............................................................................................................................. 202 ASK (ACaption, AMessage: string): integer..................................................................................................................................... 202 

    CASE (IfCase, ThenCase, ElseCase: variant): Variant; ................................................................................................................... 202 

    CHECKMODULE(ModuleNum): Boolean ......................................................................................................................................... 202 

    CONNECTIONSTATUS: string; .............................................................................................................................................................. 202 

    CREATEOBJ (ObjectName: string): OBJECT (IDispatch) .............................................................................................................. 203 CREATEOBJFORM (ObjectName: string): OBJECT (IDispatch) ................................................................................................. 203 

    DOUBLE (StrNum: string): real ............................................................................................................................................................. 204 

    DIR (Name: string): string ...................................................................................................................................................................... 204 

    EVAL (Formula: string): Variant ............................................................................................................................................................ 204 

    EXEC (Command: string): variant ........................................................................................................................................................ 204 

    FINDTABLE (TableName: string): variant ......................................................................................................................................... 205 

    FILTERSUM (FieldName, Filter: string): real..................................................................................................................................... 205 

    FORM: string ............................................................................................................................................................................................... 205 

    FORMATFLOAT (Value: float; format: string): string.................................................................................................................... 205 

    FORMATDATE (Date: TDateTime; format: string): string ........................................................................................................... 206 

    FROMFILE (FileName: string): string .................................................................................................................................................. 206 GETYEARPERIOD (ADate: TDateTime): Variant .............................................................................................................................. 206 

    GETLASTERROR: string ............................................................................................................................................................................ 206 

    GETSQLDATASET (ASQL: string; AParams: Variant): TDataset ................................................................................................ 206 

    ID (TableName: string; code: string): integer ................................................................................................................................. 207 

    INPUTBOX (Prompt: string; DefaultValue: string): string .......................................................................................................... 207 

    INPUTQUERY (ACaption: string, APrompt: string, Value:Variant, vPassword:integer) : Variant ............... ................. . 207 

    ISVALIDCONTRACT: boolean ............................................................................................................................................................... 207 

    LIST: string ................................................................................................................................................................................................... 207 

    LOCALE: integer ......................................................................................................................................................................................... 207 

    LOCALESTRING (value: string): string ............................................................................................................................................... 207 

    LOGINDATE: TDateTime ......................................................................................................................................................................... 207 NEWID: integer .......................................................................................................................................................................................... 208 

    PASSWORDVALIDATE(stringtoValidate: string, Password: string): boolean ..................................................................... 208 

    PLAY (SoundFileName: string): boolean .......................................................................................................................................... 208 

    SHOWOBJFORM: integer ....................................................................................................................................................................... 208 

    SPELL (Num: Real): string ....................................................................................................................................................................... 208 

    SQL (ASQL: string; AParams: Variant): string .................................................................................................................................. 209 

    SUM (FieldName: string): real .............................................................................................................................................................. 209 

    TIME: string.................................................................................................................................................................................................. 209 

    USERVALIDATE(UserName: string, Password: string): boolean .............................................................................................. 209 

    C. Dataset Methods .............................................................................................................................. 210 

    APPEND ........................................................................................................................................................................................................ 210 DELETE ........................................................................................................................................................................................................... 210 

    DISABLECONTROLS ................................................................................................................................................................................. 210 

    ENABLECONTROLS .................................................................................................................................................................................. 211 

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    7/321

      Contents

    7 | P a g e  

    EDIT ................................................................................................................................................................................................................ 211 

    FIRST .............................................................................................................................................................................................................. 211 

    INSERT ........................................................................................................................................................................................................... 212 

    LAST................................................................................................................................................................................................................ 212 

    NEXT ............................................................................................................................................................................................................... 212 

    POST ............................................................................................................................................................................................................... 213 

    PRIOR ............................................................................................................................................................................................................. 213 

    SETREADONLY (FieldName: string, Value: True/False)............................................................................................................... 213 SETDATASETLINKS(ModuleHandle, DatasetHandle, Value) .................................................................................................... 213 

    D. Dataset Functions ............................................................................................................................ 214 ACTIVE: boolean ........................................................................................................................................................................................ 214 

    EOF: boolean............................................................................................................................................................................................... 214 

    FIELDBYNAME (FieldName: string): variant .................................................................................................................................... 214 

    FIELDCOUNT: integer .............................................................................................................................................................................. 214 

    FIELDNAME (index: integer): string .................................................................................................................................................... 214 

    FIELDS (index: integer): variant ............................................................................................................................................................ 214 

    FILTER: string .............................................................................................................................................................................................. 215 

    FILTERED: boolean .................................................................................................................................................................................... 215 

    ISNULL (FieldName: string): boolean ................................................................................................................................................ 215 GETGRAPH (LabelFieldName: string; ValueFieldName: string): string ................................................................................. 215 

    GETHTML (FieldNames: string): string .............................................................................................................................................. 216 

    GETXML (writemetadata: Boolean): string ...................................................................................................................................... 216 

    LOCATE (FieldNames: string; FieldValues: variant): boolean ................................................................................................... 217 

    LOOKUP (KeyFields: string; KeyValues: Variant; ResultFields: string): Variant; ................................................................. 217 

    RECNO: integer .......................................................................................................................................................................................... 217 

    RECORDCOUNT: integer ........................................................................................................................................................................ 217 

    STATE: integer ............................................................................................................................................................................................ 217 

    E. Field Events ....................................................................................................................................... 218 ON___VALIDATE ............................................................................................................................ 218 

    ON__................................................................................................................................................... 218 

    F. Dataset Events .................................................................................................................................. 218 ON__POST .................................................................................................................................................................. 218 

    ON__AFTERPOST ..................................................................................................................................................... 218 

    ON__NEW ................................................................................................................................................................... 218 

    ON__BEFOREDELETE .............................................................................................................................................. 218 

    ON__AFTERDELETE ................................................................................................................................................. 218 

    G. Object Events ................................................................................................................................... 219 ON_CREATE ................................................................................................................................................................................................. 219 

    ON_DESTROY ............................................................................................................................................................................................. 219 

    ON_CANCEL ................................................................................................................................................................................................ 219 ON_LOCATE ................................................................................................................................................................................................ 219 

    ON_POST ...................................................................................................................................................................................................... 219 

    ON_AFTERPOST ......................................................................................................................................................................................... 219 

    ON_DELETE .................................................................................................................................................................................................. 219 

    ON_AFTERDELETE ..................................................................................................................................................................................... 219 

    ON_INSERT .................................................................................................................................................................................................. 219 

    ON_DOCPRINT ........................................................................................................................................................................................... 219 

    ON_OPENREPORT .................................................................................................................................................................................... 219 

    EXECCOMMAND (cmd) .......................................................................................................................................................................... 219 

    ON_RESTOREEVENTS .............................................................................................................................................................................. 219 

    ON_EDIT ....................................................................................................................................................................................................... 219 EXECCOMMAND(cmd) (cmd=-1) ....................................................................................................................................................... 219 

    EXECCOMMAND(cmd) (cmd=-2) ....................................................................................................................................................... 220 

    H. Sub Form Events .............................................................................................................................. 220 

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    8/321

      Contents

    8 | P a g e  

    ON__SHOW ................ ................. ................ ................. ................ ................. ................ ................ ................ .......... 220 

    ON__ACCEPT .......................................................................................................................................................... 220 

    ON__CANCEL.......................................................................................................................................................... 220 

    I. Line Printing Events .......................................................................................................................... 221 ON_BANDSTART (BandName) ................ ................. ................ ................. ................ ................. ................ ................ ................ .......... 221 

    ON_BANDEND (BandName) ............... ................ ................. ................ ................. ................ ................. ............... ................. ............... 221 

    ON_BANDLINE (BandName)................................................................................................................................................................. 221 

    ON_BANDTRANSFER (BandName) .................................................................................................................................................... 221 

    J. Case Studies ...................................................................................................................................... 222 Case Study 1 ............................................................................................................................................................................................... 222 

    Case Study 2 ............................................................................................................................................................................................... 224 

    Case Study 3 ............................................................................................................................................................................................... 225 

    Case Study 4 ............................................................................................................................................................................................... 226 

    Case Study 5 ............................................................................................................................................................................................... 228 

    Case Study 6 ............................................................................................................................................................................................... 230 

    Case Study 7 ............................................................................................................................................................................................... 232 

    CHAPTER 10 Data Flows ........................................................................................................... 236 A. Overview ........................................................................................................................................... 237 

    B. Data Flow Rules ................................................................................................................................ 238 B.1 Source entity ....................................................................................................................................................................................... 238 

    B.2 Target entity ........................................................................................................................................................................................ 239 

    B.3 Runtime Settings ............................................................................................................................................................................... 241 

    C. Data Flow Scenarios ......................................................................................................................... 242 

    D. Execute Data Flows from Screen Scripts ....................................................................................... 243 

    E. Case Studies ...................................................................................................................................... 244 Case Study 1 ............................................................................................................................................................................................... 244 

    Case Study 2 ............................................................................................................................................................................................... 245 Case Study 3 ............................................................................................................................................................................................... 247 

    Case Study 4 ............................................................................................................................................................................................... 249 

    Case Study 5 ............................................................................................................................................................................................... 250 

    CHAPTER 11 SoftOne Batch Script Language (SBSL) ............................................................. 251 

    A. Overview ........................................................................................................................................... 252 

    B. Syntax Basics .................................................................................................................................... 253 B.1 Case Insensitive .................................................................................................................................................................................. 253 

    B.2 Semicolons ........................................................................................................................................................................................... 253 

    B.3 Comments ............................................................................................................................................................................................ 253 B.4 Variables ................ ................ ................. ................ ................. ................ ................ ................. ................ ................ ................. ............ 253 

    B.5 Libraries References.......................................................................................................................................................................... 253 

    B.6 Functions............................................................................................................................................................................................... 253 

    B.7 Error Messages ................................................................................................................................................................................... 255 

    B.8 Comparison symbols........................................................................................................................................................................ 255 

    B.9 Logical operators ............................................................................................................................................................................... 255 

    C. Dialog screen design (Interface) .................................................................................................... 256 C.1 Section TABLES................................................................................................................................................................................... 256 

    C.2 Section CACHETABLES .................................................................................................................................................................... 259 

    C.3 Section PANELS .................................................................................................................................................................................. 260 

    C.4 Section STRINGS ................................................................................................................................................................................ 262 C.5 Section FIELDEXEC ............................................................................................................................................................................ 263 

    D. Main Code ........................................................................................................................................ 266 

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    9/321

      Contents

    9 | P a g e  

    D.1 Converters ............... ................. ............... ................. ................ ................. ................ ................. ................ ................ ................ .......... 266 

    D.2 Functions .............................................................................................................................................................................................. 266 

    D.3 Connection Types ............................................................................................................................................................................. 268 

    D.4 Variables ............................................................................................................................................................................................... 269 

    D.5 Use Libraries ........................................................................................................................................................................................ 269 

    E. SBSL Script Execution ...................................................................................................................... 270 E.1 Menu Execution .................................................................................................................................................................................. 270 

    E.2 Browser Execution ............................................................................................................................................................................. 271 

    E.3 Form Screen Execution .................................................................................................................................................................... 273 

    E.4 Run Parameters .................................................................................................................................................................................. 274 

    F. SBSL Built-in Functions .................................................................................................................... 275 Abs(Number: numeric): numeric; ........................................................................................................................................................ 275 

    AddMessage(); ........................................................................................................................................................................................... 275 

    CallPublished(FunctionName:string, Params:VarArray); ............................................................................................................ 275 

    CharToOem (var:string); ......................................................................................................................................................................... 275 

    Commit(Connectionstring:string); ...................................................................................................................................................... 275 

    Copy(Source:string, Start:integer, Count:integer); ....................................................................................................................... 275 

    DateOfDateTime(DateTime:TDateTime); ......................................................................................................................................... 275 DayOfDate(DateTime:TDateTime): integer; .................................................................................................................................... 276 

    DayOfWeek(): integer; ............................................................................................................................................................................. 276 

    DaysinMonth(DateTime:TDateTime): integer; ............................................................................................................................... 276 

    Delay(Time:Integer); ................................................................................................................................................................................. 276 

    DeQuotedStr (text:string); ..................................................................................................................................................................... 276 

    EncodeTime(Hours:integer, Minutes:integer, sec:integer, ms:integer): TDateTime; ................ ................ ................ ....... 276 

    ExecPrg(File:string, Params:string);..................................................................................................................................................... 276 

    ExecSQL(Connection:string, Query:string, Params:VarArray); .................................................................................................. 276 

    Fetch SQLCursorName ................ ................ ................ ................ ................. ................ ................. ............... ................. ................ .......... 276 

    FormatSQLText(Connection:string, text:string, Params:VarArray); ........................................................................................ 276 

    GetIndexVar (Array:VarArray, index:integer); ................................................................................................................................. 277 

    GetTimeHour(DateTime:TDateTime): integer; ............................................................................................................................... 277 

    GetTimeMin(DateTime:TDateTime): integer; ................................................................................................................................. 277 

    GetTimeSec(DateTime:TDateTime): integer; .................................................................................................................................. 277 

    GetTimems(DateTime:TDateTime): integer; ................................................................................................................................... 277 

    GetQueryDataset(Datasetname:string, Connection:string, Query:string, Params:VarArray); ............... ................ ....... 277 

    GetQueryResults(Connection:string, Query:string, Params:VarArray); .............. ................. ................ ................. ................ . 277 

    GetWhere(XModule, ParamWhere:string, Param3(0=and,1=where)); .............. ................. ................ ................. ................ . 278 

    GrConvert(text:string): string; ............................................................................................................................................................... 278 

    ImportModule(Module:string); ............................................................................................................................................................ 278 

    Len(text:string): integer;.......................................................................................................................................................................... 278 

    ModuleCommand (Module, Soft1Command, Params:String); ............................................................................................... 278 

    MonthOfDate(DateTime:TDateTime): integer; .............................................................................................................................. 278 Now():TDateTime; ..................................................................................................................................................................................... 278 

    OEMToChar (oem:var); ................ ................ ................ ................ ................. ................ ................. ............... ................. ................ .......... 278 

    QuotedStr (text:string); ........................................................................................................................................................................... 278 

    Pos(Source:string, text:string): integer; ............................................................................................................................................. 278 

    RaiseException(Message:string); ......................................................................................................................................................... 279 

    RefreshMemoryTable(MemoryTable:string); .................................................................................................................................. 279 

    Resultnum; ................................................................................................................................................................................................... 279 

    ReplaceStr (text:string, String1:string, String2:string); ................................................................................................................ 279 

    RollBack(Connectionstring:string); ..................................................................................................................................................... 279 

    SafeCallPublished(FunctionName:string, Params:VarArray); ................................................................................................... 279 

    SafeExecSQL(Connection:string, Query:string, Params:VarArray); ......................................................................................... 279 SendResponse(Values, Fields:string); ................................................................................................................................................ 280 

    Space (num:integer); ................................................................................................................................................................................ 280 

    StartTrans(Connectionstring:string); .................................................................................................................................................. 280 

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    10/321

      Contents

    10 | P a g e  

    StrToDate(text:string):TDateTime; ...................................................................................................................................................... 280 

    StrToFloat (var:string); ............................................................................................................................................................................. 280 

    StrToInt (var:string);.................................................................................................................................................................................. 280 

    TableExists(Connection:string,TableName:string); ....................................................................................................................... 280 

    Trim(text:string): string; .......................................................................................................................................................................... 280 

    Time():TDateTime; ..................................................................................................................................................................................... 280 

    VarArray(Var1, Var2, …, Varn, n);  ......................................................................................................................................................... 280 

    VarArrayDimCount (Array:VarArray); ................................................................................................................................................. 281 VarArrayHighBound(Array:VarArray, Dim:integer); ..................................................................................................................... 281 

    VarToStr(Param:Variant); ........................................................................................................................................................................ 281 

    XModule(); ................................................................................................................................................................................................... 281 

    XSupport(); ................................................................................................................................................................................................... 281 

    YearOfDate(DateTime:TDateTime): integer; ................................................................................................................................... 281 

    G. SoftOne Libraries ............................................................................................................................. 282 G.1 ModuleIntf ........................................................................................................................................................................................... 282 

    G.2 PiLib ........................................................................................................................................................................................................ 291 

    G.3 SysRequest .......................................................................................................................................................................................... 295 

    H. Case Studies ..................................................................................................................................... 298 Case Study 1 ............................................................................................................................................................................................... 298 Case Study 2 ............................................................................................................................................................................................... 299 

    Case Study 3 ............................................................................................................................................................................................... 302 

     APPENDIX Common Parameters & Commands ..................................................................... 304 

    A. Softone Object Types (SodType) ................................................................................................... 305 

    B. Softone Transaction Objects (SoSource) ....................................................................................... 306 

    C. System Parameters (X.SYS) ............................................................................................................. 307 

    D. Menu Jobs / System Tools (acCommands) ................................................................................... 309 

    E. Editor Commands ............................................................................................................................. 311 

    F. Built-in Editors .................................................................................................................................. 312 

    G. Transactions Source Types (Origin) ............................................................................................... 314 

    H. Related Jobs / Commands .............................................................................................................. 315 

    I. Browser Job Commands .................................................................................................................. 318 

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    11/321

      Chapter 1 – Screen Forms

    11 | P a g e  

    CHAPTER 1

    Screen Forms

    A. Form Design

    B. Layout Controls

    C. Data Controls

    D. Dialog Controls

    E. Command Controls

    F. Editor Commands

    G. Editor Attributes

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    12/321

      Chapter 1 – Screen Forms

    12 | P a g e  

    OverviewForms are visual surfaces that contain controls on which you display information to users. They offer a

    graphical environment to display and process data from databases (View, Insert, Modify and Delete).

    Forms are saved as records inside the database in a blob field, and are potentially accessible to any time.

    Import and export of forms can be done from the “Custom Administration” tool. 

    Inside forms, data are processed by using any of the available SoftOne controls, such as Tables, DatabaseViews, Virtual Tables, String Lists, etc.

    You can alter the default object forms and create new forms to meet your needs. Please note though, that

    SoftOne default object forms cannot be updated. Instead you can create as many custom forms as you

    like to develop your solution.

    Most of the actions users do inside form controls generate events. Your forms can respond to these

    events using script code (Form Script) and process the events when they occur. For more information, see

    Chapter Form Scripts. 

    SoftOne application provides many controls with a rich feature set. Additionally, SoftOne provides a fully

    functional API which allows you to create DLL applications in .NET or Delphi, that can be displayed or

    interact with SoftOne object forms.

    All the internal controls that can be used inside SoftOne Forms are discussed in the following sections.

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    13/321

      Chapter 1 – Screen Forms

    13 | P a g e  

    A. Form DesignForms design is accessed through the “Design” button of the window displayed when clicking on the

    arrow button next to “Form” (Figure A1).

    Figure A1

    This displays window is a WYSIWYG tool that allows you to alter the user interface to meet your needs.

    Saving the form can be done through the buttons “Save” or “Save as” (Figure A2), and this design can beexported in a cst file through the “Custom Administration” tool .

    Figure A2

    Notice that the design screen looks very familiar because it displays exactly the runtime screen form. The

    only difference is that it also contains a toolbar with the available tools for designing the form (Figure A3).

    Figure A3

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    14/321

      Chapter 1 – Screen Forms

    14 | P a g e  

    The internal design code of the form can be displayed through the keyboard shortcut keys:

    CTRL + ALT + SHIFT + F12 (Figure A4).

    Figure A4

    You can also display the object parameters and controls as code through the keyboard shortcut keys:

    CTRL + ALT + SHIFT + F11 (Figure A5).

    Figure A5

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    15/321

      Chapter 1 – Screen Forms

    15 | P a g e  

    A.1 Design Options

    The basic design options are displayed through the right click pop up menu, which provides the available

    options that can be used to create controls (panels, datagrids, tabs, memo textboxes and images) (Figure

    A1.1). The controls that can be added to a form are discussed in detail below.

    Figure A1.1

    Form Design Options 

    OptionApplies to

    Selected tab Selected panel Selected datagrid

    New tab Creates a new tab on the left

    of the selected tab.

    Creates a new tab under

    the selected panel.

    Creates a new tab under

    the selected datagrid.

    New panel Create a new panel in the

    selected tab.

    Creates a new panel under

    the selected panel.Not applicable

    New datagrid Create a new datagrid in the

    selected tab.

    Creates a new datagrid

    under the selected panel.Not applicable

    New memo textbox Create a new memo textbox

    in the selected tab.

    Creates a new memo

    textbox under the selected

    panel.

    Creates a new memo

    textbox under the selected

    datagrid.

    New picture Create a new image in the

    selected tab.

    Creates a new image

    textbox under the selected

    panel.

    Creates a new image

    textbox under the selected

    datagrid.

    Delete  Deletes the selected tab. Deletes the selected panel.Deletes the selected

    datagrid.

    Properties  Not applicable 

    Opens the panel

    properties window.

    Opens the datagrid

    properties window

  • 8/15/2019 SoftOne BlackBook ENG_v.1.0

    16/321

      Chapter 1 – Screen Forms

    16 | P a g e  

    A.2 Toolbar Overview

    The toolbar on the top of the form window provides you the commands for designing a form (Figure A2).

    Figure A2

     A.2.1 Fields

    The toolbar butto