How to check if query returns no records

  • I am trying to display a notification that there are no results when a snowflake query does not return any records, but the notification is displaying on my app even when there are records returned

  • The name of my query is checkFranceInst and I have added to the success handler that when !checkFranceInst.data and the input to a text input is not empty then it should display the notification. What is the proper way to check whether the output of a snowflake query returns records or not? Using !checkFranceInst.data or checkFranceInst.data == "" both do not seem to work.

{{ Array.isArray(checkFranceInst.data) && checkFranceInst.data.length === 0 && instrumentIdentifierTextInput.value !== "" }}

@abalamur You can check the checkFranceInst.data.length in the "Only run when" condition. If it doesn't work as expected, add a notification in the failure handler.