Custom Conversion Routines - AGAIN (OpenInsight Specific)
At 15 FEB 1998 07:07:35PM Michael - LMS wrote:
THIS IS THE SECOND TIME I HAVE PLACED THIS QUERY IN THIS DISCUSSION. ANY RESPNOSE WOULD BE APPRECIATED, EVEN AN "I DON'T KNOW. I'LL LOOK INTO IT".
We have the following subroutine in our system which performs date validation and conversion.
COMPILE SUBROUTINE CONV(Type,Data.To.Convert,Subr.Label,Returned.Data)
!
Declare FUNCTION MSG
!
* MAIN
Returned.Data='Begin CaseCase Type=ICONV'Begin CaseCase Subr.Label=DATE'temp=ICONV( Data.To.Convert, '(DE)')If temp # '' ThenReturned.Data=tempEnd Elsemesg=The data entered must be a valid date.'void=MSG( @WINDOW, mesg)STATUS()=3EndEnd CaseCase Type=OCONV'Begin CaseCase Subr.Label=DATE'Returned.Data=OCONV( Data.To.Convert, 'D4/E')End CaseEnd CaseRETURN
We set ] for the validation of a control on a window and we set the conversion for the same control to CONV,DATE. Then if we enter an invalid date when we loose focus from the control the Type parameter is set to ICONV??? and the validation is performed rather than the conversion!!!!
This has worked fine previously and has only been noticed since upgrading to OI 3.4
If anyone has any answers as to why this happens I would like to know why.
Thanks,
Michael
At 16 FEB 1998 02:17PM Cameron Revelation wrote:
Michael,
We set ] for the validation of a control on a window and we set the conversion for the same control to CONV,DATE. Then if we enter an invalid date when we loose focus from the control the Type parameter is set to ICONV??? and the validation is performed rather than the conversion!!!!
I thought I did respond to this question earlier … apologize if it got missed. (I did respond to a similar question.) There are three different tasks:
Input Validation Input Conversion Output ConversionIn Arev, the first two were done by validation and the last one was done by conversion. In OI, the first one is done by validation and the last two are done by conversion. AFAIK It has been this way since OI2.0.
Cameron Purdy