Hi,
i have written a query filter which is working fine and displayed that in interface.
Now i need to download Excel which is also working fine but i need not have to include option: best
Suppose i have a drop down field which contains values: Good, better, best. But when i download Excel i should not see best option in Excel(instead it should be blank ) ..but the value in complete row should be downloaded.
applyWhen: {rule!AAP_isNotEmpty(ri!Status),remove(ri!Status,wherecontains("best",touniformstring(ri!Status)))}
Can someone help with what change i should do in code
Discussion posts and replies are publicly visible
To confirm, you DO want the row containing "best" to be exported to Excel, however the "best" field should be changed to a blank value "" in the export? If this is the case, typically it would be done on the database side by creating a view which removes this value, then export to Excel over the view - as we are limited as far as data manipulation between the DB and Excel during export.
I need to display data in grid(for which hv created a view) but while exporting in Excel i don't want "best" to be exported to Excel, however the "best" field should be changed to a blank value " " in the export..
The only way I could see to do this within Appian is with the deprecated "Export CDT to Excel" service - in which you can prepare the CDT (remove these values) prior to creating the Excel document. Otherwise, there isn't really a way to manipulate the data between the DB and your Excel file, so a view would be required on the database which handles this removal - then you can export from the view, vs the actual data store.
I guess i can call a rule and exclude the "best ". Something like :
a!queryFilter(
field:"Value",
operator:"=",
value:ri!Status,
but am not getting expected result so posted here.(bdw have used a!exportDataStoreEntityToCsv in interface)
A query filter such as that would be designed to remove the entire row(s) where Value = "best". As far as I understand the requirement, you still want the row returned that contains "best", however to replace "best" with a blank value "" - this would be done on the DB side with a view typically.
If you want to remove the row completely, you can do so with a!queryFilter(), however your syntax would need adjustments. Setting the Value = ri!Status would only return any rows that match a single status input, and your applyWhen there would be a single boolean true/false value (albeit unnecessary in this potential case) but you are providing a list of items (1 boolean and 1 list of text). To remove the entire rows that contain "best":
a!queryFilter( field: "Value", operator: "<>", value: "best" )
Also, please utilize the Insert -> Code functionality for easier reading of any included code snippets.
I cross checked with BA now he confirmed to remove entire Row..where it contains "best".. Thanks for help