Hi All
In 1st local variable i am calling an exprission rule and getting the data
In 2nd local variable i am using UNION(local!associatedCompanies1,local!associatedCompanies1)
but why the execution time is more for 2nd variable
I thing this expression rule is calling second time in 2nd variable
can any one tell me why it is happning
Discussion posts and replies are publicly visible
It's not. It's just that UNION can be an expensive operation.
It's a little hard to tell without a bit more information (what is the SAIL for your interface? what is the expression rule called in the first variable?), however a couple general suggestions:
union(local!associatedCompanies, touniformstring({}))
i have written code in a!localVariables(....)
in first variable i am calling query entity
i got the issue the first variable which contains a!queryEntity() is always executing when ever we are calling the local variable
can you tell me what to use in a!refreshVariable
basically it is having with() functionality
a!refreshVariable(value: local!associatedCompanies ,refreshOnReferencedVarChange:false),
this is not working i am using appian 20.1
Can you provide more context? Are you defining a new local variable here or what? This doesn't look like a valid use of a!refreshVariable otherwise.
a!localVariables(
local!associatedCompanies1: rule!PROXY_PXY_watchlistData(Ids: local!ColumnOne ), local!associatedCompanies:union(local!associatedCompanies1,local!associatedCompanies1),)
First things first - should the value of local!associatedCompanies1 update automatically if local!ColumnOne changes?
no I have kept a!refreshVariable(value:local!columnOne,refreshOnReferencedVarChange: false)
Could you just post the whole SAIL of your interface? It's really hard to follow a snippet at a time. Also, can you clarify where you are seeing this degredation in performance? Is it only slow loading the page, or is it slow with every interaction? If it's only slow when loading the page, then I don't think you are having any issues with refreshVariables.
Nikkheel said:no I have kept a!refreshVariable(value:local!columnOne,refreshOnReferencedVarChange: false)
I agree with Peter, we need to see larger context (your whole interface, preferably) - the snippet you've provided here again doesn't represent how a!refreshVariable() actually works, so it would be useful to see exactly how and where you're using it in bigger-picture context.