'Operation Error' Message when trying to show COUNT

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

'Operation Error' Message when trying to show COUNT

Post by BenHayat »

Hi;
After a FIND statement in a process I'm trying to display the number of objects found. So I use:
DISPLAY MESSAGE AS_STRING(COUNT Customer)
And I get 'Operation Error' related to conversion of COUNT (integer) to String.

Anyone knows why I get this error?

Secondly, even when I don't get any results and I check for COUNT>0, this expression always returns true.
So How can I check if the FIND has returned a VALID Object to be VIEWED?

Thanks!
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: 'Operation Error' Message when trying to show COUNT

Post by tford »

After a FIND, use SEARCH_COUNT
Tom - V8.8 build 3137 - MySql / PostGres
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: 'Operation Error' Message when trying to show COUNT

Post by tford »

Syntax:

FIND ALL Customers
DISPLAY MESSAGE SEARCH_COUNT
Tom - V8.8 build 3137 - MySql / PostGres
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: 'Operation Error' Message when trying to show COUNT

Post by BenHayat »

tford wrote:After a FIND, use SEARCH_COUNT
Ah, you're 'D' man Tom. I had totally forgotten about this function, Since the COUNT seem to ignore the filter.
I needed to provide user a message, but more importantly stop the Process execution, if no object was found.
SEARCH_COUNT provided co
THANK YOU!!!
Post Reply