Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Send different tRestResponse if no rows returned from database

Hi,

Hopefully this is a straight forward question.

 

I have a very simply job that take a rest request and queries a database to return a dataset and outputs the data as a rest response. I simply want to check to see if any rows have been returned from the database first and if not send a different rest response. Screen shot attached

 

I m a beginner here so any and information or examples would be much appreciated.

 

Thanks

 

Paul

Labels (3)
2 Replies
vapukov
Master II
Master II

Hi,

 

you could use RunIf triggers for any number of conditions and prepare different responses depending from condition:

- if count > 0

- if count = 0

 

for example below, it returns an error if account not found, tJavaFlex - put conditions into variables

0683p000009M2bv.png 

Anonymous
Not applicable
Author

Do you have examples of what you put in the tJavaFlex (CheckStatus) components?