Download all records of dashboard in excel. Dashboard build in interface.
We can easily download all records through simple tick mark option in record type but don't know how to do that in interface.
Discussion posts and replies are publicly visible
Hi,
You can create a link in on the interface and under saveinto, you can call a!exportDataStoreEntityToCsv() to export the tables rows to csv(Very similar to record feature).
a!localVariables( local!exportDocId, local!errorMessage, { if( isnull(local!exportDocId), /*This link field contains the link that starts the export*/ a!linkField( labelPosition: "COLLAPSED", links: a!dynamicLink( label: "Export to CSV File", saveInto: { a!exportDataStoreEntityToCsv( entity: cons!ENTITY, documentName: "CSV Export " & now(), saveInFolder: cons!FOLDER, onSuccess: a!save( local!exportDocId, fv!newDocument ), /*This displays an error if there is an issue executing the the save*/ onError: a!save( local!errorMessage, "Error Exporting File to CSV" ) ) } ) ), {} ), if( /*This only displays the download link if a valid document was created*/ not(isnull(local!exportDocId)), /*This changes the link to a download link for the newly created document */ a!linkField( links: a!documentDownloadLink( label: "Download CSV File", document: local!exportDocId ) ), a!textField( value: local!errorMessage, readOnly: true ) ) } )
Thanks
Thanks for Reply.
I have tried this but i got error like:
"Interface Definition: Expression evaluation error: An error occurred while executing a smart service: Unable to export. Maximum number of columns exceeded: 50 (APNX-1-4505-038)"
Please find why i got this error. My code is:
a!linkField( labelPosition: "COLLAPSED", links: a!dynamicLink( label: "Export to Excel File", saveInto: { a!exportDataStoreEntityToExcel( entity: cons!CRP_ROBOTIC_PROJECT_DSE, documentName: "Excel Export ", saveInFolder: cons!FOLDER1, onSuccess: a!save( local!exportdoc, fv!newDocument ), /*This displays an error if there is an issue executing the the save*/ onError: a!save( local!errorMessage, "Error Exporting File to CSV" ) ) }))
Hi, You are getting the error as your data store entity has exceeded the maximum allowed column size which is 50. Make use of selection parameter to only use the columns which are required.
I have data sub set, which has already defined column that I need. How to take same data subset as entity in this field?
When I try to take data sub set as entity it throws error.
Unfortunately you can't pass a data subset as a source to exportDataStoreEntityToExcel.
Can we caste data subset to datastore entity? if yes then How?
AFAIK we can’t cast data subset to datastore entity. If you are doing some transformation then you could consider creating view and use it as data source.
I use my datastoreentity as entity. But I want some data to be formatted like if my id column in entity has value 123 but i want AUT00123 AS i have done on my dashboard using expression rule. So, how i format that data in exportdatastoreentitytoexcel.
why do want to cast a datasubset to an data store entity? This are different things with complete different functionality . What do you want to archive exactly?
dhavalp0001 said:I use my datastoreentity as entity.
What do you mean by that?The sense of "exportdatastoreentitytoexcel" is that you transfer your data store entity content into excel/CSV format. No rules involved to format.I would suggest: Try to store exactly the format you want to display in your excel