• • • • • • 6.0
New to Analytica 5.0
CellEntry( allowExpr, allowNumber, allowText, allowNull, allowIdentifier )
(Note: It would be unusual for a model builder or user to make use of this function directly).
Specifies whether a general expression can be entered into a definition or table cell, or whether entry is restricted to literals like numbers or text. When restricted, it reduces the chance that text form a valid expression, or accidentally match an identifier.
This cell format predicate is set within the Att_CellFormat attribute when you configure the Entry type on the Entry tab of the Cell format dialog. It can be used in a computed cell format, but this direct use is rare. See the description of Text entry on the Cell format dialog page for more details.
Set «allowExpr» to false to restrict entry to literals.
Set «allowNumbers» or «allowText» or both to specify whether numbers or text are allowed. When numbers are not allowed, then an entry such as 15 will be interpreted as the text "15".
Set «allowNull» to true to also allow Null. When set and you type
Null, it becomes the value Null. When this is not set or false and «allowText» is true, then typing
Null enters as the text
If you want your user to enter handles to objects, you can set «allowHandles» to true. When you do this, the identifier of the object displays in the edit table cell, even though the underlying table cell contains the expression
Handle(ident). The result will be a handle. This can be contrasted with expression entry, it which an identifier would be evaluated and would return the variable's value.
Use in computed formats
A Cell Format Expression can make use of this attribute to control entry type, and in that context, the properties could be computed dynamically. This would only make sense in an edit table, and by default, the Cell Format Expression does not apply to edit tables; hence, for any effect, you would need to configure it to apply by setting the 1 bit of CellFormatFlags. You can set this bit by right-clicking on the Cell Format Expression and selecting Apply computed cell formats to edit table.
I have not encountered a compelling use case yet for using this from Computed cell formats.