Wheelhouse®
Shopping Cart
QuickBooks Online Integration
QuickBooks Online Integration Setup and Troubleshooting
QuickBooks Online (QBO) Integration Overview
Custom Fields and Forms
System Administration
Troubleshooting Checklist
Document Auto Number Format
Sale Shipment Records and Tracking Information Emails
Peripherals and Equipment Requirements
Navigation and Definitions
Logging In and Getting Started
Understanding Order Flow in Wheelhouse
Document Categories
Understanding People and Organizations in Wheelhouse
Admin List Views and Single Record Views
Left Menu Navigation
Advanced Search Techniques
User Administration
User Management: Adding, Editing, and Revoking Access
Defining or Adjusting Teams
User Profiles and Roles in Wheelhouse
Choosing a User Profile
Understanding Wheelhouse Login Types
Reports, Import, Exports, and Document Templates
Report Manager Guide
How to Modify Document Templates
Preparing Excel and Word Templates for Data Merge
Running Reports
Creating Reports on Quotes, Sales, and Outside Reps
Exporting to Excel
Quality Mangement
Adding QCIR Templates
QC Non Conformance Reports (NCRs)
Adding Quality Control Inspection Records (QCIR) in Shop Work
Order Management
Using Order Flags and the Flag First Configs Option
Order Management Guide
Creating customers, quotes and sales
Adding Dealer and Outside Rep Logins
Closing a Sale
External Agent Access Levels
Printing and Emailing Quotes and Sales
Production Routing and Tracking
Shop Work and QR Scanning
Merge Line Items at a Certain Step (Stash & Merge Functionality)
Bin Locations
Shop Work: Priority Flags and Fixed Position
Stopping Work Center or All Running Operations at the End of the Shift
Shop Work
Viewing/Adding/Resolving Work Order Issues
Production Scheduling
Job Manager Guide: Creating Jobs and Work Orders
Workflow Guide: Completing Work Order Operations
The Gantt View
Job Scheduler
Labor Routings
Production Definitions
External Connections - API
Items and Configurators
Product Configuration in Wheelhouse
Item Types
Build Types
Item Overrides: Name, Pricing, and Discounts
Public Item Selector AKA Public Display Categories
Deploying A Configurator to Another Environment
Item and BOM Import Action
Wheelhouse Change Log
Introduction to Kanban Inventory Management
Setting Up Inventory Replenishment and Purchasing
Inventory Hub Guide
Can I use Wheelhouse as my CRM?
Table of Contents
Dino Script® Language Reference
Appendix A: Trestle®/Dino Script® Integration
A: Returning JSON Data
A: Host and Target
A: Running SQL Queries
A: Table of Contents
A: Commands
A: Dynamic and DynamicProxy
A: Advanced Command Arguments
A: Introduction
A: Files
A: Direct Links - URLs and Downloads
A: NPOI and Excel, DocX and Word
A: Embedded Apps with MS Access Files
A: Command Arguments
Style Guidelines
Adding New Functionality with Dino Script XCommand™
Introduction
Dino Script™ Table of Contents
Operators
Concepts
Syntax
Expression Types
Keywords
Variables
Blocks and Scopes
Built-In Functions
Custom Functions (defs)
Anonymous Functions
Conditional Statements
The Context Object
FAQ
Dino Cookbook
Sandbox In-Depth
Functions as Delegates
Native Types
Aliasing
Other Dino Scripts
- All Categories
- Dino Script® Language Reference
- Conditional Statements
Conditional Statements
Dino defines several conditional statements that choose options based on the truth of an expression. In most places in Dino, an assignment expression (a = 5) is allowed. However, because the followin…
Dino defines several conditional statements that choose options based on the truth of an expression. In most places in Dino, an assignment expression (a = 5) is allowed. However, because the following types of errors are so common:
if a = 5 { // error, assignment not allowed in expression
}
else if a == 10 or b = 10 { //error, assignment not allowed in expression
}Notice in the previous example, we are assigning the value 5 to the variable a (which then returns 5), and in the else if, assigning 10 to the variable b. Because this is nearly always a logic error and not what the user intended, Dino disallows an assignment expression as any part of the truth expression for a conditional statement. It must instead be written as follows:
if a == 5 { // ok
}
else if a == 10 or b == 10 { // ok
}What is True?
Dino considers more than just true to be “true”, so naturally it also considers more than just false to be “false”. Conditional statements like if will instead evaluate the “truthiness” of an expression. The following values are “false” with respect to conditional expressions: false, null, 0 (of any numeric type), empty string, DBNull (a special .NET null type for database work), minimum date, empty GUID, empty time span, and empty sequence (list or enumerable). All other values are “true”.
if / else if / else
The if statement is defined in plain language as “if expression is true, do this, else if other expression is true, do this, else if all those are false, do this.”
// Dino if statement
var x = 10;
// while x is 'truthy'
while x {
if x % 2 == 0 {
print('The number is even.');
}
else if x == 5 {
print('The number is right in the middle.');
}
else {
print('The number is odd.');
}
x--; //decrement x by 1
}Some languages allow a naked statement after the if or else expression. Dino does not allow this; you must put all evaluated statements in a block. One consequence of this is that the parentheses around the if or else expression are not required.
if a > 10
doSomething(); // error, naked statements not allowedif a > 10 {
doSomething(); // ok, statements but be in block
}if (a > 10) { // ok, parentheses are fine but not required
doSomething();
}Ternary Operator (Expression)
The ternary operator is a conditional which has an expression on the LHS, an expression in the middle, and one on the RHS. Unlike the traditional if statement, the ternary is an expression: If LHS evaluates to true, then the middle expression is evaluated and returned, if LHS is false, then RHS is evaluated and returned.
The three expressions in a ternary are separated with the ? and : characters, e.g. lhs ? middle : rhs.
// Dino ternary
var a = true ? 3 : 4; // a will be 3 because LHS is truthy
var b = null ? 3 : 4; // b will be 4 because LHS is falsyThe ternary operator is usually referred to as “the” ternary operator, because in most languages it is the only operator that is not binary or unary. To see all the binary and unary operators, refer to the Operators section of this document.
The ternary expression is short-circuit evaluated: if the LHS expression results in true, then the RHS does not need to be evaluated.
How did we do?
Anonymous Functions
The Context Object