Discussion:
Skip 4gl form field
(too old to reply)
Rodney Sheppard
2013-05-08 09:02:06 UTC
Permalink
to skip input fields, I have used code like...

before field voicemail
IF GET_FLDBUF(site) = "UCP" THEN
IF fgl_lastkey() = fgl_keyval("DOWN") OR
fgl_lastkey() = fgl_keyval("TAB") OR
fgl_lastkey() = fgl_keyval("NEXT") OR
fgl_lastkey() = fgl_keyval("RIGHT") THEN
NEXT FIELD firstinit
END IF
IF fgl_lastkey() = fgl_keyval("UP") OR
fgl_lastkey() = fgl_keyval("PREVIOUS") OR
fgl_lastkey() = fgl_keyval("LEFT") THEN
NEXT FIELD pager
END IF
END IF


Is tere a way to programmatically set a field attribute to NO INPUT ?
ie. something like FGL_FORMFIELD_SETOPTION()


Rod
--------------------------------------------------------------------
Rodney Sheppard
Software Engineer - Development Manager
Trans-Mit Pty. Ltd.
7 Wendy Court Hampton Park,
Vic 3976, Australia
Phone... +61 3 87878744
Fax.........+61 3 87875722
Email...... ***@transmit.com.au
Web....... www.transmit.com.au
--------------------------------------------------------------------
__________________________________________________
Jonathan Leffler
2013-05-08 14:16:56 UTC
Permalink
Post by Rodney Sheppard
**
to skip input fields, I have used code like...
before field voicemail
IF GET_FLDBUF(site) = "UCP" THEN
IF fgl_lastkey() = fgl_keyval("DOWN") OR
fgl_lastkey() = fgl_keyval("TAB") OR
fgl_lastkey() = fgl_keyval("NEXT") OR
fgl_lastkey() = fgl_keyval("RIGHT") THEN
NEXT FIELD firstinit
END IF
IF fgl_lastkey() = fgl_keyval("UP") OR
fgl_lastkey() = fgl_keyval("PREVIOUS") OR
fgl_lastkey() = fgl_keyval("LEFT") THEN
NEXT FIELD pager
END IF
END IF
Is tere a way to programmatically set a field attribute to NO INPUT ?
ie. something like *FGL_FORMFIELD_SETOPTION()*
If the code should never enter the field, you can set the NOENTRY attribute
in the form. There isn't a way to change the NOENTRY status of a field at
runtime.

I have coded INPUT statements such that if a field needs to be skipped
conditionally, it can be skipped (and it handles go backwards or forwards
past the field). The net result is not as dissimilar from what you wrote
as all that, though it was in generated I4GL that used different techniques
in detail.
--
Jonathan Leffler <***@gmail.com> #include <disclaimer.h>
Guardian of DBD::Informix - v2013.0118 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
Reuben Barclay
2013-05-08 20:52:50 UTC
Permalink
With FourJs Genero / IBM Genero we removed the need for such code many
many years ago.



By the looks of the code, you are trying to prevent access to the field
voicemail if the value of site = "UCP".



So with Genero we would code that as something like ...



BEFORE INPUT

CALL DIALOG.setFieldActive("voicemail", site!= "UCP")



ON CHANGE site

CALL DIALOG.setFieldActive("voicemail", site!="UCP")





Reuben





From: Rodney Sheppard [mailto:***@transmit.com.au]
Sent: Wednesday, 8 May 2013 9:02 p.m.
To: informix-***@iiug.org
Subject: Skip 4gl form field



to skip input fields, I have used code like...



before field voicemail
IF GET_FLDBUF(site) = "UCP" THEN
IF fgl_lastkey() = fgl_keyval("DOWN") OR
fgl_lastkey() = fgl_keyval("TAB") OR
fgl_lastkey() = fgl_keyval("NEXT") OR
fgl_lastkey() = fgl_keyval("RIGHT") THEN
NEXT FIELD firstinit
END IF
IF fgl_lastkey() = fgl_keyval("UP") OR
fgl_lastkey() = fgl_keyval("PREVIOUS") OR
fgl_lastkey() = fgl_keyval("LEFT") THEN
NEXT FIELD pager
END IF
END IF



Is tere a way to programmatically set a field attribute to NO INPUT ?

ie. something like FGL_FORMFIELD_SETOPTION()





Rod

--------------------------------------------------------------------
Rodney Sheppard
Software Engineer - Development Manager
Trans-Mit Pty. Ltd.
7 Wendy Court Hampton Park,
Vic 3976, Australia
Phone... +61 3 87878744
Fax.........+61 3 87875722
Email...... ***@transmit.com.au
Web....... www.transmit.com.au
--------------------------------------------------------------------
__________________________________________________
Rodney Sheppard
2013-05-09 06:03:02 UTC
Permalink
Can you show an aexample of you code?
--------------------------------------------------------------------
Rodney Sheppard
Software Engineer - Development Manager
Trans-Mit Pty. Ltd.
7 Wendy Court Hampton Park,
Vic 3976, Australia
Phone... +61 3 87878744
Fax.........+61 3 87875722
Email...... ***@transmit.com.au
Web....... www.transmit.com.au
--------------------------------------------------------------------
__________________________________________________
----- Original Message -----
From: Jonathan Leffler
To: Rodney Sheppard
Cc: Informix List - IIUG
Sent: Thursday, May 09, 2013 12:16 AM
Subject: Re: Skip 4gl form field




On Wed, May 8, 2013 at 2:02 AM, Rodney Sheppard <***@transmit.com.au> wrote:

to skip input fields, I have used code like...

before field voicemail
IF GET_FLDBUF(site) = "UCP" THEN
IF fgl_lastkey() = fgl_keyval("DOWN") OR
fgl_lastkey() = fgl_keyval("TAB") OR
fgl_lastkey() = fgl_keyval("NEXT") OR
fgl_lastkey() = fgl_keyval("RIGHT") THEN
NEXT FIELD firstinit
END IF
IF fgl_lastkey() = fgl_keyval("UP") OR
fgl_lastkey() = fgl_keyval("PREVIOUS") OR
fgl_lastkey() = fgl_keyval("LEFT") THEN
NEXT FIELD pager
END IF
END IF


Is tere a way to programmatically set a field attribute to NO INPUT ?
ie. something like FGL_FORMFIELD_SETOPTION()



If the code should never enter the field, you can set the NOENTRY attribute in the form. There isn't a way to change the NOENTRY status of a field at runtime.


I have coded INPUT statements such that if a field needs to be skipped conditionally, it can be skipped (and it handles go backwards or forwards past the field). The net result is not as dissimilar from what you wrote as all that, though it was in generated I4GL that used different techniques in detail.



--
Jonathan Leffler <***@gmail.com> #include <disclaimer.h>
Guardian of DBD::Informix - v2013.0118 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be amused."
Rodney Sheppard
2013-05-09 06:05:52 UTC
Permalink
Is the code the same for 4js BDL / Informix D4GL?
and would it prevent mouse clicking into the field?

--------------------------------------------------------------------
Rodney Sheppard
Software Engineer - Development Manager
Trans-Mit Pty. Ltd.
7 Wendy Court Hampton Park,
Vic 3976, Australia
Phone... +61 3 87878744
Fax.........+61 3 87875722
Email...... ***@transmit.com.au
Web....... www.transmit.com.au
--------------------------------------------------------------------
__________________________________________________
----- Original Message -----
From: Reuben Barclay
To: informix-***@iiug.org
Sent: Thursday, May 09, 2013 6:52 AM
Subject: RE: Skip 4gl form field


With FourJs Genero / IBM Genero we removed the need for such code many many years ago.



By the looks of the code, you are trying to prevent access to the field voicemail if the value of site = "UCP".



So with Genero we would code that as something like ...



BEFORE INPUT

CALL DIALOG.setFieldActive("voicemail", site!= "UCP")



ON CHANGE site

CALL DIALOG.setFieldActive("voicemail", site!="UCP")





Reuben





From: Rodney Sheppard [mailto:***@transmit.com.au]
Sent: Wednesday, 8 May 2013 9:02 p.m.
To: informix-***@iiug.org
Subject: Skip 4gl form field



to skip input fields, I have used code like...



before field voicemail
IF GET_FLDBUF(site) = "UCP" THEN
IF fgl_lastkey() = fgl_keyval("DOWN") OR
fgl_lastkey() = fgl_keyval("TAB") OR
fgl_lastkey() = fgl_keyval("NEXT") OR
fgl_lastkey() = fgl_keyval("RIGHT") THEN
NEXT FIELD firstinit
END IF
IF fgl_lastkey() = fgl_keyval("UP") OR
fgl_lastkey() = fgl_keyval("PREVIOUS") OR
fgl_lastkey() = fgl_keyval("LEFT") THEN
NEXT FIELD pager
END IF
END IF



Is tere a way to programmatically set a field attribute to NO INPUT ?

ie. something like FGL_FORMFIELD_SETOPTION()





Rod

--------------------------------------------------------------------
Rodney Sheppard
Software Engineer - Development Manager
Trans-Mit Pty. Ltd.
7 Wendy Court Hampton Park,
Vic 3976, Australia
Phone... +61 3 87878744
Fax.........+61 3 87875722
Email...... ***@transmit.com.au
Web....... www.transmit.com.au
--------------------------------------------------------------------
__________________________________________________
Reuben Barclay
2013-05-09 09:00:19 UTC
Permalink
Post by Rodney Sheppard
Is the code the same for 4js BDL / Informix D4GL?
and would it prevent mouse clicking into the field?

Yes, it does prevent mouse clicking into the field.

The functionality was added to Genero, not the old products
 
Reuben

Loading...