Popup jump option

This forum is for eXpress++ general support.
Post Reply
Message
Author
omni
Posts: 534
Joined: Thu Jan 28, 2010 9:34 am

Popup jump option

#1 Post by omni »

Roger,

We have a popup that jumps to the next field, but that field is not always the one we want it to go to. If the user makes a certain selection it needs to go to another field.

POPUP {|c|{bookship(c,.t.,"S"),Dateship}} ;

IF they leave the field blank (actually a 0 in the validation) it then needs to go to oMiscship instead of Dateship. Can we use logic in that feature?

Thanks

Fred
Omni

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

Re: Popup jump option

#2 Post by rdonnay »

This may work:

Code: Select all

POPUP {|c|{bookship(c,.t.,"S"),IIF(c='0',oMiscShip,Dateship)}} ;
The eXpress train is coming - and it has more cars.

omni
Posts: 534
Joined: Thu Jan 28, 2010 9:34 am

Re: Popup jump option

#3 Post by omni »

It always responds as if it is zero (which is the default value), it acts af if it needs to be {||c or similar which compiles but gives an error when running. Its a number zero if that matters, not a character. Error is parameter has a wrong data type when using {||

Fred

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

Re: Popup jump option

#4 Post by rdonnay »

Code: Select all

POPUP {|c|{bookship(c,.t.,"S"),IIF(c=0,oMiscShip,Dateship)}} ;
The eXpress train is coming - and it has more cars.

omni
Posts: 534
Joined: Thu Jan 28, 2010 9:34 am

Re: Popup jump option

#5 Post by omni »

Yes, I changed it to a number when I tested. Just did not know if it made a difference that it would not allow a numeric for comparison. The problem appears to be that the popup/jump occurs prior to the validation, so it always uses the original value for C.

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

Re: Popup jump option

#6 Post by rdonnay »

Write me a small sample program to work with.

I'm very busy getting ready for the Phoenix devcon next week.
The eXpress train is coming - and it has more cars.

User avatar
TWolfe
Posts: 60
Joined: Thu Jan 28, 2010 7:34 am

Re: Popup jump option

#7 Post by TWolfe »

Code: Select all

POPUP {|c|{bookship(@c,.t.,"S"),IIF(c=0,oMiscShip,Dateship)}} ;
Pass c to bookship() by reference.

From the docs: "Code block parameters are LOCAL variables which exist when the code block is executed and are only visible within the code block."

As locals, they must be passed by reference if you want to see them changed by the called function/procedure.

HTH,
Terry
"I hate obvious stuff, it is often so hard to see!"

Post Reply