SOLVED

Improving Workbook Behavior

Silver Contributor

I notice that some of the workbooks display an error , such as Query could not be parsed at ')'.... click to retry. This occurs when an item has not yet been selected. What is the recommended way to handle null inputs more gracefully? It would be better to display something like "An Item must be selected", but I don't know how to do this.

TIA

3 Replies
best response confirmed by VI_Migration (Silver Contributor)
Solution

@Dean Gross If you go to the Advanced Settings tab of the step that will provide the parameter, look at the parameters being exported. When setting up a parameter that gets exported, you can setup a default value as well.  I would recommend setting that to a value that will cause no rows to be returned in your query but will not return an error.

 

For text values I typically set this to an empty string and for integers I use zero but it will all depend on the query where it the parameter will be used.

GetImage.png

Thanks, but I must be blind, I don't see any option to set the default value

@Dean Gross My bad.  You have to click on the parameter, Resource in your image, to see the field to enter a default value.  Each parameter can have a different default value.

1 best response

Accepted Solutions
best response confirmed by VI_Migration (Silver Contributor)
Solution

@Dean Gross If you go to the Advanced Settings tab of the step that will provide the parameter, look at the parameters being exported. When setting up a parameter that gets exported, you can setup a default value as well.  I would recommend setting that to a value that will cause no rows to be returned in your query but will not return an error.

 

For text values I typically set this to an empty string and for integers I use zero but it will all depend on the query where it the parameter will be used.

View solution in original post