Jump to content


Photo
- - - - -

EODEXIT(0) & Mandatory fields


5 replies to this topic

#1 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 11 December 2002 - 06:41 AM

Hi,

More with mandatory fields.....

I have a screen with 5 input-able fields and field 3 is a mandatory input field.

I have a button that is assigned to run a logic that just does an EODEXIT(0).

EODEXIT(0) is supposed to exit the LS, doing all file writes but it is supposed to ignore mandatory input checks.

This works fine, unless the current field you are on before you press my button is a mandatory input field. Then the mandatory check is done, and you cant exit the screen using the button.

Any bright ideas on how to get around this one, anyone? (A generic solution, like the ForceWrite command is what I need... or maybe this is a bug that needs to be fixed for EODEXIT?)

Thanks,

Rob D.

#2 Stuart Burton

Stuart Burton

    Advanced

  • Members
  • PipPipPip
  • 71 posts
  • Gender:Male
  • Location:Luton, United Kingdom

Posted 11 December 2002 - 08:29 AM

Hi Rob,

How about using the property logic - field3.MANDATORYINPUT = FALSE in your logic to turn of the MI setting?

Stu

#3 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 11 December 2002 - 08:35 AM

Hi Stu....

Yep, I know, but I need a 'generic' solution.

I dont want to have to code that for every mandarory field in the system.

Rob D.

#4 Stuart Burton

Stuart Burton

    Advanced

  • Members
  • PipPipPip
  • 71 posts
  • Gender:Male
  • Location:Luton, United Kingdom

Posted 11 December 2002 - 09:13 AM

Yeah, sorry Rob, I realised what you were asking after I posted - Haven't been awake very long!

#5 Chris Mackenzie

Chris Mackenzie

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 368 posts
  • Gender:Male
  • Location:Bristol, United Kingdom

Posted 11 December 2002 - 10:01 AM

Hi,

Sorry if this sounds dumb, unused as I am to using
the GUI, but what is the screen mode and Last Read Field?

Setting the LRF to a field before the MI one might
bw worth a try?
The content and views expressed in this message are those
of the poster and do not represent those of any organisation.

#6 Andy Jones

Andy Jones

    Member

  • Members
  • PipPip
  • 41 posts
  • Gender:Male

Posted 11 December 2002 - 07:20 PM

Rob,

The demo function is incorrect, the documentation describes the behaviour of EODEXIT correctly.

EODEXIT(0) is the same as FLD(999)
FLD(999) was introduced into 4.6 and it is a way of skipping all subsequent fields, the intention being to get to the write on the record. It is correct then that this hits Mandatory Input check if the field you are on is mandatory and null - it would be the same as trying to fld jump forward off it in a button click logic.

EODEXIT(1) primarly does an F3 keypress. Again the intention really is to commit the record. After the write part of the timing cycle has finished it then exits the LS.
This can be used to write a paging screen record and then exit the paging screen, or similarly, exit a many-time screen.

The reason it does not stop when on the empty first MI field in the demo is that the cursor's on our friend the primary field!
The EODEXIT(1) issued by the button click does the 'F3' keypress behind the scenes, which because the field has no input the 'no data write' optimisation kicks in....
If ForceWrite() had been issued against the cycle then it would not do this optimisation and exit, and you'd get a MI error. You can check this by populating field 1 in the demo and try clicking the 'Ignore MI' button on field 2: it errors with MI field.


Out of interest, Rob, why would you not want a mandatory field to be populated, but still want to do the file writes? Without knowing what you're trying to achieve, doesn't it suggest the field shouldn't be mandatory?


Anyway, HTH

Andy
Nothing is foolproof to a sufficiently talented fool...

Don't learn from your own mistakes - it's safer and more entertaining to learn from the mistakes of others!

Just because you can, it doesn't mean you should!



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users