We are trying to use the Export Data store entity to CSV smart service to generate a CSV which then gets SFTP'ed to an external location. We have a scenario where if there datastore entity doesnt return any rows, the CSV automatically generates a CSV with the header rows and the second row contains the text - "No data available due to empty data source, applied filter/selection criteria, or fields visibility". Is there any way we can have the CSV exported without this text in the second row? I dont find any options in the smart service setup, but if any of you have a non hacky way of working around this scenario it would be great.
Discussion posts and replies are publicly visible
Why not just query the DB before the export to check whether there is any data?
I have the exact same problem. Querying the DB before, would mean "duplicate" code for the query, and querying twice for the same data. I would like a better solution, ..... but it is what it is.
How is the process being triggered? Is it fine to disable the button/link used to generate this CSV based on a null check performed with minimized query in a local?
In my case is a Process Model, with unattended nodes .... I don't have any button/link to disable.
Hi,Marcelo Ricciardi May I know the amount of data you are trying to export from DB?
You can issue a lightweight query...set your pagingInfo's batchSize to 0 and set the fetchTotalCount to true, so in effect you'll only count the rows. You can then use this result to decide what to do next.
Hi. It's only a few records (hundreds at most), nothing to worry.