21
Views
20
Comments
Solved
How to immediately reflect enable button when enable button change?

Hi all,

I have a button, and I've assigned the 'EnableButton' local variable to the 'Enable' attribute of that button. However, when my client action changes the 'EnableButton' local variable from false to true or vice versa, the change is not immediately reflected; it only takes effect when I refresh the page.

Is there any way to make it reflect the change in the 'EnableButton' local variable without needing to refresh the page, or do I have to write JavaScript to force a page refresh at the end of my client action?

I would appreciate it if you could provide guidance on how to solve this issue.


Regards, 

Cuong Su

Solution

Ah, I figure out, that button was covered by container and there are also have another logic to show or hide that container. No wonder I can not to show or hide the button by its action. Thank you your suggestion. It's remind me to check the widget tree.

Hello Cuong,

Are you using Reactive or Traditional?

Hi Komal,

I using Reactive.

Hello,

As other folks mentioned it should should work as reactive does auto refresh on value change, are you changing the value of Enable Button twice in the action or it just once "Enable Button =false".

regards,

Komal


Hi Komal,

As you can see in image attached, I assign my button to false at the begin of the client action and to true at the end of the client action. Any ideas.

I also tried to display the variable's value on the screen for easier investigation. However, I noticed that after the client action finishes, it doesn't display the variable's value (whether true or false) again until I refresh the page. 


Check the occurrences of Enable Button Variable and while debugging check what value it holds(True/False) at the end of the flow. 

Hi,

I also tried to display the variable's value on the screen for easier investigation. However, I noticed that after the client action finishes, it doesn't display the variable's value (whether true or false) again until I refresh the page. As you can see on comment above I just edited.

Hi @Cuong Su ,
Could you please elaborate more about your scenario, in a simple scenario, it should work.
If you can provide OML then it will be more easy to understand.

Hi,

Yes, usually it should work but I don't know for this project it seem like it's not working. Applogize because I can not share OML file because of security.

Ok no problem, You can check the IsEnable default value, find uses of this variable and chec the assignments, or try to find the other assignments by using the debugger.
Is your action running properly until the last assignment or it is going to exception handler flow?

By checking these things you can able to find the issue.

Hope this helps you.

Hi @Cuong Su ,

In reactive usually you do not need to refresh the page for this type of scenario. Can you please share a Demo OML for your problem so that I can have a look at it.

Thanks & Regards.

Sudip Pal

Hi,

Applogize because I can not share OML file because of security.

Solution

Ah, I figure out, that button was covered by container and there are also have another logic to show or hide that container. No wonder I can not to show or hide the button by its action. Thank you your suggestion. It's remind me to check the widget tree.

Hi @Cuong Su ,

As others mentioned the change should be reflected automatically without the need of a page refresh. The only thing you can check inside your client action something else is changing the value of your enable variable after you change the value.  

Thank you, appreciate your support 

Hi @Cuong Su ,


As all other developers mentioned the changes should be happen automatically in reactive app without page refresh. As per Suprio Roy mentioned please check you client action or debug the flow and find the value of local variable (Boolean), are you passing proper value.

For your reference here I have added the OML based on your query. 


Regards,

Seetha Ganesan. 

Buttonenable.oml

Thank you, appreciate your support 

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