StrataFrame Forum

Invalid Input in Browse Dialog

http://forum.strataframe.net/Topic16863.aspx

By Bill Cunnien - 6/5/2008

I have a sales order window with the standard, run-of-the-mill browse dialog.  It works fine.  The first search field in the search list is the Order ID.  This is an integer field.  The browse dialog presents a textbox control for the user to enter an Order ID.  If a user enters anything other than numeric characters (0-9), then the system generates two (2) identical exceptions: "Input string was not in a correct format."  This is quite frustrating for a number (pardon the pun) of reasons: 1)  The user gets slapped with a error handling event which shouldn't even be happening; 2)  I am being sent two trouble tickets for each single event that occurs.  3)  The application (not StrataFrame...I am positive that I am doing something wrong) looks like it cannot even handle simple data conversions at a very basic level.

Blink

What do I do to solve this problem?

Thanks,
Bill

By Bill Cunnien - 6/5/2008

Is the answer the "field mask?"

If so, what mask would I use?  I currently have a 5 digit Order ID.  If I make the mask #####, then as soon as the ID hits six digits, I will have to rollout and update.  What mask will work here?

Or, is there another way?

Thanks,
Bill

By Trent L. Taylor - 6/6/2008

Yes, you will want to use a mask.  That is why it is avaialble on a search field item.  You can refer to the standard .NET help docs on this one as it is just a standard SF Masked Text box which inherits from a System.Windows.Forms.MaskedTextBox.  You could also drop one on a form and play with the masked settings until you get what you want and then apply that to your search field.  But more than likely you will want to supply:

00000
 

as the mask.