Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
cfl_ch_3-formulas_and_functions [2019/07/15 19:38] admin [SQL Functions] |
cfl_ch_3-formulas_and_functions [2019/07/15 20:48] (current) scotts |
||
---|---|---|---|
Line 264: | Line 264: | ||
==== Numeric Functions ==== | ==== Numeric Functions ==== | ||
- | |**Function** |**Parameters** |**Description** | | + | |**Function** |**Parameters** |**Description** |
- | |ABS|X|Absolute value of X| | + | |ABS|X|Absolute value of X| | |
- | |ACOS|X|Arccosine| | + | |ACOS|X|Arccosine| | |
- | |ACOSH|X|Hyperbolic Arccosine| | + | |ACOSH|X|Hyperbolic Arccosine| | |
- | |ASIN|X|Arcsine| | + | |ASIN|X|Arcsine| | |
- | |ASINH|X|Hyperbolic Arcsine| | + | |ASINH|X|Hyperbolic Arcsine| | |
- | |ATAN|X|Arctangent| | + | |ATAN|X|Arctangent| | |
- | |ATANH|X|Hyperbolic Arctangent| | + | |ATANH|X|Hyperbolic Arctangent| | |
- | |BINOM|N, K|Binomial Coefficient BINOM(N, K)=N!/ | + | |BINOM|N, K|Binomial Coefficient BINOM(N, K)=N!/ |
- | |COS|X|Cosine| | + | |COS|X|Cosine| | |
- | |COSH|X|Hyperbolic Cosine| | + | |COSH|X|Hyperbolic Cosine| | |
- | |COTAN|X|Cotangent| | + | |COTAN|X|Cotangent| | |
|EXP|X|e\^X. Same as POWER( LN2, X )| | |EXP|X|e\^X. Same as POWER( LN2, X )| | ||
- | |FACT|X|Factorial Function X!=X*(X-1)*(X-2)*...*1| | + | |FACT|X|Factorial Function X!=X*(X-1)*(X-2)*…*1| | |
- | |FRAC|X|Extract Fractional Part| | + | |FRAC|X|Extract Fractional Part| | |
- | |INT|X|Extract Integer Part| | + | |INT|X|Extract Integer Part| | |
- | |LG|X|Base 10 Logarithm| | + | |LG|X|Base 10 Logarithm| | |
- | |LN|X|Natural Logarithm| | + | |LN|X|Natural Logarithm| | |
- | |LN2| |Natural log constant| | + | |LN2| |Natural log constant| | |
- | |MAX|X, Y, ..|Maximum value of arguments. UNLIMITED arguments| | + | |MAX|X, Y, ..|Maximum value of arguments. UNLIMITED arguments| | |
- | |MIN|X, Y, ..|Minimum value of arguments. UNLIMITED arguments| | + | |MIN|X, Y, ..|Minimum value of arguments. UNLIMITED arguments| | |
- | |PI| |PI number (3.14159... – constant)| | + | |PI| |PI number (3.14159… – constant)| | |
- | |ROUND|X [, Y]|If Y is omitted, rounds argument to the nearest integer. If Y is present, round to Y places of precision.| | + | |ROUND|X [, Y]|If Y is omitted, rounds argument to the nearest integer. If Y is present, round to Y places of precision.| | |
- | |ROUNDUP|X|Rounds any fraction to the next higher integer number = INT( X + 0.99999999 )| | + | |ROUNDUP|X|Rounds any fraction to the next higher integer number = INT( X + 0.99999999 )| | |
- | |SIGN|X|1 for X>0, 0 for X=0, -1 for X<0| | + | |SIGN|X|1 for X>0, 0 for X=0, -1 for X<0| | |
- | |SIN|X|Sine| | + | |SIN|X|Sine| | |
- | |SINH|X|Hyperbolic Sine| | + | |SINH|X|Hyperbolic Sine| | |
- | |SQR|X|Square of X = X * X| | + | |SQR|X|Square of X = X * X| | |
- | |SQRT|X|Square Root of X| | + | |SQRT|X|Square Root of X| | |
- | |TAN|X|Tangent| | + | |TAN|X|Tangent| | |
- | |TANH|X|Hyperbolic Tangent| | + | |TANH|X|Hyperbolic Tangent| | |
==== Boolean Functions ==== | ==== Boolean Functions ==== | ||
Line 326: | Line 326: | ||
==== DateTime Functions ==== | ==== DateTime Functions ==== | ||
- | Since Microsoft has changed the date and time format used in the new .NET architecture, | + | |
+ | Since Microsoft has changed the date and time format used in the new .NET architecture, | ||
|**Function** |**Parameters** |**Returns…** | | |**Function** |**Parameters** |**Returns…** | | ||
Line 356: | Line 357: | ||
==== String and HTML Formatting Functions ==== | ==== String and HTML Formatting Functions ==== | ||
+ | |||
String Formatting functions are advanced tools to assist in the creation of strings for product layouts. HTML Formatting functions are designed to simplify the generation of HTML code by wrapping a string value with the appropriate HTML tags. | String Formatting functions are advanced tools to assist in the creation of strings for product layouts. HTML Formatting functions are designed to simplify the generation of HTML code by wrapping a string value with the appropriate HTML tags. | ||
Line 379: | Line 381: | ||
==== SQL Functions ==== | ==== SQL Functions ==== | ||
- | SQL functions are advanced tools to assist in retrieving values directly from the database. SQL functions are ran asynchronously in the background during calculations. When a SQL function is called, the // | + | SQL functions are advanced tools to assist in retrieving values directly from the database. SQL functions are ran asynchronously in the background during calculations. When a SQL function is called, the // |
- | \\ | + | |
- | //* SQL Functions will be// a//vailable in versions 04.50.1103.1801 and later.// | + | |
|**Function** |**Parameters** |**Returns…** | | |**Function** |**Parameters** |**Returns…** | | ||
Line 389: | Line 389: | ||
|**ReturnSQLNumberValueWithWait** |SelectSQL, \\ TemporaryValue|Once the SelectSQL has finished executing, the value of the first column in the first row of records is returned. \\ If there are no records found, the TemporaryValue is returned.| | |**ReturnSQLNumberValueWithWait** |SelectSQL, \\ TemporaryValue|Once the SelectSQL has finished executing, the value of the first column in the first row of records is returned. \\ If there are no records found, the TemporaryValue is returned.| | ||
|**ExecSQL** |SQLCommand|Executes a SQL command without a return value. Allows execution of Insert and Update commands.| | |**ExecSQL** |SQLCommand|Executes a SQL command without a return value. Allows execution of Insert and Update commands.| | ||
- | |**LoadFromURL** |URL, RaiseErrorOnFailure(Optional), | ||
- | \\ | + | \\ Example of a Select SQL statement: \\ **SELECT AccountNumber FROM Account WHERE CompanyName = TransHeader.CustomerName ** \\ \\ Example of a Update SQL statement: \\ **UPDATE Account SET AccountNumber = 0 WHERE CompanyName = TransHeader.CustomerName** |
- | Example of a Select SQL statement: | + | |
- | **SELECT AccountNumber FROM Account WHERE CompanyName = TransHeader.CustomerName ** \\ | + | |
- | \\ | + | |
- | Example of a Update SQL statement: | + | |
- | **UPDATE Account SET AccountNumber = 0 WHERE CompanyName = TransHeader.CustomerName** | + | |
==== Variable Property Functions ==== | ==== Variable Property Functions ==== | ||
- | Variable Property functions are used to read and write additional properties on a variables.\\ | + | |
+ | Variable Property functions are used to read and write additional properties on a variables. | ||
|**Function** |**Parameters** |**Returns…** | | |**Function** |**Parameters** |**Returns…** | | ||
|**SetVariableProperty** |VariableName, | |**SetVariableProperty** |VariableName, | ||
Line 409: | Line 406: | ||
|**CMD** |Command, \\ WorkingDir, \\ RunElevated|CMD(Command: | |**CMD** |Command, \\ WorkingDir, \\ RunElevated|CMD(Command: | ||
|**RunMacro** |MacroName, \\ ID, \\ ClassTypeID|RunMacro( MacroName : string, ID : int, ClassTypeID : int ); \\ This function executes a particular macro. \\ The **MacroName** parameter is the text name of the Macro to be executed. \\ The **ID** is the ID of the record instance passed into the Macro. \\ The **ClassTypeID** is the ClassTypeID of the record instance passed into the Macro.| | |**RunMacro** |MacroName, \\ ID, \\ ClassTypeID|RunMacro( MacroName : string, ID : int, ClassTypeID : int ); \\ This function executes a particular macro. \\ The **MacroName** parameter is the text name of the Macro to be executed. \\ The **ID** is the ID of the record instance passed into the Macro. \\ The **ClassTypeID** is the ClassTypeID of the record instance passed into the Macro.| | ||
+ | |**LoadFromURL** |URL, RaiseErrorOnFailure(Optional), | ||
+ | | | | | | ||
- | ==== | + | ==== Layout Specific Functions ==== |
- | CFL has several functions are not general purpose (as those above) but specific to layout of pages and signs on a roll or sheet. Though the calculation can be (and has been) done using the general formulas, these occur so often that CFL has special functions to manage them.\\ | + | CFL has several functions are not general purpose (as those above) but specific to layout of pages and signs on a roll or sheet. Though the calculation can be (and has been) done using the general formulas, these occur so often that CFL has special functions to manage them. \\ These are complex functions that perform many calculations and set many variables. |
- | These are complex functions that perform many calculations and set many variables. | + | |
- | * See [[CFL Function - CalculateLayoutOnRoll|]] | + | * See [[: |
- | * See [[CFL Function - CalculateLayoutOnSheet|]] | + | * See [[: |
+ | < | ||
\\ | \\ | ||
- | |||
- | |||
===== Shipping Functions ===== | ===== Shipping Functions ===== | ||
+ | </ | ||
|**Function** |**Parameters** |**Returns…** | | |**Function** |**Parameters** |**Returns…** | | ||
Line 456: | Line 454: | ||
===== Obsolete Functions ===== | ===== Obsolete Functions ===== | ||
+ | |||
Deprecated functions are those that are currently supported for backwards compatibility, | Deprecated functions are those that are currently supported for backwards compatibility, | ||