Hi Everyone, I have two interfaces, interface 1 and Interface 2. The interface 2 is inside interface 1, interface 1 is having a button which is calling exp rule to call web service to update DB. Now when I click on button the interface 2 is not refreshing latest data. Could you please suggest how to achieve this?
Discussion posts and replies are publicly visible
You might need to use a refresh variable to do that. try to use your rule in a local and then use the refresh variable.
Thanks Konduru, I am using interface 2 rule in interface 1 and refreshing it on button click using refreshonvarchange and changing the variable on button click which is used in refreshoncarchange.
can you share code to follow up on your explanation?
This is Interface 2 called in interface 1, on button click refreshcount is changed.
Inside interface 2 calling the exp rule
In exp rule calling webservice to retrieve data
In every rule I am passing refreshcount to refresh data
so you are calling another interface into a local? did i get this right?and you are expecting that then the localsi in this called ui are updated automatically?
Hi Richard, Right that called ui should be updated on varchange.
Why are you calling a sub-interface by way of a local variable? I've never found this to add anything. And if not done very carefully it can have detrimental side-effects.
Hi Mike, this is to refresh the sub interface on variable change.
shubhamy0005 said:s to refresh the sub interface on variable change.
and still to clarify: values which are shown or if an UI element is visible or not?
Hi Richard, UI elements are visible. And I called the sub interface as above suggested and passing the rule input. But unfortunately it is not refreshing.
again, because the whole approach is not working like that.you dont call an Interface in a local.compare it to the example i posted previously. structure wise.
shubhamy0005 said:this is to refresh the sub interface on variable change
Yeah, what Richard said - this isn't how refreshing of an interface works. In >99.9% of cases, you will want to call a sub-interface directly. Within that interface you will handle any variable refreshing, for any variables local to that interface, inherently. This can include passing in a "trigger" variable to force-refresh them, when needed, though this is really only truly necessary on special occasions (like forcing a query to refresh after a "refresh" button click from the parent).
A component should never be used as the value of a local variable. While no error will be shown, placing a component in a local variable may result in unexpected or inconsistent behavior. Instead, components should be reused by defining them in a new interface rule.docs.appian.com/.../Local_Variables.html
Essentially by calling another interface which contains components per rule! as value for a local, thats happening. so avoid that.
Unknown said:A component should never be used as the value of a local variable
Oof. Strong words there - I actually do use a component initialized in a local variable in one of my custom components - the thing with that is, i tested it extensively and understand what it's doing ;-) And also it's smallish.
Edit: actually, that being said, it's barely a "component". It's just a rich text item.