This extension consists of four custom LightSwitch business types:
a Password type (that hides the characters being typed, as well as validating several optional conditions)
a Link type (that allows you to enter/edit a URL, as well as launch a browser with it)
a Percent type (that stores the value as a decimal, but displays it as a percentage)
an ISBN type (that validates both ISBN-10 & ISBN-13 numbers)
Coming soon:
a UTC DateTime type (that stores dates/times in UTC format, but enters & displays them in local format)
an Hours type (displays a decimal value, followed by "hours")
a Minutes type (displays an integer value, followed by "minutes")
If you feel that you've benefited significantly from any of these business types, pleaseconsider making a donation to help cover the cost of developing them. I'd prefer to let people decide the extension is worth to them (saving time, impressing bosses/clients etc), rather than just setting a fixed price.
Donations will help to ensure that extensions can continue to be created for the benefit of the LightSwitch community.
Password business type:
can be selected for any string property
you can set:
the minimum length of the password (or 0 for no minimum length)
the mask character that gets displayed instead of the actual characters of the password
whether uppercase characters are required (A-Z)
whether lowercase characters are required (a-z)
whether special characters are required (!@#$%^&*)
whether numeric characters are required (0-9)
Link business type:
can be selected for any string property
can store any valid URL
displays a button, if a value is entered, that can launch a browser to navigate to the URL
Percent business type:
can be selected for any decimal property
the suggested scale is 7 (required to be able to store 3 digits, & 2 decimals places)
the suggested precision is 4 (to be able to store values of up to 2 decimal places)
ISBN business type:
(my thanks to Andrew Coates for providing the basic workings)
can be selected for any string property
you can choose to allow:
ISBN-10 (9 digits, followed by a check digit that is either a another digit, or an X)
ISBN-13 (13 digits, the last of which is a check digit)
The International Standard Book Number (ISBN) is a unique numeric commercial book identifier based upon the 9-digitStandard Book Numbering (SBN) code created by Gordon Foster in 1966.
The 10-digit ISBN format was developed by the International Organization for Standardization (ISO), and was published in 1970 as international standard ISO 2108. The 9-digit ISBN code was used in the United Kingdom until 1974.)
Since 1 January 2007, ISBNs have contained 13 digits, a format that is compatible with EAN-13 barcodes.
(example of EAN-13 barcode)
I hope to upload a sample project (with more detailed instructions on how to get the most out of each of the types) to MSDN samples, as soon as I can (time permitting, with writing the book). I'll include a link here when I manage to get it done.
Creating Extensions for LightSwitch 2011 (including Business Types) will be covered in our upcoming advanced LightSwitch book:
The book is due to be published in December 2011, & is available for pre-purchase now through Amazon.
If you do decide to download this extension, please remember to come back and write a quick review. Tell me whether you liked it or not, & why. Any suggestions, or ways to improve the controls are absolutely welcome.
Version History:
Version 1.0
added Percent type
added ISBN type
Version 1.1
fixed control images not showing for editors/viewers