131
Views
17
Comments
Solved
Refresh Expression After Clicking Button
Question
Application Type
Reactive
Service Studio Version
11.54.49 (Build 63182)
Platform Version
11.26.0 (Build 41987)

I have an expression and it is entity attribute and it has numeric value and then i have a button, the thing is that the expression shows the overall total and when i click the button there will be some calculations. is there a way that i can click the button, expression can dynamically change depends on the total of the calculations? in short it can refresh after transaction? thank youo!

2022-07-03 17-24-08
Sourabh sharma
Solution

Hi budang haba,

I have attached the OML for you !! kindly Try

hope this will help you!! if not plz let me know.

Kind regards

Sourabh Sharma


RefreshExpressionAfterClickingButto.oml
UserImage.jpg
budang haba

it actually work sir. thank you this is what im looking for

2025-09-21 06-51-05
Mohd Anees Mansoori

Hello,

Have you tried refreshing the aggregate (by which the expression is bind) inside the button on click logic??


UserImage.jpg
budang haba

yes sir i tried refreshing it but doesnt work

2025-09-21 06-51-05
Mohd Anees Mansoori

ok, can you please share your oml so that we can look into it and find out what exactly the problem is?

Regards

Anees

UserImage.jpg
budang haba

sorry i cant send you the oml due to privacy

2023-04-18 10-31-31
Anshul Jain

Hi Budang,

Assuming you don't want to update data in the entity & refresh the aggregate on the button on-click action. You can use a local variable for this in your expression. Assign the local variable on the onAfterFetch of your aggregate with the value of your desired entity attribute. In the button on-click action you can perform the necessary calculation and update the value of the local variable accordingly. This should update the value of the expression dynamically.

Thanks

UserImage.jpg
budang haba

thank you for responding sir,  can you provide me your oml on that? thanks

2024-01-04 09-21-21
Venkatesaiya

Hi @budang haba ,
I shared my OML here please refer it. I implemented by @Anshul Jain suggestion.

Thanks

Test.oml
UserImage.jpg
budang haba

Thanks for sharing sir but for my part it doesnt work

2025-01-09 14-56-57
IQ78

My 2 cents on not refresh:

1. make sure the data has been updated in the entity - use commit if in doubt

2. use refresh widget tool

3. use action hasfetch()

4. put inside 'on afterfetch' callback

regards

UserImage.jpg
budang haba

already tried the  refresh widget tool but doesnt work sir thnaks

2023-04-18 10-31-31
Anshul Jain

Hi budang,

Please clarify whether you want to or you do not want to update the attribute in the entity. Do you want to save the value of that particular attribute in the entity or is it just for the client side(Front-end)? If it is only for client-side then the suggested solution should work. Could you share more details about your application behavior after implementing this? If you want the attribute value to be updated in the entity, you first need to call an entity action(update or upsert action depending on your requirement) to update the data and then use the refresh data tool in your action. 

Thanks

UserImage.jpg
budang haba
2024-05-22 10-21-41
Mohammad Hasib

Create a local variable and assign it to expression.

Fetched the data from DB and on after fetch assign it to the variable created by you.

On Button click do the calcu;ations and assign the value again to the local variable created by you. 


Hope it will work for you.


Regards,

2020-11-30 04-40-12
Mithun Rathod

Hi Mohammad Hasib,

I wanted to suggest the same. I think this will work.

UserImage.jpg
budang haba
2022-07-03 17-24-08
Sourabh sharma
Solution

Hi budang haba,

I have attached the OML for you !! kindly Try

hope this will help you!! if not plz let me know.

Kind regards

Sourabh Sharma


RefreshExpressionAfterClickingButto.oml
UserImage.jpg
budang haba

it actually work sir. thank you this is what im looking for

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.