New features in this version:
- Calculated fields can now be excluded from automatic global updating that is triggered by the “Update All” command and by adding and deleting fields. This enables you to create calculation fields serving as time-stamps for individual records, like:
=today() & " " & now()
Such a time-stamp will be updated for a given record only after manual changes of this record’s fields.
Calculated fields can be also excluded from the “Update All” action to make updating huge record sets faster, e.g. if the related formulas are expected to return the same values. - The “Field Setup” dialog box:
https://citadel5.com/help/gsbase/calc_exclude.png - A new formula in the “informational” category: TextStats(field, type)
Returns the LongText or Code field statistics:
type = 0 - returns the number of words,
type = 1 - returns the number of letters and numbers,
type = 2 - returns the number of letters, numbers and spaces,
type = 3 - returns the number (2) plus punctuation characters and separators,
type = 4 - returns the number of newline characters. - A new formula in the “informational” category: ObjectStats(field, type)
Returns the Images/Files field statistics:
type = 0 - returns the number of objects,
type = 1 - returns the size in bytes of the biggest object in a field,
type = 2 - returns the size in bytes of the smallest object in a field,
type = 3 - returns 1 if a field contains images (in a format supported by GS-Base) or 0 otherwise.
3/31/2023 - Update
- The function makeUnique(table, v, field) has been added
Checks whether the value ‘v’ occurs in the ‘field’ in the specified ‘table’ and if so, it creates its copy by adding the (n) suffix for text strings or adding 1 for numbers (starting from the specified number, till the unique value is found).
The ‘v’ can be any text, number or a field name. The type v and the ‘field’ type must be the same.
=makeUnique(“producs”, “tofu”, “productnames”) returns tofu(1)
=makeUnique(“producs”, “tofu(1)”, “productnames”) returns tofu(2)
=makeUnique(“producs”, 10, “productID”) returns 78 (as a first unused number >= 10)
- The function isUnique(v) has been added
Checks whether the value ‘v’ (a text string or a number) already occurs in current field and if so, it returns 1. Otherwise it returns 0.
The makeUnique() and isUnique() functions are two special functions that have the following restrictions:
If the ‘table’ is the same table where the function is used, makeUnique() can be executed only as a single action field conversion or validation formula and is inactive for any block operations or recalculation operations.
The isUnique() function is always used in-place, in the same field it refers to and it can be executed only as a single action field conversion or validation formula, that is, you enter it in the “Field Setup > Conversion Formula” field.