NetTalk Central

Author Topic: message if empty  (Read 2005 times)

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
message if empty
« on: September 19, 2008, 02:14:28 AM »
Hi Bruce,

Is it possible to have 2 “message if empty” fields – 1 that will appear when a user opens a browse and a 2nd one when the user uses the locate functionality?

The problem I have is my std message I use when a user first enters a browse and it is empty is confusing if they use the locate and nothing appear.

Does that make sense?

Cheers,

 

Kevin

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11193
    • View Profile
Re: message if empty
« Reply #1 on: September 22, 2008, 07:49:48 AM »
Hi Kevin,

There is an embed point called
BeforeEmptyMessage
which you could use to add more conditional messages.

Usually, for a failed locator search you'll see 2 messages,
the first is from the Options tab and defaults to
'Enter a search term in the locator'

The second is on the general tab 'Message if Empty'

so between them you can put whatever you like. For example;

       If loc:LocatorValue <> ''
         packet = clip(packet) & '<tr><13,10><td>No records exist with your search text.</td></tr>'&CRLF
         do AddPacket
       End

Actually for reasons I can't quite explain the above _overwrites_ the first message, which is what you asked for. I'll have to follow it a bit closer to figure out why it overwrites it though.

Cheers
Bruce