Hi,
I have a read-only grid with a few columns, but there are quite a number of other columns from the other tables which need to be populated in excel.
I have a Data base view where I have joined all the required tables to get the data.
Can someone suggest the best way I can use the SQLServer view to get the data into excel?
Thanks in advance
Discussion posts and replies are publicly visible
Since you have data in view, you can create a Appian record for that view. This record comes with Appian out of the box export to excel functionality. You can show the data in Appian UI and allow them to export the data.
Right now I am loading the data with a few columns in a read-only grid using the expression rule. But, there were several columns from different tables which needs to join to the main table and eventually load into excel.
Also excel data needs some customization, so not sure whether Record Type with multiple tables joined will support customization.
Rao2022 said:But, there were several columns from different tables which needs to join to the main table
This is why users here are (correctly) suggesting you create a novel View for the purposes of your export. Controlling the joins and columns at view-level (using the DB as the driver) will make things a lot easier than trying to do such joins on the Appian side.
I got struck. Because using view I am unable to pass the parameters and filter the required data.
I have to filter the data based on user-selected parameters and save and export it to excel.
When I try to use,
a!exportDataStoreEntityToExcel() it allowing me to pass Entity, where I was unable to pass the parameters to filter the data.
I am not sure what you mean by unable to pass the parameters. a!exportDataStoreEntityToExcel() smart service contains a filter parameter which allow you to pass your filters using a!queryFilter() or a!queryLogicalExpression(). You can use this filter parameter to filter your data before exporting.
Great. Thank you so much for the info.
Is there a way we can customize the column names instead of showing Entity/CDT column names in excel?
using a!exportDataStoreEntityToExcel(). I have gone through all the parameters, but no luck.
Just I want to check whether I am missing anything here.
I am able to export the data and filter it out too.
But, I am unable to customize the excel column names.
Please, let me know if there is any solution to this.
Thanks.
Ben Dudley - i think i was giving you examples of stuff we used to be able to do (/ clean up) by switching back-and-forth between plaintext and GUI comment editors in a much-older version of the Community Forum's functionality.
Here's a live example of what can happen without that (the user chose a different format for a Rule name, then the rest of the comment was stuck in the same new format, since there seemingly isn't an intuitive way to break out of that alternate formatting. I've had this issue in the past too).
Rao2022 said:But, I am unable to customize the excel column names.
I think you can use the "alias" functionality in your QuerySelection column definitions to handle this - though I need to give the disclaimer that I haven't tried this myself (or at least not recently). The bummer here is that you'll need to define all columns manually, but it's not a bad idea to do this anyway.
I have used a!querySelection and a!queryColumn( field, alias, visible ), but alias is not flexible enough to fill my requirement.
I would like to place "Employee ID" in the column name "employeeid", but it is not allowing me to do.
Yes, I see that "Alias" doesn't accept spaces in the alias name. As a work-around can you use underscores instead of spaces, meaning your column heaer could be "Employee_ID" instead?
I proposed the same suggestion to my Business and waiting for the confirmation.