1. Willian Padilha
  2. PowerServer 2020 or older (Obsolete)
  3. Tuesday, 9 January 2018 11:21 AM UTC

ItemChanged

messagebox('', gettext()) <<<< this returns old value, not the new value, and in build 1080 works fine

Anyone else with the same BUILD 1128 and that is with the same problem?

 

is Bug? 

regards

FILIBERTO SOSA Accepted Answer Pending Moderation
  1. Wednesday, 10 January 2018 17:16 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Magnos,

So basically this error was present in EBF 1080, that is why it was working for you when you called GETTEXT() in the ITEMCHANGED event and you got the current value.

Later on, this was fixes on EBF 1128 and now it is working properly, so when you can GETTEXT() you get the old value, since it has not gone throught all validations in the ITEMCHANGED event.   After this event, you can call GETTEXT() and you will get the value that the user just entered.

Thanks

Fili Sosa

 

Comment
There are no comments made yet.
FILIBERTO SOSA Accepted Answer Pending Moderation
  1. Wednesday, 10 January 2018 17:12 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

Magos,

Please use the DATA argument inside the ITEMCHANGED event to get what the user just entered.

Never use ACCEPTTEXT in the ITEMCHANGED EVENT.

You can use GETTEXT() but after the ITEMCHANGED event and you will see the value you want.

 

Comment
There are no comments made yet.
Lars Mosegaard Accepted Answer Pending Moderation
  1. Wednesday, 10 January 2018 05:05 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 3

To get the new value in the itemchanged event simply use the data argument.

GetText() is an old function,

PS:  Never call AcceptText() from the itemchanged event

Comment
There are no comments made yet.
Clarence Chamorro Accepted Answer Pending Moderation
  1. Tuesday, 9 January 2018 22:04 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 4

To solved your issue: At the ItemChanged Event before your messagebox script line write the following code. this.AcceptText().

AcceptText() will bring the field data to the datawindow buffer and you will have always the new data.

Regards,

Clarence A Chamorro

Comment
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.