TEXTFIELD: Difference between revisions
(Created page with "{{Keyword| <code>TEXTFIELD ( string )</code> | Access the value of a text field. The string must contain the text field type, e.g. <code>DDE.<dde-name></code> for a DDE te...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{Keyword | {{Keyword | ||
| | | | ||
Access the value of a text field. The string | 1= | ||
<code>TEXTFIELD ( [[expression]] )</code> | |||
| | |||
2= | |||
Access the value of a text field. The expression must be a string expression containing the text field type, e.g. <code>DDE.<dde-name></code> for a DDE text field or <code>User.<varname></code> for a user-defined text field. DDE text fields can reference single cells or cell ranges. The text field value is always a string. iMath tries to guess the value type and will create either [[number|numbers]] or [[string|strings]]. | |||
If the argument is a cell range, iMath will create a vector filled with the referenced cell values. The vector will be a row or column vector, depending on the cell range. | If the argument is a cell range, iMath will create a vector filled with the referenced cell values. The vector will be a row or column vector, depending on the cell range. | ||
For German users: [http://www.ooowiki.de/DDE.html ooowiki] has a good explanation of how to create DDE links. | To create a user-defined fields, go to '''Insert - Fields - More fields''' and click the '''Variables''' tab. Choose type '''User defined''' and create your variable in the input boxes below. Click the tick mark to finish. For German users: [http://www.ooowiki.de/DDE.html ooowiki] has a good explanation of how to create DDE links. | ||
| | | | ||
3= | |||
<code> | |||
EQDEF fname = "User.myfield" | |||
EQDEF fval = TEXTFIELD (VAL(fname)) | |||
</code> | |||
Note that [[VAL]] is required here to create a string expression from the variable. | |||
| | | | ||
4= | |||
[[CALCCELL]] [[TABLECELL]] [[SETTABLECELL]] [[SETCALCCELLS]] | [[CALCCELL]] [[TABLECELL]] [[SETTABLECELL]] [[SETCALCCELLS]] | ||
| | |||
5= | |||
2.2.0 or earlier. | |||
Up to version 2.2.6 only literal strings are allowed, not string expressions. | |||
}} | }} | ||
[[Category:Data exchange]] | [[Category:Data exchange]] |
Latest revision as of 18:52, 29 August 2018
Syntax
TEXTFIELD ( expression )
Implemented in iMath since version 2.2.0 or earlier.
Up to version 2.2.6 only literal strings are allowed, not string expressions..
Explanation
Access the value of a text field. The expression must be a string expression containing the text field type, e.g. DDE.<dde-name>
for a DDE text field or User.<varname>
for a user-defined text field. DDE text fields can reference single cells or cell ranges. The text field value is always a string. iMath tries to guess the value type and will create either numbers or strings.
If the argument is a cell range, iMath will create a vector filled with the referenced cell values. The vector will be a row or column vector, depending on the cell range.
To create a user-defined fields, go to Insert - Fields - More fields and click the Variables tab. Choose type User defined and create your variable in the input boxes below. Click the tick mark to finish. For German users: ooowiki has a good explanation of how to create DDE links.
Example
EQDEF fname = "User.myfield"
EQDEF fval = TEXTFIELD (VAL(fname))
Note that VAL is required here to create a string expression from the variable.