SystemConstant.SelectMany(Filter, Query)
SystemConstant.SelectMany(Filter, Query) returns an object containing a list of system constants that meet the filter criteria.
Applies To
Description
SystemConstant.SelectMany(Filter, Query) returns an object containing a lis of system constants that meet the filter criteria. The filter is the WHERE clause of a SQL query (without WHERE) and in double-quotes.
Properties and Methods
None
Available
The .SelectMany(Filter, Query) method is available in:
- 15.03.090
- 15.04.059
- 15.05.034
- 16.00.039
- 16.01.011
- 16.02.004
- 16.03.001
- All newer builds
Type
List
Syntax
SystemConstant.SelectMany(Filter, Query);
Parameters
Parameter |
Required |
Description |
---|---|---|
Filter |
Yes |
A SQL WHERE clause without the keyword WHERE--in double quotes If the where clause does not return any results, trying to get the count of the SelectMany() will result in a scripting error. |
Query |
Yes |
Must be the word Query with a capital Q. Tells DEACOM how to find the information provided in the first parameter. |
Example
//--This script sets the notes field of every system constant with a name that starts with 'js_' to blank.
let loConstant = SystemConstant.SelectMany("LEFT(co_name, 3) = 'js_'", Query);
let lnCount = loConstant.Count;
for(let lnX = 0; lnX < lnCount; lnX++)
{
loConstant[lnX].co_notes = '';
loConstant[lnX].Save();
}