Hi,
Create a prompt with optional setting, so that even if your prompt variable is not filled with values the it gives data as per your query logic.
If your prompt is mandatory, then make sure that your prompt variable should hold some value always.
Lets say, go with some default values.
Best wishes, Vijay.