I’m sure this is a simple solution, but can someone advise how to determine if a search returned no data and then display a specific message.
So far I tried this, which doesn’t work.
currentcontroller.search()
if (someFieldName = "")
{
plugins.dialogs.showInfoDialog( "", "No search results found.", "OK")
}
I’ll usually pick up the found set in a variable and then branch off that result as follows:
currentcontroller.search()
// put the current foundset count into a variable
var v_recs = databaseManager.getFoundSetCount(forms.your_form.foundset)
//HANDLE THE BRANCHING BASED ON RECORDS BEING FOUND OR NOT
//
// if there are found records returned
if ( v_recs)
{
// do something based on the found set - or not !
}
else
// no records found
{
plugins.dialogs.showInfoDialog( "error", "No search results found", 'ok')
}