User Interaction

Top  Previous  Next

 

Functions that involve some kind of interaction with the user are included in this category, such as showing message prompts or opening a particular user-interface dialog like Reservation Details.

 

 

 

(Back to Function Types List)

 

 

 

Function:AddEditRecord        
Result-type:Record        
Arguments:cTableName        
Description:Opens a generic Edit/Details type dialog (customizable) for the record passed.  A custom "Edit Generic Record" Add-on type Dialog Definition must be defined for the given record type, ready to enter data for a new record.  The Edit dialog will not have the browsing/add/delete controls, so only the new record can be accessed.  Returns the record reference of the record added, or NullRecord() if the record is not added (Cancel clicked or no data entered).        

 

 

Function:BackupDatabase        
Result-type:Boolean        
Arguments:cFile [, fCompress]        
Description:Creates a backup of the database to the specified file (which should include the full path, file name and file extension). Compression is optional -- if fCompress is not specified then it will be compressed by default. Return indicates success of backup file creation.        

 

 

Function:CheckOnlineRequestsCustom        
Result-type:Numeric        
Arguments:bNoPrompts, bSilent        
Description:Checks online for any Custom-site reservation requests waiting to be downloaded, and returns how many new requests were found. All appropriate Online Reservations settings must be set up beforehand. The bNoPrompts flag may be set to prevent error prompts and bSilent may be set to hide the progress dialog, however the system will probably be unresponsive during this time. The default parameters are all False (show progress, show errors).        

 

 

Function:CheckOnlineRequestsEmail        
Result-type:Numeric        
Arguments:bNoPrompts, bSilent        
Description:Checks online for any reservation request E-mail messages waiting to be downloaded, and returns how many new requests were found. All appropriate Online Reservations settings must be set up beforehand. The bNoPrompts flag may be set to prevent error prompts and bSilent may be set to hide the progress dialog, however the system will probably be unresponsive during this time. The default parameters are all False (show progress, show errors).        

 

 

Function:Delay        
Result-type:Boolean        
Arguments:nMilliseconds        
Description:Delays all user interaction for the specified number of milliseconds (1/1000ths of a second, e.g. 5000 = 5 seconds). The maximum delay possible at once is 1 minute (60000 ms) -- use a loop if longer times are needed. Note that the accuracy of this not guaranteed, and the usable granularity is generally only 100 ms increments. This function won't return until the delay is complete, and the return value is always True.        

 

 

Function:EditCustomer        
Result-type:Boolean        
Arguments:rRecord        
Description:Opens the Customer Details dialog for the customer record passed. Returns FALSE if the dialog is closed without changes, or returns TRUE if changes are made.        

 

 

Function:EditCustomerTrans        
Result-type:Boolean        
Arguments:rRecord        
Description:Opens the Customer Transactions dialog for the customer record passed. Returns FALSE if the dialog is closed without changes, or returns TRUE if changes are made.        

 

Function:        EditInventoryItem        

Result-type:        Boolean        

Arguments:        rRecord        

Description:        Opens the Edit Inventory Item dialog for the POS inventory item record passed. Returns FALSE if the dialog is closed without changes, or returns TRUE if changes are made.        

 

 

Function:EditRecord        
Result-type:Boolean        
Arguments:"rRecord [, bBrowse [, bAllowAdd [, bAllowDelete]]]"        
Description:Opens a generic Edit/Details dialog (customizable) for the record passed.  A custom Dialog Definition must be defined for the given record type.  Set bBrowse to allow browsing to other records, bAllowAdd to allow adding new ones, and bAllowDelete to allow deleting records.  (All options default to False.)  Returns False if the dialog is closed without changes, or returns True if changes are made.        

 

 

Function:EditReservation        
Result-type:Boolean        
Arguments:rRecord        
Description:Opens the Reservation Details dialog for the reservation record passed. Returns FALSE if the dialog is closed without changes, or returns TRUE if changes are made.        

 

 

Function:EditReservationTrans        
Result-type:Boolean        
Arguments:rRecord [,fShowSelectRates]        
Description:Opens the Reservation Transactions dialog for the reservation record passed. Optionally may have it enter the Select Rates function immediately (show the Select Rates dialog). Returns FALSE if the dialog is closed without changes, or returns TRUE if changes are made.        

 

 

Function:        EditSite        

Result-type:        Boolean        

Arguments:        rRecord        

Description:        Opens the Site Details dialog for the site record passed. Returns FALSE if the dialog is closed without changes, or returns TRUE if changes are made.        

 

 

Function:EditUnboundTrans        
Result-type:Boolean        
Arguments:rRecord        
Description:Opens the Unbound Transactions dialog, optionally using the transaction record passed as the transaction/receipt to edit. Returns FALSE if the dialog is closed without changes, or returns TRUE if changes are made.        

 

 

Function:EditWorkOrder        
Result-type:Boolean        
Arguments:rRecord        
Description:Opens the Edit Work Order dialog for the record passed. Returns FALSE if the dialog is closed without changes, or returns TRUE if changes are made.        

 

 

Function:FindCustomer        
Result-type:Record        
Arguments:[cFilterBy [, cSearchText [, bCancelAdds]]]        
Description:Opens the Find Customer dialog, optionally with a starting Filter By selection and Search Text (note that the Filter By argument must exactly match the selection in the dialog's drop-down list). If bCancelAdds is True, then the Cancel button shows 'Cancel / Add New' but it doesn't actually add one in this function. Returns the customer's record if one is selected to 'Use', or a Null record if the dialog is closed with Cancel.        

 

 

Function:FindInventory        
Result-type:Record        
Arguments:[cSearchText]        
Description:Opens the Find Inventory Item dialog, optionally with starting Search Text. Returns the item's record if one is selected to 'Use', or a Null record if the dialog is closed with Cancel.        

 

 

Function:FindReservation        
Result-type:Record        
Arguments:[cFilterBy [, cSearchText ]]        
Description:Opens the Find Reservation dialog, optionally with a starting Filter By selection and Search Text (note that the Filter By argument must exactly match the selection in the dialog's drop-down list). Returns the reservation's record if one is selected to 'Use', or a Null record if the dialog is closed with Cancel.        

 

 

Function:FindVendor        
Result-type:Record        
Arguments:[cFilterBy [, cSearchText [, bCancelAdds]]]        
Description:Opens the Find Vendor dialog, optionally with a starting Filter By selection and Search Text (note that the Filter By argument must exactly match the selection in the dialog's drop-down list). If bCancelAdds is True, then the Cancel button shows 'Cancel / Add New' but it doesn't actually add one in this function. Returns the vendor's record if one is selected to 'Use', or a Null record if the dialog is closed with Cancel.        

 

 

Function:GetFormSubjectForRecord        
Result-type:Text        
Arguments:cFormName, rRecord        
Description:Gets the 'Subject' for the given named form, for the given record. The Printer type for the form must be 'Text output (or E-mail)', for instance an E-mail type form, and the form must have the 'Subject expression' filled in (or else the result is blank).        

 

 

Function:GetFormTextForRecord
Result-type:Text        
Arguments:cFormName, rRecord [, nWhat[, dStarting[, bShowPrevious ]]]        
Description:Gets the formatted text for the given named form, for the given record.  The Printer type for the form must be 'Text output (or E-mail)', for instance an E-mail type form.  Optionally include print-some options: 0=All, 1=new, 2=since zero bal, 3=since zero or credit bal, 4=since date.  If since date, date must be included.  Can also set bShowPrevious for whether Previous Balance and Balance Due is shown (defaults to True).        

 

 

Function:GetStatusBarText        
Result-type:Text        
Arguments:(none)        
Description:Gets the current text on the program's Status Bar.        

 

 

Function:IsAnyDialogOpen        
Result-type:Boolean        
Arguments:(none)        
Description:Returns True if there are any dialog windows or message prompt windows open. This can be used to determine whether the user is in the middle of something, or the system is waiting for the user to respond.        

 

 

Function:LogIn        
Result-type:Boolean        
Arguments:cOperator, cPassword        
Description:Log in with the specified operator name and password. Returns True if the login was successful        

 

 

Function:LogOut        
Result-type:Boolean        
Arguments:(none)        
Description:Log out any current operator. Returns True if there was a previous operator logged in.        

 

 

Function:MenuCommand        
Result-type:Boolean        
Arguments:nCommandID        
Description:Execute a main menu command, as if the operator selected it. Note that operator level and other authorization level checking may or may not be performed, so use this function cautiously. Also note that menu commands are numeric command IDs, which could change in future versions. This function won't return until the command is complete, and the return value is always True.  You can find the command values in the Expression builder (e.g. Insert Expression Element) -- select Fixed List Values, Menu Command Values.        

 

 

Function:MessageBox        
Result-type:Numeric        
Arguments:cMessage [, nButtons [, nIcon]]        
Description:Shows a message in a prompt window. The nButtons parameter can be 0 for OK, 1 for OK & Cancel, 2 for Yes & No, or 3 for Yes, No, & Cancel. The nIcon parameter can be 0 for none, 1 for Warning/Exclamation, 2 for Error/Stop, or 3 for Information. Returns the button clicked : 0 = Cancel, 1 = OK, 2 = Yes, 3 = No.        

 

 

Function:OpenCashDrawer        
Result-type:Boolean        
Arguments:(none)        
Description:Opens the cash drawer, if present. Returns True if the drawer is present and there are no errors.        

 

 

Function:PointOfSaleEntry        
Result-type:Boolean        
Arguments:rRecord        
Description:Opens the Point of Sale dialog, optionally using the transaction record passed as the transaction/receipt to edit. Returns FALSE if the dialog is closed without changes, or returns TRUE if changes are made.        

 

 

Function:PointOfSaleEntryCust        
Result-type:Boolean        
Arguments:rRecord        
Description:Opens the Point of Sale dialog for the designated customer. Transactions will be added to the customer, and don't necessarily need to be paid. Returns FALSE if the dialog is closed without changes, or returns TRUE if changes are made.        

 

 

Function:PointOfSaleEntryResv        
Result-type:Boolean        
Arguments:rRecord        
Description:Opens the Point of Sale dialog for the designated reservation. Transactions will be added to the reservation, and don't necessarily need to be paid. Returns FALSE if the dialog is closed without changes, or returns TRUE if changes are made.        

 

 

Function:PrintFormForRecord        
Result-type:Boolean        
Arguments:cFormName, rRecord, bPreview, bShowDialog[, nWhatToPrint[, dStarting[, bShowPrevious]]]        
Description:Prints the given named form for the given record.  Must indicate whether a Print Preview window is shown and whether a Printer Setup dialog is shown before printing.  You may also specify what transactions to print: 0=All, 1=New (most recent), 2=unbalanced (since last 0 balance), 3=unpaid (since last 0 or credit balance), 4=since date (also must specify the starting date). Can also set bShowPrevious for whether Previous Balance and Balance Due is shown (defaults to True).        

 

 

Function:PrintFormForThisList        
Result-type:Boolean        
Arguments:cFormName, bPreview, bShowDialog[, nWhatToPrint[, dStarting[, bShowPrevious]]]        
Description:Prints the given form for the record list in the current context (e.g. ThisListRec/Count).  Must indicate whether a Print Preview window is shown and whether a Printer Setup dialog is shown before printing.  You may also specify what transactions to print: 0=All, 1=New (most recent), 2=unbalanced (since last 0 balance), 3=unpaid (since last 0 or credit balance), 4=since date (also must specify the starting date).  Can also set bShowPrevious for whether Previous Balance and Balance Due is shown (defaults to True).        

 

 

Function:QueueEmail        
Result-type:Boolean        
Arguments:cFromName, cFromAddress, cToName, cToAddress, cSubject, cBody [,cFile, bFixedPitch, cCC, cBCC, fSkipAutoBCC]        
Description:Queues up an E-mail message for batch sending, using the internal SMTP functionality.  The Online Setup for the SMTP settings must be configured and enabled.  If the From name & address are blank, it will use the defaults from the SMTP settings.  Optionally can include one or more file attachments (the full path must be specified for each -- use the '|' character between multiple file names).  The return value indicates whether it was queued successfully.  Use ResetEmailQueue() before sending, and SendQueuedEmails() to initiate the batch sending after all E-mails are queued.        

 

 

Function:ResetEmailQueue        
Result-type:Boolean        
Arguments:(none)        
Description:Resets the Batch E-mail queue.  For use with QueueEmail() and SendQueuedEmails() functions.  Return value is always True.        

 

 

Function:SendEmail        
Result-type:Boolean        
Arguments:bPreview, cFromName, cFromAddress, cToName, cToAddress, cSubject, cBody [,cFile, bFixedPitch, cCC, cBCC, fSkipAutoBCC]        
Description:Sends an E-mail message, using the internal SMTP functionality.  The Online Setup for the SMTP settings must be configured and enabled.  If the bPreview flag is set, the message will be shown in a window first, where it can be edited.  If the From name & address are blank, it will use the defaults from the SMTP settings.  Optionally can include one or more file attachments (the full path must be specified for each -- use the '|' character between multiple file names).  The return value indicates whether it was successful.        

 

 

Function:SendPoleDisplayCommand        
Result-type:Boolean        
Arguments:cCommand        
Description:Sends a command to the Pole Display, if present (Point of Sale option required). The command string must include any control sequences necessary, as 'escape' values like -. Returns True if no errors occur and the pole display is enabled.        

 

 

Function:SendQueuedEmails
Result-type:Boolean        
Arguments:(none)        
Description:Sends the Queued E-mails, using normal Batch E-mail settings for the number to send at a time and pausing between sub-batches.  Resets the Batch E-mail queue after sending, whether it's successful or not.  For use with the QueueEmail() function.  Return value indicates whether all were sent successfully. There is no information about which ones were sent successfully, if any, if there is an error.        

 

 

Function:SetStatusBarText        
Result-type:Boolean        
Arguments:cText        
Description:Sets the text on the program's Status Bar. If cText is blank, sets the default text (e.g. 'For Help, press F1'). Always returns True.        

 

 

Function:ShellExecute        
Result-type:Boolean        
Arguments:cOperation, cFile, cParams, cDir        
Description:Uses the system 'ShellExecute' function to open a document, execute a program, explore a folder or other functions. See Windows development specifications for details.        

 

 

Function:ShowDataFields        
Result-type:Boolean        
Arguments:cTableName
Description:Opens a Data Field Definitions dialog for the given table.  Return value is always True -- always assume changes could have been made.        

 

 

Function:ShowQuery        
Result-type:Record        
Arguments:cQueryName [, dStart [, dEnd[, cSearch[, bUseDates[, bAsSearch]]]]]        
Description:Shows a query in a dialog window, with optional start & end dates and search text.  If you don't want From & To date selections on the dialog, set bUseDates to False (dStart and dEnd will still be used for the query, but the user won't be able to change them).  If you want the query to operate like a Search function and return the record by the user, then set bAsSearch to True.  The return value will be the record selected from the query list (or it will be a Null record if it was cancelled or if bAsSearch is False).        

 

Function:ShowRawData        
Result-type:Boolean        
Arguments:cTableName [, bAdd [, bSort [, bMove [, bDelete [, bShowLinksAsIndex [, bPickList]]]]]]        
Description:Opens a Raw Data Tables dialog for the given table.  Optionally allow adding, moving, sorting or deleting records in the table (all options default to False if not provided).  If it's a Pick List, set bPickList.  Can also show allow showing links as index values instead of the relative text.  Return value is True if data changes have been made.        

 

 

Function:ShowRecordList        
Result-type:Boolean        
Arguments:cTableName, cFieldList [, bAllowAdd [, bAllowDelete]]        
Description:Opens a 'Setup' type dialog for the given table, showing a list of records in the table and allowing adding/editing/deleting/etc.  Must also provide a list of Field ID's to show in the list (comma-separated text ID's). Set bAllowAdd to allow adding new ones, and bAllowDelete to allow deleting records.   In order to Edit a record in the list, an "Edit Generic Record" Add-on type Dialog Definition must exist for the record (table) type.  Return value is True if any data changes have been made.        

 

 

Function:StartNewReservation
Result-type:Record        
Arguments:rCustomer, rSite [, dFirstNight [, fLastNight]]        
Description:Start a new reservation (open New Reservation dialog), optionally providing the customer, site, first night and last night. The Site and/or Customer may be NullRecord() to start without a customer or site specified.  Returns the new reservation created, or NullRecord() if it was not created.        

 

Function:TimeLastDialogClosed        
Result-type:Date/Time        
Arguments:(none)        
Description:Returns the date and time that the last user-interface dialog was closed. This can be used to determine when the user was last doing something on the computer that required interaction.        

 

 

Function:TimeOfLastInput        
Result-type:Date/Time        
Arguments:(none)        
Description:Returns the date and time that the user last moved the mouse or closed a dialog. This can be used to determine when the user was last doing something on the computer.        

 

 

 

 


Page URL http://CampgroundMaster.com/help/userinteraction.html

Campground Master Home