Skip to main content

LibraryRules

A Library Rule is a reusable Rule for the whole project. Its Expression uses placeholders: @@this stands for the matched column and @@alias.column for a column of the input the alias names in the Rule Set. Its Match fields select the columns it applies to by data type, length, precision, scale and system type. A Rule that applies a Library Rule takes its Expression from the Library Rule each time its view is generated, unless the Rule is detached.

The Rules that apply a Library Rule have their own page.

Overview​

Property
Description
NameThe name of the Library Rule. This name must be unique in the scope of the selected Customer and Version.
DescriptionFree-format description of the Library Rule.
ExpressionThe SQL of the Library Rule, written with placeholders: @@this stands for the matched column and @@alias.column for a column of the input the alias names in the Rule Set. BimlFlex fills in the placeholders for each Rule that applies the Library Rule when it generates the view. Macros are not accepted in a Library Rule. Example: UPPER(LTRIM(RTRIM(@@this)))
Match LengthThe length a column must have for the Library Rule to apply to it. Set to -1 to match columns of MAX length. Leave it empty to match any length.
Match PrecisionThe precision a column must have for the Library Rule to apply to it. Leave it empty to match any precision.
Match ScaleThe scale a column must have for the Library Rule to apply to it. Leave it empty to match any scale.
Dialect Alternates JsonAlternate versions of the Expression for other target system types, stored as JSON and keyed by system type code. A Rule that applies the Library Rule takes these alternates with the Expression.
Display FolderFolder path for organizing Library Rules in the UI tree view.

References​

Property
Description
CustomerReference to the Customer that this Library Rule belongs to.
VersionReference to the Version that this Library Rule belongs to.
Rule KindHow the Library Rule produces its column: Pass Through, Rename, Cast, Derived, Aggregate, Lookup or Constant.
Match Data TypeThe data type a column must have for the Library Rule to apply to it. Leave it empty to match columns of any data type.
Match System TypeThe system type of the connection of the view that the Library Rule applies to. Leave it empty to apply the Library Rule on every system type.