Hi guys,
I have a question that I have a List of CDT return from a expression rule, i need to export data with in that list by EXCEL format.
a!exportDataStoreEntityToExcel( saveInFolder: cons!DSBX_FOLDER, documentToUpdate: todocument( local!exportDocId ), documentName: if( rule!GBL_isBlank( local!exportDocId ), trim( concat( " Tasks Export - ", now() ) ), null ), includeHeader: true, entity: local!gridDataSP, selection: a!querySelection( a!queryColumn( field: "firstName" ) ), onSuccess: { a!save( local!exportDocId, fv!newDocument ) }, onError: { a!save( local!exportDocId, null ), a!save( local!exportError, true ) } )
local!gridDataSP is that List of CDT.
Please give me some help, thanks guys!
Discussion posts and replies are publicly visible
Hi,
I don't think that you can just pass a local variable instead of the entity. This function only accepts a Data Store Entity (as the name already suggests). You then can make a selection using a!querySelection(). This means, the function is directly fetching the data from the DB.So, either you save your data to be exoprted in the DB or you need to go via a process report as described in this post:
community.appian.com/.../export-to-excel
Hope that helps.
We use this as well, if you cannot do it in the excel plugin directly just run a expression rule just before which gives the unique keys.This set of keys you can use in your selection / filter