Business Types in LightSwitch Beta 2



Prologue:

In this article we shall discuss Business Types in LightSwitch Beta 2.

Business Type:

A Business Type is nothing but a type as like other Types [Int, String, and Date] in LightSwitch. Business Types are special types in LightSwitch that can make the developer more comfortable with coding.

There are three different types of Business Types available in LightSwitch.

BTLigSwitch1.gif

  1. Email Address
  2. Money
  3. Phone Number

These three are called Business Types. Let us see them one by one in detail.

Email Address:

The type Phone Number is used to specify a Phone Number. The value of this type will be stored as a string in the database. But while entering into the corresponding field, LightSwitch will validate the string entered into the Phone Number field of the application.

Properties:

BTLigSwitch2.gif

In General section, The Include in Unique Index and Is Computed options are not applicable for an Email address; those options are shown within a black rectangle.

The "Is Searchable" options indicate whether the item is searchable or not.

"Default Email Domain" text box is used to give the default value for the domain name for the email address [No: 1]. We do not need to enter the full email address; you need to only enter the user name part of the email address like jaganathan.xxxx from [email protected].

Then "Name" specifies the name of the Property [No: 2].

The "Description" is used to display the info about the property when you move the mouse over on the Email field [No: 3].

"Display name" is for displaying the field name in the form [No: 4]

"Display by Default" enables the field to be displayed in the screen with list of data [No: 5].

The "Is Required" option makes the field required [No: 6].

The "Maximum Length" options will let you allow saving the email address with the given length [No: 7].

Money:

The type Money is used to save the entered value as Money.

Properties:

BTLigSwitch3.gif

The "General" options are as like the Email Address so no need to explain once again.

"Decimal Places" is used to give the decimal places after the point.

"Is Formatted" is used to make the format. By default it will be enabled [No: 1].

"Is Grouped" is used to group the value by thousand [No: 2].|

"Currency Code" is used to specify the Code of Currency entered. By default USD will be there. [No: 3].

"Symbol Mode" specifies the Currency symbol No: 4].

Minimum and Maximum values are used to specify the value range.

Phone Number:

The type Phone Number is used to specify the Phone Number. The value of this type will be stored as a string in the database. But while entering into the corresponding field, LightSwitch will validate the string entered into the Phone Number field of the application.

BTLigSwitch4.gif

The Maximum Length is to restrict the length of the Phone number.

Phone Number Formats:

BTLigSwitch5.gif

The Phone Number format window has the formats for phone number entered. By default some of the formats will be available. We also can add our own formats [No: 1].

We can test the phone number whether the number entered is matching with the formats available [No: 2].
We have discussed in detail about the Business Types in LightSwitch Beta 2.

Summary:

In this article, we have seen the Business Types in LightSwitch Beta 2.

Thanks for spending your precious time here. Please provide your valuable feedbacks and comments, which enable me to give a better article the next time.

Please rate this Article.

Thanks.

Up Next
    Ebook Download
    View all
    Learn
    View all