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.
thats not how appian works.locals are meant for values (before some other lead devs interjecting - know the rule, break the rule)and not interfaces.example how it shoudl rather look like:
example appplication (EXA) code for the main interface "ECA_MainInterface" a!localvariables( local!myValue1, local!myValue2: a!refreshVariables( value: .... refreshOnVarChange:local!myValue1 ), rule!EXA_subinterface(ruleInput: local!myValue1) ) sub interface "EXA_subinterface" a!localvaraibles( local!myvalue3: a!refreshVariables( value: .... refreshon: ri!ruleInput ), ..... ) local!myvalue2 and local!myvalue3 variables will be updated the moment "local!myValue1" is updated if you want to have dynamic interfaces on the level of visibility, you need showWhen conditions
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?