Hi All,
I am having a 2 buttons
Button A
Button B,
On click of Button A, there is a series of actions happening and an asych entry into the data happens... so the screen returns to the same screen and shows the Button B.
But the Button B should be enabled only once the data which is in MNI (the asynch) process should complete. for that i have used the refresh variable.But the Button is not getting enabled automatically.
How to refresh it automatically without clicking on anything. It can enable after a certain interval also which is fine.
herer is my code snippet
local!checkfinalResponseButton: a!refreshVariable(value:if(rule!A_checkNullAndEmpty(index(local!plan,"final_decision","")),"",rule!validateDocuments(caseId: ri!caseId,caseTypeId:index(local!caseDetails.data,"caseTypeId",""),finalDecision:index(local!plan,"final_decision","") )),refreshInterval: if(index(local!caseDetails.data,"currentStep","")="Closed",null,0.5)
I am using this in Load , and post this the value of this local variable i am using in disabled paramerter of the button.
a!buttonwidget(
disabled:if(local!checkfinalResponseButton,false(),true())
)
Discussion posts and replies are publicly visible
You mentioned that you are using this in load - it has to be used in the a!localVariables function for this to work.
I am using the a!localVariables
Still it is not working i want it to refresh automatically
Is it working if you remove the if() statement from the refreshInterval parameter and just hardcode it as 0.5? I'm wondering fi the local!caseDetails.data is not getting updated, so your refresh interval isn't getting triggered.
No i didnt use the Refreshvariable on var change i used only refresh interval so how will it differ if the local!caseDetails.data is not changing
I guess what I'm saying is that there are really two main things that could be wrong:
1) The refresh isn't running, so the value isn't updating
2) The refresh IS running, but the value of your variable is incorrect.
It's easy to test (1) because you can just hardcode a value for the refresh, so you can be certain that it will refresh after 30 seconds. Then, you can determine if the issue is (1) or (2). Then, you can further test to determine if one of your expressions is evaluating incorrectly.