Skip to main content
Solved

Dont refresh value field when after show warning


Forum|alt.badge.img

hi expert.

I have problem in below image. I custom warning if value field Weight and Volume negative, when I type 0.000000 → show warning → recent value field Weight in screen = 0.00100 (old value). I dont want refresh value this field. ( recent value field Weight in screen = 0.000000).

Can you help me?

Thank you so much.

 

Best answer by Naveen Boga

Hi @thanhaim Once an error occurred, caches will rollback hence the value will be changed to old value.

The best option is to show a warning message instead of raising an error message.

 

Hope this helps!! 

View original
Did this topic help you find an answer to your question?

5 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • Answer
  • April 6, 2023

Hi @thanhaim Once an error occurred, caches will rollback hence the value will be changed to old value.

The best option is to show a warning message instead of raising an error message.

 

Hope this helps!! 


Forum|alt.badge.img
  • Author
  • Freshman II
  • 35 replies
  • April 6, 2023

hi @Naveen Boga .

 Thank you for your ideal. I just test it. When Weight <= 0 warning message will show, but I continue type Weight = -5 then record saved successfully. 

I think:

  • raising an error message prevent user type wrong
  • PXUIFieldAttribute.SetWarning is only show warning, wrong data still saved.

 

Can you help me show warning and prevent user save wrong data? Thankyou so much


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • April 9, 2023

@thanhaim  Can you please share your source code that you are showing the error message?

 

Below warning source code.

 


Forum|alt.badge.img
  • Author
  • Freshman II
  • 35 replies
  • April 10, 2023

@Naveen Boga I use ShowWarning. Thank you for your help.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • April 10, 2023

Hi @thanhaim  Great; thanks for sharing the update.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings