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 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.
How do you know that the query is being called again? Do the values change? Or are you just seeing a large number of milliseconds?
How did you set the refresh of the union() based local variable? Are you doing the union operation every turn?
a!localVariables( local!addEditGridSelection: a!gridSelection( pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 10, sort: a!sortInfo( field: "issuerPublishedReportingName", ascending: true ) ), selected: null ), local!excel: a!refreshVariable( value: if( isnull( ri!document ), {}, readexcelsheet( excelDocument: ri!document, sheetNumber: 0, startRow: 1 ).result ), refreshOnReferencedVarChange: false ), local!columnOne: a!refreshVariable( value: a!forEach( local!excel, index( fv!item.values, 1, null() ) ), refreshOnReferencedVarChange: false ), local!excelColumnOne: a!refreshVariable( value: touniformstring( local!columnOne ), refreshOnReferencedVarChange: false ), local!associatedCompanies1: a!refreshVariable( value: rule!PROXY_PXY_watchlistProcessExcelData( excelData: local!excelColumnOne ), refreshOnReferencedVarChange: false ), local!associatedCompanies: union( local!associatedCompanies1, local!associatedCompanies1 ), local!notPresentList: reject( fn!isnull, difference( local!excelColumnOne, local!associatedCompanies ) ),
{................}
)