Overview

Customer List is used to display the details of the various customers. Customer details include Name, Address, Phone number and Customer id.In the basic form details of 6 customers gets displayed. On increasing the number of customer, more forms will be repeated so as to include details of more customers.

Prerequisite(s)
  • SharePoint 2010 ,
Data Structure
SharePoint list is used as a DataSource for Customer list. SharePoint lists consist of rows and columns that store data in a similar fashion to a traditional relational database management system such as SQL Server. However, a benefit of lists is that SharePoint includes Web Parts that provide simple methods for managing the data. If the data was stored in a database, it would require custom user interface components to access it and manipulate it. Also, specialized skills are required to design, implement, and maintain a custom database. Another advantage of using lists is that custom workflow and event handlers can easily be registered to them. By default the following columns are available in sharePoint list • ID • Title • Modified • Created • Modified By • Created By • Attachments Apart from these default list columns , user can add more columns depends on requirement.

SharePoint List
List Name Column Name Data Type
CustomerList

Details of the customer are stored in this list.

CustomID Single line of text
Name Single line of text
FirstAddress Single line of text
SecondAdress Single line of text
Phone Single line of text
Design And Configuration
The order of creation of forms would be RepeaterForm and then the MasterForm. This is because RepeaterForm is configured in the external form used in MasterForm and this form is made to repeat in the MasterForm as required.

List Of Forms Used
Name Functionality
MasterForm Form Design Rule Design MasterForm contains an external form which is used to store the form to be repeated. It also contains a search control used to fill all details of the customer with the Customer List.
RepeaterForm Form Design RepeaterForm contains 6 Border controls. Each border control contains 5 labels for displaying 5 fields(Name,Address,City,Phone number,Customer Id).
MasterForm
MasterForm Form Design
01
Create a New Form in the CustomerList Folder and open it for editing.
02
Form Properties

Click anywhere on the form to get the form properties loaded in the Properties window. Change the Name of the form to MasterForm. Set the Width of the form to 1200 and Height to 1000.Tick Auto Height in order to adjust the height of the form with respect to the controls in the form.

03
Drag a label to the center of the form ,in first row and name it “CustomerList”.
04
Drag an External Form in the next row and name it “extCustomer”. Click on the external form. In the properties window displayed on the right select the Navigate URL by clicking the button shown below. From the pop screen select the form which has to be loaded in the external form. Here it is Repeater Form. Then click add.

External Form Properties
Navigation Form
05
Drag a search control and name it “SrcMaster”.
06
Name can be given to the controls by clicking on it and editing the “Properties window “displayed on the right side.
07
DataSource

For the Search Grid: Click on grid to get the Properties window for the search Grid. In the properties window select SharePoint from the Dropdown for DataSource.

08
New DataSource Configuration

Click on the grid to get the popup menu, choose DataSource tab and click on New DataSource Configuration.

09
List Selection

A New Popup window opens showing the Available lists in SharePoint. Choose CustomerList from the given set of lists and click Next.

10
Columns

Select the Result columns that are to be displayed on the grid.Click Next.

11
Condition

Enter the selection criteria as shown below. ID NotEquals “0”

12
Search items Window

Click Next until you reach the Search Result Configuration screen. The columns you had chosen would be shown there, You can modify the Column Header to give a user friendly name to the column. Click Finish.

MasterForm Rule Design
01
Rule Name : FormLoad | Trigger(s) : FormLoad
FormLoad Rule

Fills the search control with all data’s from customer list. Runs the Repeater rule.

02
Rule Name : Repeater | Trigger(s) :
Repeater

Checks if the total row count of search is more than 6 If total row count is more than 6, the Repeater form is made to repeat (total row count/6) times. Then the variables VarInitial, VarGrid, VarAdGrid and VarSetGrid are set to value 1. Runs the “SetFirstGridvalues “rule and “AdditionalGridvalues” rule.If total row count is less than 6, Set variable VarInitial and VarGrid value to 1 and Runs“SetFirstGridvalues “rule

03
Rule Name : SetFirstGrid values | Trigger(s) :
SetGridValues Rule

Checks if the VarGrid value is less than or equal to 6 and VarInitial is less than the total row count of search. If the condition is true name is set to label controls within the border through (VLabelName=lblHeader+VarGrid) rule. VLabelName is the variable which is used to temporarly store the label control name. Next using SetFormValue rule label controls within the border in Repeater form are assigned values form search control. (Name, address, etc.). Next the value of VarInitial variable and VarGrid variable is incremented by 1.Again run the same “SetFirstGridvalues” rule. This loop runs till all the fields in the basic Repeater form get filled with data’s from the search.

04
Rule Name : AdditionalGr idvalues | Trigger(s) :
Additional Grid Values Rule

Initially checks if the VarAdGrid value is less than or equal to (TotalRowCount/6). VarAdGrid variable is used to get the count of repeater forms. Next if the above condition is satisfied, label controls in the repeater form are given name and the values are assigned just as in the “SetFirstGridvalues” rule. VarSetGrid variable is used to set name for labels. Each time all the controls within the repeater form gets filled VarAdGrid value gets incremented by 1. This rule works as long as the VarAdGrid value is less than or equal to the number of required repeater forms.

RepeaterForm
RepeaterForm Form Design
01
Create a NewForm in the Customer List Folder and open it for editing.
02
Click anywhere on the form to get the form properties loaded in the Properties window. Change the Name of the form to RepeaterForm. Set the Width of the form to 1200 and Height to 1000.Tick Auto Height in order to adjust the height of the form with respect to the controls in the form.
03
BackGround Color

RepeaterForm contains 6 Border controls. Border and background color for each border can be set in the properties window.

04
Design

Set Each border control contains 5 labels for displaying 5 fields(Name,Address,City,Phone number,Customer Id)

Template Summary
The user is provided with the details of various customers. The customer details include, Name, Address, Phone number and Customer id. Data used in this example is fetched from sharepoint list, CustomerList .