FIELDTEXT mystery

Deskin, Bob Bob.Deskin@Cognos.COM
Tue, 21 Sep 1999 08:56:43 -0400


You may get lots of answers to this one. The problem is the DISPLAY verb in
the EDIT procedure. The DISPLAY verb takes the item value and puts it in
FIELDTEXT. That's where the second field value comes from. There are
warnings in the manual about doing this. If you absolutely must do a DISPLAY
from within the EDIT procedure (or the INPUT for that matter), save the
value of FIELDTEXT into a temporary item first and restore it after.

Bob Deskin              
PowerHouse Web Product Manager and Senior Product Advisor
Application Development Tools, Cognos Inc.
bob.deskin@cognos.com (613) 738-1338 ext 4205 FAX: (613) 228-3149
3755 Riverside Drive P.O. Box 9707 Stn. T, Ottawa ON K1G 4K9 CANADA


> ----------
> From: 	Nick Tippler[SMTP:NT204@cus.cam.ac.uk]
> Sent: 	September 21, 1999 4:39 PM
> To: 	powerh-l@lists.swau.edu
> Subject: 	FIELDTEXT mystery
> 
> Afternoon All
> 
> I have a procedure which tests the value of FIELDTEXT for one field, and
> changes the contents of a second field, based on the given value.
> However, somewhere after EDIT and before OUTPUT, the FIELDTEXT for the
> first field assumes the ASCII(value) of the second field:
> 
> PROCEDURE EDIT     FIELD_1
> BEGIN
>     IF         FIELDTEXT = "E"
>           THEN LET FIELD_2 = 2
>        ELSE IF FIELDTEXT = "O"
>           THEN LET FIELD_2 = 1
>        ELSE IF FIELDTEXT = "C"
>           THEN LET FIELD_2 = 6
>    DISPLAY FIELD_2
> END
> 
> Any idea how I can stop this?
> 
> Regards
>  
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> +
> + Nick Tippler                                  nt204@cam.ac.uk
> + Registrar, Faculty of Education,          tel +44 1223 507145
> +            University of Cambridge,       fax +44 1223 507140
> +            Homerton College,
> +            Cambridge CB2 2PH
> +
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 
> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> =
> Subscribe: "subscribe powerh-l" in message body to
> majordomo@lists.swau.edu
> Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
> This list is closed, thus to post to the list, you must be a subscriber.
> 
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.