spartacus
25th October 2005, 13:08
Hi all,
we have a field of kind tcdate, a segmented field. We disabled only the "time"-segment of this field (field.odat.t.time) with "disable(odat.t.time)".
But now we noticed, that "when.field.changes" doesn't work anymore, also in the "field.odat.t.date" - section!
For us it looks as so, that if you disable ONE SEGMENT of a segmented field, "when.field.changes" doens't work anymore, for none segment!
Did you observe the same behaviour? Is this a bug, or a feature?
v_chandra
26th October 2005, 09:04
Hi
Is it "disable(odat.t.time)" ?, because in Help it is "disable.fields(odat.t.time)".
Thanks and Regards
spartacus
14th March 2006, 16:51
chandra:
sorry it is disable.fields :D
NPRao
15th March 2006, 02:29
Spartacus,
Refer to the Tools programmer manual -
void disable.fields( [ long mode,] string field [, occurrence] [, string field [, occurrence] ... )
Description
This disables single-occurrence and multi-occurrence fields on a form.
To disable all fields of a group, see disable.group().
Because the information is not available, you can not use this function in the before.program section.
Arguments
mode
This is an optional argument. It has two possible values:
DISABLE This is the default mode and does not need to be specified.
READONLY The field(s) become read-only fields that cannot be edited by the user.
field [,occurrence]
This identifies the field to be disabled.
For a single-occurrence field, this is the field name. For a multioccurrence field, this can be either the field name or the field name followed by an occurrence number (depending on whether you wish to disable all occurrences of the field or only one particular occurrence).
For array fields, UTC fields, and segmented fields, you can append suffixes to the field name to indicate the particular element or segment to be disabled. If you omit these suffixes, all elements/segments are disabled.
To disable a particular element of an array field, append the element number (in parentheses) to the field name. The element number must be an integer, formatted as a string. It cannot be a variable. For example: "tfmod100.perd(10)".
To disable only the date or time element of a UTC field, append either .date or .time to the field name. For example: "ttadv300.cdat.time".
To disable a particular segment of a segmented field, append
.segment.segment_id to the field name. For example: "tiitm001.item.segment.1".
Examples
| Disable the date element of a UTC field
ttaad500.fidt = 0
disable.fields( "ttaad500.fidt.date" )
| Disable the first and second segments of a segmented field
disable.fields( "tcibd001.dfit.segment.1", "tcibd001.dfit.segment.2" )