1. George Hannah
  2. PowerBuilder
  3. Friday, 27 January 2023 16:01 PM UTC

Hi. I'm having an issue with an edit that we've added to a pb window. 

 

The window has 2 datawindows. We've added code to itemchanged to validate, but this code only fires if I tab off the field, or click on another field on THAT datawindow. If we click on a field on the other datawindow, the event doesn't fire. What event do we need to code in to make this work? ie, I want the edit to fire when the user clicks across datawindows. 

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 27 January 2023 16:21 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi George;

  In the DW where the App user has been editing, use the AcceptText() command on a LoseFocus Event. Then check the Return Code on the AcceptText command. If it failed then return to the problem DW with a SetFocus () command to continue error processing. HTH

Regards .. Chris

Comment
  1. Chris Pollach @Appeon
  2. Friday, 27 January 2023 17:48 PM UTC
You are most welcome! ;-)
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 27 January 2023 20:46 PM UTC
LOL, not only "lately" !

  1. Helpful 1
  1. Benjamin Gaesslein
  2. Monday, 30 January 2023 12:01 PM UTC
Be *very* careful with this, calling AcceptText from LoseFocus can potentially get users stuck in an infinite loop. See the PB help entry for AcceptText for further details.
  1. Helpful 1
There are no comments made yet.
George Hannah Accepted Answer Pending Moderation
  1. Friday, 27 January 2023 17:00 PM UTC
  2. PowerBuilder
  3. # 1

I think you're right. Who did this? :)

 

Comment
  1. Chris Pollach @Appeon
  2. Friday, 27 January 2023 17:06 PM UTC
Could be PowerScript gremlins ... LOL!
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.