Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Skip 4gl form field

134 views
Skip to first unread message

Rodney Sheppard

unread,
May 8, 2013, 5:02:06 AM5/8/13
to inform...@iiug.org
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...... r...@transmit.com.au
Web....... www.transmit.com.au
--------------------------------------------------------------------
__________________________________________________

Jonathan Leffler

unread,
May 8, 2013, 10:16:56 AM5/8/13
to Rodney Sheppard, Informix List - IIUG

On Wed, May 8, 2013 at 2:02 AM, Rodney Sheppard <r...@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 <jonathan...@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

unread,
May 8, 2013, 4:52:50 PM5/8/13
to inform...@iiug.org

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:r...@transmit.com.au]
Sent: Wednesday, 8 May 2013 9:02 p.m.
To: inform...@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

unread,
May 9, 2013, 2:03:02 AM5/9/13
to inform...@iiug.org
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...... r...@transmit.com.au
Web....... www.transmit.com.au
--------------------------------------------------------------------
__________________________________________________
----- Original Message -----
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 <r...@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()

Rodney Sheppard

unread,
May 9, 2013, 2:05:52 AM5/9/13
to Reuben Barclay, inform...@iiug.org
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...... r...@transmit.com.au
Web....... www.transmit.com.au
--------------------------------------------------------------------
__________________________________________________
----- Original Message -----
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:r...@transmit.com.au]
Sent: Wednesday, 8 May 2013 9:02 p.m.
To: inform...@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...... r...@transmit.com.au
Web....... www.transmit.com.au
--------------------------------------------------------------------
__________________________________________________


_______________________________________________
Informix-list mailing list
Inform...@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list

Reuben Barclay

unread,
May 9, 2013, 5:00:19 AM5/9/13
to Rodney Sheppard, inform...@iiug.org
> 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
0 new messages