DCREAD VALID

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
RDalzell
Posts: 205
Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA

DCREAD VALID

#1 Post by RDalzell »

Hi Roger,

Something recently observed
The DCGET VALID does not get called if paired with WHEN

Using xBase++ 1.90 355 and eXpress 1.9 257

\

Code: Select all

  @  1.00,24.00 DCGET nJudge           Picture '9999'                                                                            PARENT oGroup3a          COLOR GRA_CLR_BLUE ;
               TABSTOP ;
               GETID "Get_nJudge" ;
                WHEN {|| nJudge == 0 } ;
                TABGROUP XBP_BEGIN_GROUP ;
                VALID {|| ValidateJudge(nJudge, GetList) } ;
                POPUP {|n| n := JudgeScan(nJudge, GetList) } ;
                MESSAGE 'Enter The Hearing Officer ID Number to be Maintained.' INTO oMsgBox
Rick

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCREAD VALID

#2 Post by rdonnay »

Valid codeblocks do not get evaluated if the WHEN clause code block returns a .f.

I'm reluctant to change this behavior because it has been the default behavior in eXpress++ for 12 years.

It appears that you do not want JUDGE to be edited after the first time a value is entered.

I can't think of a simple solution.

What does the validation do?
The eXpress train is coming - and it has more cars.

User avatar
RDalzell
Posts: 205
Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA

Re: DCREAD VALID

#3 Post by RDalzell »

Simply return the values for the record to be edited.

It appears that the WHEN functions if it is not the specific value of the DCGET as in the following example:

Code: Select all

@  1.00,21.00 DCGET cCode       Picture '@!'                                                                                        PARENT oGroup       COLOR GRA_CLR_BLUE ;
				    TABSTOP ;
                GETID "Get_cCode" ;
                WHEN {|| nGroup == 1 } ;
                TABGROUP XBP_BEGIN_GROUP ;
                VALID {|| ValidateCode(cCode, cRecId, GetList) } ;
                POPUP {|c| c := GuiCodeScan(c, cRecId, cText, GetList) } ;
                MESSAGE 'Enter The ' + cText + ' Code To Be Maintained.' INTO oMsgBox
No problem, I can code around this.

How are the teeth feeling?

Thanks,
Rick

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCREAD VALID

#4 Post by rdonnay »

I'm feeling great! After 3 trips to Mexico in 3 years I now have a pretty good set of teeth.

We're having another devcon in AZ next year in October. Hope you will be there.
The eXpress train is coming - and it has more cars.

User avatar
RDalzell
Posts: 205
Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA

Re: DCREAD VALID

#5 Post by RDalzell »

I would have liked to been there this year, but the time frame conflicted with other events.

While I certainly missed seeing those attending, I was uncertain of the benefit of attending except the social aspect of seeing old friends.

I really liked your eXpress Devcon in Boise because xBase is the car, but eXpress is what drives us.

Glad to hear and looking forward to seeing your smile.

Rick

User avatar
GeneB
Posts: 158
Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:

Re: DCREAD VALID

#6 Post by GeneB »

Valid codeblocks do not get evaluated if the WHEN clause code block returns a .f.
This solved a problem I worked on for hours. I finally discovered a VALID was changing a variable in another GET and I didn't know how to prevent it. After I saw this topic I used WHEN{||.f.} in tandem with HIDE{||.t.} and it worked as I wanted.

Please don't change the way it works. Perhaps a VALIDWHEN parameter could be added instead.

It isn't always asking questions that make this forum so valuable to me. Thank you and everyone for all your input. I learn from every question.

bwolfsohn
Posts: 649
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: DCREAD VALID

#7 Post by bwolfsohn »

RDalzell wrote:I really liked your eXpress Devcon in Boise because xBase is the car, but eXpress is what drives us.
Rick
Where's the damn like button on this BB ??
:clap:
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCREAD VALID

#8 Post by rdonnay »

like.jpg
like.jpg (8.4 KiB) Viewed 10895 times
The eXpress train is coming - and it has more cars.

Post Reply