Creating Customer Details List Using AppForms

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.

ReportTemplate1

DataStructure in SharePoint
Lists Used

List Name Functionality
CustomerList Details of the customer are stored in this list.

List Details
CustomerList

Column Name Data Type
CustomID Single line of text
Name Single line of text
FirstAddress Single line of text
SecondAddress Single line of text
Phone Single line of text

Creating and Configuring the Forms
List of Forms used

Form Name Functionality
MasterForm · 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 · RepeaterForm contains 6 Border controls.

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

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. The best approach would be to complete the form design of all forms before starting on the rules.

Form Design- MasterForm

  • Create a New Form in the CustomerList Folder and open it for editing.
  • 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.

ReportTemplate2

  • Drag a label to the center of the form, in first row and name it CustomerList
  • 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.

ReportTemplate3

  • From the pop screen select the form which has to be loaded in the external form. Here it is Repeater Form.Then click add.

ReportTemplate4

  • Drag a search control and name it “SrcMaster”.
  • Name can be given to the controls by clicking on it and editing theProperties window “displayed on the right side.

Data Source Setting in MasterForm
For the grid:

  • Click on grid to get the Properties window for the search Grid. In the properties window select SharePoint from the Drop down for DataSource.

ReportTemplate5

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

ReportTemplate6

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

ReportTemplate7

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

ReportTemplate8

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

ReportTemplate9

  • 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.

ReportTemplate10

  • Click Finish

Form Design-Repeater Form

  • Create a New Form in the Customer List Folder and open it for editing.
  • 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.
  • RepeaterForm contains 6 Border controls. Border and background color for each border can be set in the properties window.

ReportTemplate11

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

 ReportTemplate12


Adding Rules to the form
Rules of MasterForm are given below.

Sl.no Rule Name Trigger Functionality
1. FormLoad FormLoad Fills the search control with all data from customer list.

Runs the Repeater rule.

2. Repeater No Trigger 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

3. SetFirstGridvalues No Trigger 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 temporarily 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 from the search.

4. AdditionalGridvalues No Trigger 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.

Rule: FormLoad

ReportTemplate13


Rule: Repeater

ReportTemplate14
Rule:
SetFirstGridvalues

ReportTemplate15
Rule: AdditionalGridvalues

ReportTemplate16
How to use the list template


Uploading List Templates

List templates that were downloaded to a file on the file system can be uploaded to the list template gallery. To perform the following steps, you must have Read permission to the folder or network share that contains the list template file. Before uploading the list template, it should be added to the list template gallery of the root site. Following steps will explain about how to add the list template in to the list template gallery.

  • On the Site Actions menu, click ‘Site Settings’.

img1

  • In the Galleries column, click List templates. This option appears only to users who have the Manage Lists permission. Site owners have this permission by default.

img2

  • The List Template Gallery page appears. Select Files and click ‘Upload Document’.

img3

  • Either type the path or file name (including the file extension) of the list template that you want to upload, or click ‘Browse’ to select the file. Choose whether to overwrite the existing files. By default, the ‘Overwrite existing files’ check box is selected.

img4

  • Click ‘OK’ to choose the file.
  • A pop-up appears to edit the name, title and description of the list template.

img5

  • Click ‘Save’ to include the list template into the list template gallery.
  • Once the list template is added to the list template gallery, we can create a new list using the list template uploaded. Following steps explains how to create a new list using list template.
  • From the Site Actions drop-down menu in the top right, select ‘Site Contents’ of your site.

img6

  • Click ‘add an app’

img7

  • Find the list template that was uploaded.

img8

  • Click on the list template to use for this site

img9

  • Pick a name for the new list. We can add this app multiple times with a unique name.

img10

  • Click on the ‘Create’ button. A list has now been created using the list template.
  • Similarly create all other lists using list template.

Import Tenant

Following steps will explain about tenant import.

  • Open the ‘Backup and Restore’ option in AppForms in the destination site and click on the ‘import site’ tab.

CustomerList_Tenant_img1

  • Select the backup file we had saved from the source site.
  • Once the file is selected, click on the load button.

CustomerList_Tenant_img2

  • This will show you the different sites that were exported from the source site. If there are more than one site content saved, then you can map each site in backup file to different sites in the current site. Select the required site content that needs to be restored and select the destination site in the current site as shown below. Once we are done with the backup mapping, click on the next button to proceed with the import.

CustomerList_Tenant_img3

  • Now we will have to remap the sites we had used in the source website to the actual site in the target site. The drop down will show you the sites/sub sites to help you with the data source mapping. Click ‘Next’ to continue.

CustomerList_Tenant_img4

  • Click ‘Import’ to continue.
  • This will import all the site content we had backed up from the source site and we are ready to work with the forms in the current site.

CustomerList_Tenant_img5


 Create a WebPart Page

Forms can be embedded on any SharePoint page by using the ClaySys AppForms Web Part, to create a webpart page, follow these steps:

  • Click on Site Settings Wheel in the upper right corner of your site and then select “Site Contents Page”.

CustomerList_Webpart_img1

  • Select “Site Pages” or simply pages library on Site Contents Page.

CustomerList_Webpart_img2

  • Click on “New Wiki Page” to add new site page.

CustomerList_Webpart_img3

  • Give the New page name into the pop-up window and click ‘Create’ to add new page.

CustomerList_Webpart_img4

  • To add a new web part, click on the ‘Insert’ tab and then click on the ‘WebPart’ button. Then select ClaySys -> ClaySys HTML WebPart.

CustomerList_Webpart_img5

  • Click ‘Add’ button to add the WebPart.
  • Click on the ‘edit the Webpart’ link to edit the page.

CustomerList_Webpart_img6

  • A new pop-up window appears and here we can configure the ClaySys AppForms by clicking on the ‘Configure’ button.

CustomerList_Webpart_img7

  • Pop-up appears with listed published forms. We can select the appropriate form by click on the form and add the form by clicking on the ‘Select’ button.

CustomerList_Webpart_img8

  • Once the configuration is finished, click on the ‘Apply’ button to see the changes. Click ‘OK’ to continue.

CustomerList_Webpart_img10

CustomerList_Webpart_img9

  • Click ‘Save’ button to save the changes.

CustomerList_Webpart_img11

  • Below figure shows the form after WebPart configuration.

CustomerList_Webpart_img12

Creating Web Mail Using AppForms

Design Document for WebMail

Introduction
Webmail is web-based email accounts. These are usually free email accounts that are operated from a website. Webmail allows the users to access their emails as long as they have access to an Internet connection and a web browser. The purpose of this document is to be a reference for any person wishing to implement the Webmail Template using the ClaySys AppForms or any person interested in how to configure the AppForms to create a web mail Template. Here is an image what the webmail template dashboard we are going to be designing looks like.
Image
On the webmail Dashboard following functionalities are being added:

  • Inbox: Allows you to view the received mails in inbox.
  • Send Items: Allows you to view the mails you have sent.
  • Drafts: Allows you to view the mails you have saved as draft.
  • Compose Mail: Allows you to write a mail. On clicking the following icon we can compose a mail: Here is the image of what the compose mail screen looks like:

Image
On compose mail screen following functionality is added:

  • Address Book: On clicking ‘AddressBook’ button following popup will appear in which you can select the recipient address and click ‘OK ‘ button .The selected recipient address will be added to the ‘To’ address textbox in the compose mail screen.

Image

  • Send Button: It is used for sending mails.

After filling the mail body, subject and ‘To’ Address you can click on the Send Button for sending mail.
image

  • Pre-Requisite: SMTP should be configured with the particular SharePoint version for sending the mail.
  • SaveAsDraft: This button allows you to save a mail as draft.

Image
On ‘AddressBook’ pop-up following functionality is added:

  • AddNew: On clicking ‘AddNew’ button following popup will appear in which you can Add a new mail ID to your AddressBook.

Image
Creating the Form

Steps to create a new form
Folders are used to store and organize forms that have a logical association or relationship. To create a new form click ‘New Folder’ button on the toolbar of the designer.

  • On clicking the New Folder option, it will create a new folder and the name will be in the edit mode. You can type in the new name for the folder.

Image

  • Then click on the ‘New Form’ link on the toolbar. Give an appropriate name for the form. Click ‘Save Form’ to save the form.

Image

  • You can drag and drop controls format the styles easily. ‘Check-In Form’ to save the changes and publish to get the completed form for the end user to use. A form must be checked-out to make modifications while all aspects of the form can be examined while checked-in.

Image
Following are the controls we used here in designing the above Webmail dashboard form:

  • External Form Control
  • TreeView
  • Combo Box
  • Image Buttons

Similarly we can create all other forms required for the webmail template. Following are the forms required:

  • Webmail dashboard (as the image shown above).
  • Compose mail (Screen where user can write a mail).

Image

  • frmMails (This form contains a search which shows all the mail items as a list).

Image

  • MailView (This form is designed to show each mail details using label controls).

Image

  • Address ( This form is the pop up shown when we click on the Address button in webmail dashboard).

Image

  • frmAddNewAdresses (This form is to add new mail ID to the Address book).

Image
Steps for Configuring search Control
Here are the steps for configuring Search control referring to the form ‘frmMails’.

  • From the ‘Toolbox’ at right side of the window , drag and drop the search control, which comes under the ‘Data’. Enter the name for Search control .

Image

  • On Clicking the search control , a pop up appears click on ‘DataSource’.

Image

  • Click on ‘New DataSource Configuration’.

Image

  •  Select the List from the available list and click ‘Next’ button as shown in the image.

Image

  • Select the Result columns Which you want to show in the search and click ‘Next’ button.

Image

  • Give the condition for the Selection of values in the search as shown in the image. And click ‘Next’ button.

Image

  • Here you can specify the column header, width of each column , the order in which each column should appear in search and other similar settings of columns. And click ‘Finish’ button.

Image
Steps for External Data sources Configuration
Here are the steps for configuring External Data source referring to the form ‘frmAddNewAdresses’.

  • Click on ‘DataSource’ and then click on ‘Create DataSource’ as shown in the image.

Image

  • Enter the name for the DataSource ,Select the ‘DataSource Type’ and click ‘OK’ button. As shown in the image.

Image

  •  Select the List from the available list and click ‘Next’ button.

Image

  • Select the command as ‘Insert’ or ‘select’ as your requirement and click ‘Add’ button.

Image

  • Enter the Command Title and enter the mapping values as shown in the image and click ‘OK’ button.

Image

  • Click ‘Finish’ button . Thus a new external data source has been created.

Image
Rules Configuration
Rules in each form are being explained below. Initially to create a rule you need to click on ‘Create Rule’ and enter a name for the new rule.
Image
Also you can add trigger to the rule by selecting the triggers as shown in the image below.
Image
Rules in “WebmailDashboard” Form:

Rule No.

Rule Name

 Trigger

  Functionality

1

ComboMail

imgbtnWebMail

The visibility of combobox is set to true and “[Select]” is removed from the combobox.

2

Visiblility

cmbWebMail

After Selecting a value in the combobox , it should not be seen so on cmbWebMail trigger  the visibility of combobox is set to false.

3

On_TreeView

hdnSelectedItem

On clicking each items on the TreeView , corresponding mails should be loaded in the External form. The external form used is “extMail”. While clicking on the TreeView the hidden control “hdnSelectedItem” will get the selected item of the tree and using ‘setform’ rule this value is passed  to the hidden control “hdnStatus” in the form “frmMails” in the external form.

4

On_ComposeBtn

imgbtnComposeMail

On clicking the image button for compose mail, the form “ComposeMail” is loaded in the external form.

5

ViewMail

hdnMailViewID

On getting values in the hidden control “hdnMailViewID” we use the rule to load the form “MailView” in the external form and pass the value of hidden control “hdnID” to the hidden control “hdnMailViewID” in the form “MailView”.

6

On_Formload

FormLoad

On formload external form is loaded with the form “frmMails”. And temporary variable ‘vTemp’ is set to zero.

7

SelectedItem_Value

tvWebMail

On clicking TreeView control its selected item value is passed to the hidden control “hdnSelectedItem”.

8

Print

imgbtnPrint

To print the page on clicking the image button of print.

9

SetMailToValue

hdnMailTo

Rule to pass the value from the current form control “hdnMailTo” to the control “txtTo” in “MailView” which is loaded in the external form.

Rule 1: ComboMail
Image
Rule 2: Visiblility
Image
Rule 3: On_TreeView
Image
Rule 4: On_ComposeBtn
Image
Rule 5: ViewMail
Image
Rule 6: On_Formload
Image
Rule 7: SelectedItem_Value
Image
Rule 8: Print
Image
Rule 9: SetMailToValue
Image

  • Rules in “Address” Form:

Rule No.

Rule Name

 Trigger

  Functionality

1

On_Formload

FormLoad

FillDataSync(srcAddressBook) is the rule to fill the search control named srcAddressBook.

2

On_OkBtn

btnOK

RunRule(On_srcSddressBook) and value is returned to hidden control “hdnMailTo”. The function to trim “,” at the end of “hdnMailTo” is written. Then  value of “hdnMailTo” is passed to the hidden control “hdnMailTo” in the “WebmailDashboard” form. And this popup is closed.

3

On_CancelBtn

btnCancel

On clicking Cancel button the tab is closed.

4

On_srcSddressBook

RunRule

Loop is written to get the MailID from each row of the search to hidden control “hdnMailTo”. The total row count of the search is initially stored in to the variable “VRowCount”. This rule is called from the rule ”On_OkBtn”.


Rule 1: OnFormLoad

Image
Rule 2: On_OkBtn
Image
Rule 3: On_CancelBtn
Image
Rule 4: On_srcSddressBook
Image
Image
Above two images are the part of a single rule named ” On_srcSddressBook”. The sub rule named “EachRow” is shown in second image.

Rules in “frmAddNewAddress” Form:

Rule No.

Rule Name

 Trigger

  Functionality

1

OnSubmitBtn

btnSubmit

Rule for Executing the “Insert” command. And if  you want to maintain the fileUpload name you can store it in the hidden control “hdnFupName”.

2

On_ExecuteComplete

Execute Complete

Only after the successfull insertion of mail ID in the list , message box is to be shown and Popup window is to be closed.

Rule 1: OnSubmitBtn
Image
Rule 2: On_ExecuteComplete
Image
Rules in “frmMails” Form:

Rule No.

Rule Name

 Trigger

  Functionality

1

On_Formload

FormLoad

The value of  hidden control “hdnStatus” is set to Recieved.

2

FillSearch

hdnStatus

On getting value in the “hdnStatus” the search is to be filled based  to the value in the “hdnStatus”.

3

ValueSet

hdnMailID

The value in the “hdnMailID” is passed to “hdnMailViewID” in the form “WebmailDashboard”.

Rule 1: On_Formload
Image

Rule 2: FillSearch
Image

Rule 3: ValueSet

ImageRules in “MailView” Form:

Rule No.

Rule Name

 Trigger

  Functionality

1

Select

hdnID

Execute the “select” command from list and shows the details of a mail.

2

Send

btnSendMail

Functionality for sending mail

3

SaveAsDraft

btnSave

Functionality for saving mail as draft.

4

On_hdnStatus

hdnStatus

Checks whether the mail is a draft . if it is then only subform containing the send button etc. Should be visible.

Rule 1: Select
Image
Rule 2: Send
Image
Rule 3: SaveAsDraft
Image
Rule 4: On_hdnStatus

Image

  • Rules in “ComposeMail” Form:

Rule No.

Rule Name

 Trigger

  Functionality

1

setMailTo

hdnCmpMailTo

Setting the value of hidden control “hdnCmpMailTo” to the textbox “txtTo”. This include the mail ID that we have selected from the Address book.

2

SendMail

btnSendMail

Functionality for sending mail

3

SaveAsDraft

btnSave

Functionality for saving mail as draft.

Rule 1: setMailTo
Image
Rule 2: SendMail
Image
Rule 3: SaveAsDraft
Image

How To Use This Template

Steps To Upload list Template

  • on the right corner of the window click on settings.

ImageImage

  • Click on ‘Site settings’ from the drop down menu , then we can see the following window appearing.

Image

  • Click on ‘List template’ option as shown in the above image. And we can see ‘List Template Gallery’. Click on ‘Files’ at the leftmost corner as shown in the following image.

Image

  • Click on ‘Upload Document’.

Image

  • Following Pop up will appear where we can browse a list template stored in our computer and click ‘OK’ button.

Image

  • Following Pop up will appear where we can change the name of the List Template and enter the Description as required and click on ‘Save button’.

Image

  • Now go to the Required sub site, click ‘Settings’ on the right corner (as done in step ‘a’). Then click on ‘Site Contents’. Following Screen appears in which click on ‘add an app’.

Image

  • Following screen will appear where we can type the uploaded template name and click search.

Image

  • Then you can see the Uploaded template ,Click on it .

Image

  • On clicking it ,we will get following Pop up . Enter the name for the List template and click ‘Create’ button.

Image
Steps to Upload Tenant

  • Click on the “Back Up and Restore” on the left side of the AppForm Designer window. Then click on ‘Import Site’ -> Browse the Tenant and click Load.

Image

  • Select the ‘Zip File’ and ‘Site Name’ and click ‘Next’.

Image

  • Click ‘Next’ button.

Image

  • Click on ’Import’ button . Once it done you are free to work with the form in the new site.

Image
Step to Create a Web Part Page

Here are the steps for configuring External Data source referring to the form ‘frmAddNewAdresses’.

  • Click on Site Settings Wheel in the upper right corner of your site and then select “Site Contents Page”.

Image

  • select site pages or simply pages library on site content page.

Image

  • Click on “New Wiki Page” to add new site page.

Image

  •  Give the New page name into the pop-up window and click ‘Create’ to add new page.

Image

  • To add a new web part, click on the ‘Insert’ tab and then click on the ‘Web Part’ button. Then select ClaySys -> ClaySys HTML Web Part.

Image

  • Click ‘Add’ button to add the Web Part. Click on the ‘edit the Web part’ link to edit the page.

Image

  • A new pop-up window appears and here we can configure the ClaySys AppForms by clicking on the ‘Configure’ button.

Image

  •  Pop-up appears with listed published forms. We can select the appropriate form by click on the form and add the form by clicking on the ‘Select’ button.

Image

  • Once the configuration is finished, click on the ‘Apply’ button to see the changes. Click ‘OK’ button.

Image

  • Now you can see the web part page you just created, as shown in the following image. Click ‘Save’ button to save the changes.

Image

Metadata Driven Architecture For Application Development

The metadata-driven development model for building Enterprise Applications is an architecture that primarily enables the creation of ‘Futureproof’ business applications. What makes this possible is the approach where all the design elements of a web application, including the form interface, fields, tables, grids, tabs, controls, layout, business rules etc, are defined in metadata like XML or JSON. You then have a runtime rendering engine or application browser engine that consumes this metadata and renders the applications User Interface dynamically.

This approach or architecture for building enterprise web applications is very mature today, and cloud based application hosting vendors likes SalesForce.com have their cloud architecture based on such metadata driven models, which you can review here. Platform companies like Microsoft have also been proposing such Metadata driven architecture patterns for developing Enterprise Scale web applications for a long time now, which you are review in this Microsoft article.

The ClaySys AppForms development platform was envisioned and designed from its very inception, to be based on a metadata driven architecture. The schematic below highlights the key benefits when leveraging the metadata driven model for creating an application development platform like ClaySys AppForms.

ClaySys

The key advantages of this architecture as highlighted above are explained in more detail below;

No Compilation Required

In this approach when you design an application artifact like a Form, everything you layout in the designer is generating its related metadata, and at the end of a design cycle, there is a metadata file in XML or JSON that is generated, which contains the definition of everything designed. So by no compilation, what we mean here is that any functionality designed can be immediately previewed and/or published to make it available to the end users or testers.

Changes can be reviewed immediately

Since the design process in interactive and WYSIWYG, every action or change by the designer can be immediately previewed or tested, without needing any compilation or deployment process. And the review can also be done before saving or publishing the changes, which makes it an interactive development environment, for designers to create functionality in an iterative manner.

Version control with easy rollback

Since every published artifact for the web application being designed in a metadata file, every time any changes are made, the historic versions of the metadata files are maintained. This enables easy version control and rollback when necessary. What this mean is that every time a change is made to a Form or any artifact of an application, the prior version that existed is archived. So as and when you need to rollback to the prior version, it can be achieved through a single click of a button.

Define granular permissions and access control

Since the ClaySys AppForms platform was designed to create Enterprise scale applications, the functionality for defining User Access permissions and setting access controls to granular elements of an application are supported. You can set access control to the individual screens or forms of an application, with Create/Read/Update/Delete (CRUD) permissions set at the form or screen level, or you can go deeper and set permissions to the individual form elements itself, like fields, buttons or other controls.

Any datasource can be added

The ClaySys AppForms product is designed to enable creating the entire front end of a web application, including its forms, business logic or rules within forms or across forms, and the connection of the individual forms to their datasources. A Datasource is simply the end point from where the forms are reading the data or writing back the data. Today, with the metadata architecture, we support the front end forms connecting to and working with SQL Server, Oracle, Web Services, RESTful Services, SQL Azure, Azure Table, SharePoint, Office365 amongst others. So you can literally create a single form, and have it connect to multiple datasources to meet your functional requirement.

Futureproofing

What makes the metadata driven model create future proof applications is the basis for the core benefits of this architecture. Typically a metadata driven application platform like ClaySys AppForms has the Designer that generates the XML or JSON metadata, and then there is a Rendering Engine or Application Browser that consumes the metadata and renders the User Interface and working application. As the Designer and Rendering Engine are upgraded to newer versions, backward compatibility is maintained with the metadata supported by prior versions, so all future versions of such products can continue to render functionality created by prior versions of the product. A good similar example is Microsoft Excel, where each configured Excel spreadsheet is maintained as an OpenXML file, and the Excel runtime renders the OpenXML into the functioning Excel spreadsheet. You would have noticed that every time you upgrade Excel to its latest version, or old Excel files created in historic versions of Excel simply continue to work.

No Source-code dependencies

In the traditional application development model, for example when developing in C# or VB, in Microsoft Visual Studio, you first code your application, and then Visual Studio compiles your source code into the executable. Your sourcecode also has a dependency on the .Net Framework that it was written against, which means that you maintain such an application, you have to ensure that you are always working with the most current sourcecode, and every time Microsoft upgrades the .Net framework, you have to go and rewire your code to work with the latest .Net Framework. In the metadata driven world, the metadata created in the actual input to the rendering engine, so there are no abstracted source code or intermediary layers.

Approximately 6x to 8x faster to create applications

The benefit of the metadata driven architecture is that a lot of the deep internal plumbing that makes a web application work are abstracted away by the Designer Tool. The Designer uses a Declarative approach towards enabling configuration of the application being created. This approach significantly improves the productivity of the application developer or creator, as they can create functionality 6x to 8x faster than it would have taken them to create the same functionality in the traditional coding paradigm using C# for example.

Multi-tenancy offers consolidation of apps on a single shared infrastructure

The metadata driven model for building applications allows an Enterprise to deploy multiple applications on the same hosting infrastructure easily. Since multiple applications are sharing the same Designer and Rendering Engine, the only difference is the metadata that is created unique for each application. So a common server farm and database layer can be used to deploy a metadata driven platform like ClaySys AppForms, after which multiple individual and independent web applications can be deployed on the same shared infrastructure.

Lower skills required

In the metadata driven application development model, the designer is working at a higher level of abstraction and does not need to understand low level programming language syntax, semantics or patterns, which makes it significantly less complex to understand. Therefore users will non-technical or non-programmer skills can work on creating functionality or applications using metadata driven platforms like ClaySys AppForms.

So in conclusion, if a metadata driven platform meets the functional capabilities of the envisioned business application, it is clearly the way to go, to create a business application that is required to exist for the long term.

Employee Management Using SharePoint List

Overview

This document provides the details for creating forms through ClaySys Appforms to manage employee details stored in a SharePoint List. Employee Details are displayed in a grid format using Search grid as well as in detailed format using form DataSource. Clicking on Select button in the grid displays the details of the employee below the grid. Clicking on Edit button in the grid opens a popup window where all Employee Details can be edited and saved back to the list. A new employee can be added using the same form and inserted into the list. Buttons are provided to filter the grid based on Job Status – Salaried/Commission/Contract.

Employee2

Data Structure in SharePoint
Lists Used

List Name Functionality
ClsysTemplt_Employee Stores Employee Details
ClsysTemp_JobType Stores Job Type – Salaried/Contract etc. Related to Employee Details table through JobTypeId

List Details
Employees List

Column Name Data Type
EmployeeId Number
FirstName Single line of text
LastName Single line of text
Designation Single line of text
BirthDate Date and Time
HireDate Single line of text
Address Single line of text
Phone Single line of text
EmailId Single line of text
JobTypeId Single line of text
Attachments From Default Columns of SharePoint List

JobType

Column Name Data Type
JobTypeId Number
JobType Single line of text

Creating and Configuring the Forms

List of Forms used

Form Name Functionality
MainForm Has set of buttons for filtering the grid and other data operations. Has an ExternalForm Control which loads Employee Details form
EmployeeDetails Shows List of all employees in a grid format with details of each employee listed below the grid.
EditEmployee Used for updating Employee Details or Adding New Employee Details

The order of creation of forms would be EditEmployee, EmployeeDetails, and then MainForm. This is because some of the features like edit click on the search grid of EmployeeDetails is configured to open EditEmployee form and New button click from Mainform also opens the EditEmployee form. The best approach would be to complete the form design of all forms before starting on the rules.

Form Design – Main Form

  1. Create a New Form in the Employees Folder and open it for editing.
  2. Click anywhere on the form to get the form properties loaded in the Properties window. Change the Name of the form to Main Form. Set the Width of the form to 1200 and Height to 1000. EmployeeListImage2
  3. From the Standard tab of the toolbox on the left drag an Image control and place it in the first row, first column. Set the control name as ImgLogo and set the width to 210 and height to 69. EmployeeListImage3
  4. In the columns adjacent to the Image buttons, drag and drop 1 buttons from the Toolbox. Set the control name to btnAddnewemployee.
  5. Click the cell right beneath New and in the properties of Selected Cell Style set Column Span to 12.  EmployeeListImage5
  6. From Toolbox-> Group, choose External Form and drop it into the above cell.
  7. Set the properties of the External Form as shown here.  Employee7
  8. To set the NavigateURL, click on the ellipsis to open the dialogbox given below.  Unselect the Expand All checkbox so that only the folder names are displayed. Choose the EmployeeDetails form and click on the Add Button. Click OK.   Employee8
  9. From ToolBox -> Group, select SubForm and drop it in the cell below Image Logo. Set the properties as given below.   Employee9
  10. Onto the subform, add a label for Job Status and four buttons for filtering the Employee Details grid based on the job status. Set the properties as shown below.   Employee10
  11. Add a subform in the cell adjacent to the last button in the top row and set its Visibility to false by unchecking the checkbox Visible in the Properties window.  Add a textbox to the subform and name it hdntxtJobTypeIdMain. The value of this will be used for filtering the grid in the EmployeeDetails form.   Employee11

Rules for MainForm

Rule No Rule Name Trigger Functionality
1 Load_AllJobs btnAllJobs Triggers  the change event for the hidden textbox hdntxtJobTypeIdMain, which sets an external form value in EmployeeDetails Form to filter the data in the grid based on Job Type.
2 Load_SalariedJobs btnSalariedJobs Same as above.
3 Load_CommissionJobs btnCommissionJobs Same as above.
4 Load_ContractJobs btnContractJobs Same as above.
5 Set_ExternalFormJobTypeId hdntxtJobTypeIdMain Set the Value of the control hdntxtJobTypeId in EmployeeDetails form to the hidden text form value in the Main form which was set in the above rules.
6 Call_NewEmployeeForm btnNew Load the form EditEmployee to add new employee details.

 

Set value of hdntxtEmpIdDetails in EditEmployee form to 0.

Rule 1: Load_AllJobs
employee12

Rule 2: Load_SalariedJobs
Employee13

Rule 3: Load_CommisionJobs
employee14

Rule4: Load_ContractJobs
employee15

Rule  5: Set_ExternalFormJobTypeId
employee19

Rule 6: Call_NewEmployeeForm
Employee17

Form Design – EmployeeDetails

  1. Create a NewForm in the folder containing the Main Form. Open the form for edit and set the form properties as given below.   EmployeeListImage12
  2. Click on the first cell and set Column Span to 12. Add a Search grid from Toolbox ->Data to this cell and set the properties as given below.  EmployeeListImage13

Click on the cell right beneath the datagrid and set column span to 12. We will copy the first grid here once it is fully configured. Two grids are used because for SharePoint data the filtering of data in the grid will throw an error when the form is loaded first without a value for the search criteria. So the first grid- used during form load- shows all data; and the second grid is shown when data is to be filtered  based on button click from MainForm.

Displaying Employee Details for the row selected in the grid.

  1. Set the Column span of the cell below second grid to 4 and add a label called lblEmpName. Similarly Add a label beneath it and name it lblDesignation.
  2. For the cell beneath this, set the column span to 3 and add an Image control from Toolbox->Standard. St the properties as shown below.   EmployeeListImage14
  3. Add a subform to the cell to the right of the image control and add label controls as shown below. Name the subform as subfrmDetails, and name the labels for Address, Phone and Email appropriately.   EmployeeListImage15
  4. In the cell to the right of this add another subform to hold the hidden controls used in the form. Name this as subfrmHiddenCtrls. Add six textboxes and name them as given here.   EmployeeListImage16

Configuring the Datasources for all the controls.

  1. Click on grid1 to get the Properties window for the search Grid. In the properties window select SharePoint from the Dropdown for DataSourceEmployeeListImage17
  2. Click on the grid to get the popup menu, choose DataSources tab and click on New DataSource Configuration.

EmployeeListImage18

  1. A new Popup window opens showing the Available lists in SharePoint. Choose your Employee table from the list and click Next.   EmployeeListImage19
  2. Select the Result columns that are to be displayed on the grid, make sure you include the EmployeeId column. Click Next.   EmployeeListImage20
  3. Click Next until you reach the Search Result Configuration screen. The columns you had chosen would be shown there,
    a.You can modify the Column Header to give a user friendly name to the column.
    b.If EmployeeID column is to be hidden, click on the checkbox to Hide it.
    c.For Date columns change the default Type chosen as DateTime to Date if only date is to be displayed.   EmployeeListImage21
  4. We need to create two composite columns now, to show the edit and select buttons for each row.  In the Add Composite Column section give Column Header as Edit, Result Column as Composite Column and click on the Add Column button. Repeat the same for creating Select button.  EmployeeListImage22
  5. To configure the Action for new composite column, click on the Configure Column button.  EmployeeListImage23
  6. In Configure Column Links, choose Link Button for Column Type.  You can choose a Link Button image from existing images.  EmployeeListImage24
  7. Choosing Link Button opens another section below, where you can choose the form to navigate to when the button is clicked.

a. Enter the folder name where the form is present and search to get that folder alone.
b. Choose the form to be opened, in this case the EditEmployee form. Choosing this form makes this available in the Form Name drop down below.   EmployeeListImage25
c. Choose the field to be mapped in the EditEmployee form from the Field Name drop down. In this case txtEmpId.
d. In the Result Field choose EmployeeId.
e. Click the + button to add this form to the box below.
f. Click Ok.   EmployeeListImage26

8. In a similar Manner Configure the LinkButton for Select Column, but since we do not navigate to another form;
a. Choose the same form EmployeeDetails from the list of forms. EmployeeListImage27
b. Choose the hidden Control hdntxtEmpId from the Fields dropdown.
c. Choose EmployeeId for the Result field.
d. Add the form with the + button.
e. Click OkEmployeeListImage28

9. Change the Column display Order to show Edit and Select buttons at the start of the row by setting the order as 2 and 3 for Edit and Select buttons respectively. Change the order for columns starting from FirstName onwards to be displayed after the Link buttons.   EmployeeListImage29
10.Click on Finish button, to come out of the Configure Search Grid option.
11.Preview the form to make sure the link buttons are configured and data is getting loaded into the grid.   EmployeeListImage30

Configuring the second Search Grid

  1. Right click on the first grid, Copy it and paste into the cell right underneath it, the column span of which was set to 12 earlier.   EmployeeListImage31
  2. In the properties window, change the second Search grid name to SrchEmpByJobType, since this grid will show the employee list filtered based on the Job Type.
  3. Click on the Grid choose the DataSources tab and you’ll notice that it shows Edit DataSource Configuration, since the datasource configuration of the first grid has been copied here.   EmployeeListImage32

Setting the DataSource for the controls displaying Employee Details.

  1. In the DataSources tab of the form, click on Create DataSource.  EmployeeListImage33 
  2. Give DataSource Name as dsEmpDetails, choose SharePoint as the DataSource Type and click Ok.  EmployeeListImage34
  3. Choose the Employee table from the list and click Next.  EmployeeListImage35
  4. In Commands dropdown, default will be Select, click on Add button.  EmployeeListImage36
  5. In the query criteria mapping choose EmployeeId Equals hdntxtEmpId.   EmployeeListImage37
  6. In Query Value Mapping section, we need to map the result fields to the respective controls on the form. Since we need to Display FirstName and LastName together, map these to two hidden textboxes and then in FormLoad and hdntxtEmpId change add rule to assign the value of lblEmpName as hdntxtFirstName + hdntxtLastName. EmployeeListImage38
  7. Map Attachments column of Employee List to the imagecontrol (imgEmpPic here) on the form.   EmployeeListImage39
  8. Click Finish to get back to the Commands Configured part and click on Add Trigger.  EmployeeListImage40
  9. Select FormLoad and hdntxtEmpId as the triggers and click on Create Rule. This would set textchange in hdntxtEmpId and form load events as the trigger for loading the DataSource dsEmpDetails.   EmployeeListImage41

Adding Rules to the form

The rules created during Grid and DataSource configuration would be already added to the Rules Designer. Apart from that, these are the rules to be added to the form.

Rule No. RuleName Trigger Functionality
1 On_FormLoad Form Load Height of second grid is set to zero and first grid to 250. The hdntxtEmpId control value is set to the EmployeeId from the first row, first column of Grid1.
2 Select_EmployeeDetails hdntxtEmpId When a row is selected on the grid, corresponding details like Image, Address etc are displayed in the controls below the grid.
3 Call_EditEmployeeForm hdntxtEmpIdEdit When the Edit button on the grid is clicked, the employeeId of the selected row is set to the hidden text hdntxtEmpIdEdit. This triggers changing the Employee Details below the grid and also brings up a popup window where the Employee Details can be edited. LoadForm function is called on EditEmployee form and SetFormValue function is used to set the value of hdntxtEmpIdDetails in EditEmployee form to the EmployeeId of the selected row.
4 Grid1_ChangeHeaderStyle srchEmpDetails If the default Color of the Header of the search grid2 is to be changed.
5 Grid2_ChangeHeaderStyle srchEmpByJobType If the default Color of the Header of the search grid2 is to be changed.
6 Select_JobType hdntxtJobTypeId Based on the button click on the MainForm for filtering Employees by Job Status, the grid displays are swapped between grid1 and grid2.

Rule 1: On_FormLoad
EmployeeListImage42

Rule 2 : Select_EmployeeDetails
EmployeeListImage43

Rule 3: Call_EditEmployeeForm
EmployeeListImage44

Rule 4: Grid1_ChangeHeaderStyle

EmployeeListImage45

Rule 5: Grid2_ChangeHeaderStyle
EmployeeListImage46

Rule 6: Select_JobType

EmployeeListImage47

Form Design – Edit Employee

  1. Create a NewForm in the Employees Folder and open it for editing.
  2. Click anywhere on the form to get the form properties loaded in the Properties window. Change the Name of the form to EditEmployee. Set the properties of the form as given below. Enable Close Button should be unchecked and IsPopup should be checked.   EmployeeListImage48
  3. Add UI controls to the form as shown in the image below. The controls used are Label, TextBox, DateTimePicker, FileUpload, ComboBox and Buttons all from Toolbox->Standard tab.   employee18
  4. For entering the Address increase the size of the TextBox control and check the AcceptReturn property in the properties window.
  5. For DateTimePicker control, date format can be set from the properties window as shown below.   EmployeeListImage51
  6. Add a subform in cell next to txtAddress and name it as subfrmHdnCtrls. Set the visibility of the form to False by unchecking Visibility in the Properties Window. Add a textbox to the subform and name it hdntxtEmpId.   EmployeeListImage52

Configure DataSource for these controls

  1. In the DataSources tab of the form, click on Create DataSource.   EmployeeListImage53 
  2. Give DataSource Name as dsEmpEdit, choose SharePoint as the DataSource Type and click Ok. EmployeeListImage54
  3. Choose the Employee List and click Next.   EmployeeListImage55
  4. Commands window is opened; by default Select would be chosen in the dropdown. Click Add Button.   EmployeeListImage56
  5. Map the controls on the form to appropriate DataSource column from the list. EmployeeListImage57
  6. Map the Attachments column to the File Upload Control. And in the Query Criteria Mapping, select EmployeeId Equals txtEmpId. Please note that hdntxtEmpId is value is set from the calling form(EmployeeDetails here) and when the form loads, details for that EmployeeId are loaded onto the mapped  controls.   EmployeeListImage58
  7. Click Ok to complete configuring the Select Command. The command configuration window will show that no triggers are associated with the Command.   EmployeeListImage59
  8. Click on Add Trigger and select txtEmpId from the list of controls and click Create Rule. EmployeeListImage60
  9. The command window will show txtEmpId as the associated trigger. EmployeeListImage61
  10. Continue to configure the Insert and Update commands in a similar manner. Just the associated triggers will change to btnInsert and btnUpdate.   EmployeeListImage62 EmployeeListImage63
  11. For configuring the Close button functionality, click on the button and select the Rules tab. Click on Create Rule which will take you to the Rules panel and attach the close button as the trigger for the rule.   EmployeeListImage64
  12. Change the Rule Name to Close_Form. RightClick on the rule name and choose Add Action from the popup. In the Action script write the expression CloseTab().
  13. Couple of checks are added to make sure that a New Employee Record is only inserted not updated and viceversa. In the calling form(MainForm) when New button is clicked, the value passed for hdntxtEmpIdDetails is 0. In the trigger of hdntxtEmpId add a decision to check for this and disable the Update button if true. In case it is greater than 0 disable the Insert button.

Configuring the DataSource for ComboBox – cmbJobType

  1. The dropdown items for the Combobox have to be configured separately through its DataSource property. Click on cmbJobType and select DataSource tab. EmployeeListImage65
  2. Click on New DataSource which opens the below dialogbox. Choose the DataSource as SharePoint.   EmployeeListImage66
  3. Select the JobType Table and click Next. EmployeeListImage67
  4. Click Next in the Criteria Builder window.
  5. In the Next window, select JobTypeId as the Value Member and JobType as the Display Member.   EmployeeListImage68
  6. In the window that comes up next click Add trigger and select hdntxtEmpIdDetails and click create rule. This would close the Add Trigger Window. Click Finish to close the combobox datasource configuration window. EmployeeListImage69

Adding Validation to the Controls

If the Datasource requires that certain fields are mandatory, you can configure the related controls on the form to show an error message if data is not for this field. EditEmployee form has validation configured for all textbox controls.

  1. To configure this first select the control by clicking on it. In the Properties window -> Validation, check IsRequired.   EmployeeListImage70
  2. You can also set regular expression fields to check if it’s a valid EmailId or Phone number etc.   EmployeeListImage71 EmployeeListImage72
  3. When Insert or Update button is pressed on the EditEmployee form, if the required fields are not entered, or the data is not in the expected format an error message is shown to the user as shown below. EmployeeListImage73

Rules for form EditEmployee

No RuleName Trigger Functionality
1 FirstLoad_CheckNewRecord hdntxtEmpIdDetails If the value of hdntxtEmpIdDetails is greater than 0, it is an existing Employee’s record to be loaded. Disable the Insert button and set the value of txtEmpId. If hdntxtEmpIdDetails value is 0 it is a New Record to be added, disable the Update button.

 

Load JobType dropdown.

2 Load_EmployeeDetails txtEmpId Execute Select on DataSource dsEmpEdit. This rule is automatically created when the datasource is configured. Add a decision to check if txtEmpid > 0 in case it is changed.
3 Update_Record btnUpdate Automatically created when the datasource is configured for Update Command Trigger. Rule Name changed later.
4 Insert_Record btnInsert Automatically created when the datasource is configured for Insert Command Trigger. Rule Name changed later.
5 Close_Form btnClose Close the form.

 

To be Implemented later: Refresh the EmployeeDetails form if any change has been made.

Rule 1: FirstLoad_CheckNewRecord
employee20

Rule 2: Load_EmployeeDetails
EmployeeListImage75

Rule 3: Update_Record
EmployeeListImage76

Rule 4: Insert_Record
EmployeeListImage77

Rule 5: Close_Form
EmployeeListImage78

How to use this template

a) Uploading List Template

Following lists are using for creating the template form.

  • ClsysTemp_EmpJobType
  • ClSysTmplt_Employee

Please do the following steps for uploading list templates

  • Click on settings  at the right corner of the window
  • Click on ‘Site settings’ from the drop down menu, we can see the following window appearing.   EmployeeListImage80
  • Click on ‘List template’ option as shown in the above image. And we can see ‘List Template Gallery’. Click on ‘Files’ at the left most corner as shown in the following image. EmployeeListImage81
  • Click on ‘Upload Document’   EmployeeListImage82
  • Following Pop-up will appear where we can browse a list template stored in our computer and click ‘OK’ button.   EmployeeListImage83
  • Following pop-up will appear where we can change the name of the List Template and enter the Description as required and click on ‘Save button’.   EmployeeListImage84
  • Now go to the required sub site, click ‘Settings’ on the right corner.  Then click on ‘Site Contents’.  Following Screen appears in which click on ‘add an app’.   EmployeeListImage85
  • Following screen will appear where we can type the uploaded template name and click search.   EmployeeListImage86
  • Then you can see the Uploaded template, Click on it. EmployeeListImage87
  • On clicking it, we will get following Pop up. Enter the name for the List template and click ‘Create’ button.   EmployeeListImage88

b) Uploading Tenant

  • Click on the ‘Backup and Restore’ on the left side of the App form Designer window .Then click on ‘Import Site’ -> Browse the Tenant and click Load. EmployeeListImage89
  • Select the ‘Zip File’ and ‘Site Name’ and click ‘Next’.   EmployeeListImage90
  • Click ‘Next’ button.

EmployeeListImage91

  • Click on ’Import’ button

EmployeeListImage92

  • Backup restored successfully EmployeeListImage93

c)  Create a Web Part Page

Forms can be embedded on any SharePoint page by using the ClaySys AppForms Web Part, to create a web part page, follow these steps:-

  • Click on Site Settings Wheel in the upper right corner of your site and then select “Site Contents Page”.   EmployeeListImage94
  • Select “Site Pages” or simply pages library on Site Contents Page. EmployeeListImage95
  • Click on “New Wiki Page” to add new site page.   EmployeeListImage96
  • Give the New page name into the pop-up window and click ‘Create’ to add new page. EmployeeListImage97
  • To add a new web part, click on the ‘Insert’ tab and then click on the ‘Web Part’ button. Then select Claysys -> Claysys HTML Web Part.
  • Click ‘Add’ button to add the WebPart.  EmployeeListImage98
  • Click on the ‘edit the Webpart’ link to edit the page.   EmployeeListImage99
  • A new pop-up window appears and here we can configure the Claysys Appforms by clicking on the ‘Configure’ button EmployeeListImage100
  • Pop-up appears with listed published forms. We can select the appropriate form by click on the form and add the form by clicking on the ‘Select’ button.   EmployeeListImage101
  • Once the configuration is finished, click on the ‘Apply’ button to see the changes. Click ‘OK’ to continue. EmployeeListImage102
  • Click ‘Save’ button to save the changes.
  • Below figure shows the form after WebPart configuration. Employee2

Create Hotel Booking Platform Using AppForms

Design Document for Hotel Booking

Introduction

Online hotel booking system provides ample tolls that help hoteliers increase their online exposure and drive up revenue. One of the biggest advantages of our booking engine is the filtering of hotels with multiple criteria. The purpose of this document is designed to be a reference for any person wishing to implement or any person interested in the architecture of the controls for the ClaySys AppForms or how to configure the AppForms to create   a hotel booking template. Please find below user view of hotel booking template:-

Dashboard:-
UI
On the Dashboard following functionalities are being added:-

  • Select Location of Hotel
  • Country Automatic generate on the basis of Location
  • Select Check in and Checkout date
  • Select Rooms, Adults and Children

On clicking ‘Search’ button, following screen will be displayed
UI
In Search result form, following functionalities are being added:-
Can search hotels with:-

  • different rate
  • different City and Country

It is designed to guide development and design in ClaySys AppForms, including:-

  • Form design
  • Data Source configuration
  • Rules Configuration
  • Uploading List Template
  • Uploading Tenant
  • Create a new web part page

Create the form

Form Designing

  • Folders are used to store and organize forms that have a logical association or relationship. To create a new form click ‘New Folder’ button on the toolbar of the designer. On clicking the New Folder option, it will create a new folder and the name will be in the edit mode. You can type in the new name for the folder.

image

  • Then click on the ‘New Form’ link on the toolbar. Give an appropriate name for the form. Click ‘Save’ to save the form.

image

  • You can drag and drop controls format the styles easily.

image
‘Check-In Form’ to save the changes and publish to get the completed form for the end user to use. A form must be checked-out to make modifications while all aspects of the form can be examined while checked-in.

image
There are three forms in this template. Named as:-

  • “HotelDashboard”
  • “SearchResult”
  • “HotelDetail”

“HotelDashboard” form contains following controls:-

  • Combo box
  • TextBox
  • DateTimePicker
  • Button

“SearchResult” form contains following controls:-

  • External form
  • Subform
  • Combo box
  • TextBox
  • Button
  • Label

“HotelDetail” form contains following controls:-

  • Image
  • HyperlinkButton
  • Subform
  • Label

Data Source Configuration
Following steps will explain about the Data Source configuration of Combo Box.

  • Click on the Combo Box control and click the Data Sources tab to edit the Data Source.

image

  • A pop-up window appears to select the item source. Select the Item Source as ‘SharePoint’.  From the Data source Wizard, select respective list name and click on ‘Next’ button.

image

  •  While click on Next button getting below screen. Fill any criteria for the combo box.

image

  • While click on Next button getting below screen, we can select value member and display member for the data source

image

  • While click on Next button getting below screen, we can add trigger and comb box sorting order. Click on ‘Finish’ button

image

  •  Following data shows the combo box in preview.

image

  • Data Source operation for ‘Select’ is now defined.

image
image
image
Rules Configuration

  • “HotelDashboard” contains following rules

Rule No

Rule Name

Trigger

Functionality

1

On_FormLoad

FormLoad

Value populated in ‘cmbcity’ and ‘cmbcountry’. Remove default value of ‘cmbRooms’, ‘cmbAdults’ and ‘cmbchild’. Add one day to ‘dtpChkIn’ date control

2

On_cmbCity

CmbCity

Finding Country name and Number of locations

3

ToDateSetting

dtpChkIn

Adding two days to dtpchkIn and set this value to dtpChkOut

4

BtnSearch

btnSearch

If validation success, open resultant form

Rule 1: On_FormLoad
Image1

Rule 2: On_cmbCity

Image2

   Rule 3: ToDateSetting


Image3
Rule 4: BtnSearch

Image4

  • “SearchResult” form contains following rules

Rule No

Rule Name

Trigger

Functionality

1

FormLoad

FormLoad

Loads ‘Hotel Details’ form by using an external form control. Combo boxes are  filling by using Filldata function

2

On_hdnCity

hdnCity

Loads repeating forms based on search criteria

3

SelectRepeat

hdnRepeatLoop

Trigger set to ‘HotelDetail’ form on the basis of Hotel_ID

4

SearchRule

btnApply

Hotel searching based on City and Country

5

RemoveRule

 

It will remove old repeated forms on the basis of new search criteria

6

RemoveRuleLoop

 

Part of  Rule No 5

7

On_cmbCity

CmbCity

Country value select on the basis of City combo box

8

SetValueToCountry

hdnSCountry

Part of Rule No 7

9

HomePageNavigation

btnHome

Navigate to Home page

Rule 1: FormLoad

Rule1
Rule 2: On_hdnCity

Rule2

Rule 3: SelectRepeat

Rule3

Rule 4: SearchRule

Rule4
Rule 5: RemoveRule

Rule5
   Rule 6: RemoveRuleLoop

Rule6
   Rule 7: On_cmbCity


Rule7
Rule 8: SetValueToCountry


Rule8

Rule 9: HomePageNavigation

Rule9

  • “HotelDetail” form contains following rules

Rule No

Rule Name

Trigger

Functionality

1

On_hdnID

hdnID

Data populated on the basis of hdnID

2

SetHotelNameTOHyperLink

hdnHotelName

Setting hotel name to Hyperlink control

3

ClearRule

hdnClear

Clearing values on the basis of search result

Rule 1: On_hdnID

Rule

Rule 2: SetHotelNameTOHyperLink

Rule
   Rule 3: ClearRule

Rule
How to use this template

Uploading List Template
Following lists are used for creating the template form.

  • HotelDetail
  • HotelLocation

Please do the following steps for uploading list templates

  • Click on settings  at the right corner of the window

Image

  • Click on ‘Site settings’ from the drop down menu, we can see the following window appearing.

Image

  • Click on ‘List template’ option as shown in the above image. And we can see ‘List Template Gallery’. Click on ‘Files’ at the left most corner as shown in the following image.

Image

  • Click on ‘Upload Document’

Image

  • Following Pop up will appear where we can browse a list template stored in our computer and click ‘OK’ button

Image

  • Following pop up will appear where we can change the name of the List Template and enter the Description as required and click on ‘Save button’.

Image

  • Now go to the required sub site, click ‘Settings’ on the right corner.  Then click on ‘Site Contents’.  Following Screen appears in which click on ‘add an app’.

Image

  • Following screen will appear where we can type the uploaded template name and click search.

Image

  • Then you can see the Uploaded template, Click on it.

Image

  • On clicking it, we will get following Pop up. Enter the name for the List template and click ‘Create’ button

Image
Uploading Tenant

  • Click on the ‘Backup and Restore’ on the left side of the App form Designer window.Then click on ‘Import Site’ -> Browse the Tenant and click Load.

Image

  • Select the ‘Zip File’ and ‘Site Name’ and click ‘Next’

Image

  • Click ‘Next’ button

Image

  • Click on ’Import’ button

Image

  • Backup re stored successfully

Image
Create a Web Part Page
Forms can be embedded on any SharePoint page by using the ClaySys AppForms Web Part, to create a web part page, follow these steps:-

  • Click on Site Settings Wheel in the upper right corner of your site and then select “Site Contents Page”.

Image

  • Select “Site Pages” or simply pages library on Site Contents Page.

Image

  • Click on “New Wiki Page” to add new site page.

Image

  • Give the New page name into the pop-up window and click ‘Create’ to add new page

Image

  • To add a new web part, click on the ‘Insert’ tab and then click on the ‘Web Part’ button. Then select ClaySys -> ClaySys HTML Web Part.

Image

  • Click ‘Add’ button to add the WebPart.
  • Click on the ‘edit the WebPart’ link to edit the page.

Image

  • A new pop-up window appears and here we can configure the ClaySys AppForms by clicking on the ‘Configure’ button

Image

  • Pop-up appears with listed published forms. We can select the appropriate form by clicking on the form and add the form by clicking on the ‘Select’ button.

Image

  • Once the configuration is finished, click on the ‘Apply’ button to see the changes. Click ‘OK’ to continue.

Image

  • Click ‘Save’ button to save the changes.

Image

  • Below figure shows the form after WebPart configuration.

Image

Building A Sales Viewer Application Using AppForms

Design Document for Sales Viewer

Introduction

Sales Viewer has been designed to generates graphical reports on Daily sales performance, unit sales and sales by range on the basis of Revenue by sector and Revenue by product. The purpose of this document is designed to be a reference for any person wishing to implement or any person interested in the architecture of sales viewer for the ClaySys AppForms.
In ClaySys AppForms Sales Viewer , a combo box is available to select the category. If we select the category as Revenue by sector, the statistical report will shows the Daily sales performance, unit sales by sector and sector sales by range as shown in the below figure.

Image1
If we select the category as Revenue by Product, then the statistical report will shows the Daily sales performance, unit sales by product and Product sales by range as shown in the figure.

Image2
It is designed to guide development and design in ClaySys AppForms, including:

  •  Creating the form
  • Form design
  • Data Source configuration
  • Rules
  • How to use this template
  • Uploading List Templates
  • Import tenant
  • Create a web part page

Creating the form
Form Design

  • On clicking the New Folder option, it will create a new folder and the name will be in the edit mode. You can type a new name for the folder.

image1

  • Then click on the ‘New Form’ link on the toolbar. Give an appropriate name for the form. Click ‘Save’ to save the form.

image2

  • You can drag and drop controls format the styles easily.

image3

  •  ‘Check-In Form’ to save the changes and publish to get the completed form for the end user to use. A form must be checked-out to make modifications while all aspects of the form can be examined while checked-in.

image4
DataSource Configuration
Following steps will explain about the DataSource configuration of Search control.

  • Click Search control select the New DataSource Configuration.

image1

  • Select the site from the available sites. Click ‘Next’ to continue.

image2

  • Select the list from available list name. Click ‘Next’ to continue.

image3

  • Select the result columns. Click ‘Next’ to continue.

image4

  • Add the designer criteria in the criteria builder that should select the unique record in the List that matches the user identity criteria in the Data source and additional and/or Query clauses can be added. Click ‘Next’ to continue.

image5

  • If the selected lists needs any relationship then we can add  their relations here. Click ‘Next’ to continue.

image6

  • We can change the look and feel of the search control.

image7

  • Click ‘Add Trigger’ to add the trigger.

image8

  • We can select and add the trigger by clicking the check box corresponding to the control.

image9

  • Click ‘Create Rule’ will automatically create the FillData() rule for the search control with associated trigger.

image10
image11

  • Click ‘Finish’ button to save and close the DataSource configuration process for the search control.

Following steps will explain about the DataSource configuration of Chart control:
Before configuring the chart control, a search control should be configured whose data has to be taken for mapping the chart control.

  • Click on the Chart control and select the DataSource.

image12

  • A chart window appears. Select a suitable Chart type. Click ‘Next’ to continue.

image13

  • A Chart window appears for configuring the Chart Source Data. Select the DataSource as a Search control whose data has to be taken for mapping the chart control. Add a Chart title and label the X and Y axis. Click ‘Next’ to continue.

image14

  • Chart window appears for configuring the Series title, Independent value path and Dependent value path. Click ‘OK’ to add the option.

image15

  • Click ‘Finish’ button to save and close the DataSource configuration process for the Chart control.

Rules
The rules section is the most powerful section in the AppForms. The rules can be configured using the Rules Engine. Following are the rules associated with the application.

  • The rule named ‘FormLoad’, fills the search control and set the values to label controls on ‘FormLoad’ as trigger.

image1

  •  The rule named ‘Dashboard’ fills the search control ‘srcDailySalesbySector’ and sets the values to the label controls based on the value in the combo box ‘cmbRevenue’, on ‘cmbRevenue’ as trigger. Depends on the values in the search control the Chart controls will be populated. This process is converted into concise, yet readily understood rule expression statements that represent the underlying execution logic of the form as shown in the figure.

image2

How to use this template


Uploading List Templates

List templates that were downloaded to a file on the file system can be uploaded to the list template gallery. To perform the following steps, you must have Read permission to the folder or network share that contains the list template file. Before uploading the list template, it should be added to the list template gallery of the root site. Following steps will explain about how to add the list template in to the list template gallery.

  •  On the Site Actions menu, click ‘Site Settings’.

image1

  • In the Galleries column, click List templates. This option appears only to users who have the Manage Lists permission. Site owners have this permission by default.

image2

  •  The List Template Gallery page appears. Select Files tab and click ‘Upload Document’.

image3

  • Either type the path or file name (including the file extension) of the list template that you want to upload, or click ‘Browse’ to select the file. Choose whether to overwrite the existing files. By default, the ‘Overwrite existing files’ check box is selected.

image4

  • Click ‘OK’ to choose the file.
  • A pop-up appears to edit the name, title and description of the list template.

image5

  •  Click ‘Save’ to include the list template into the list template gallery.

Once the list template is added to the list template gallery, we can create a new list using the list template uploaded. Following steps explains how to create a new list using list template.

  • From the Site Actions drop-down menu in the top right, select ‘Site Contents’ of your site.

image6

  • Click ‘add an app’

image7

  •  Find the list template that was uploaded.

image8

  • Click on the list template to use for this site

image9

  • Pick a name for the new list. We can add this app multiple times with a unique name.

image10

  • Click on the ‘Create’ button. A list has now been created using the list template.

Import tenant
Following steps will explain about tenant import.

  • Open the ‘Backup and Restore’ option in AppForms in the destination site and click on the ‘import site’ tab.

image1

  • Select the backup file we had saved from the source site.

image2

  • Once the file is selected, click on the load button.

image3

  • This will show you the different sites that were exported from the source site. If there are more than one site content saved, then you can map each site in backup file to different sites in the current site. Select the required site content that needs to be restored and select the destination site in the current site as shown below. Once we are done with the backup mapping, click on the next button to proceed with the import.

image4

  • Now we will have to remap the sites we had used in the source website to the actual site in the target site. The drop down will show you with the sites/sub sites to help you with the data source mapping. Click ‘Next’ to continue.

image5

  • Click ‘Import’ to continue.

image6

  • This will import all the site content we had backed up from the source site and we are ready to work with the forms in the current site.

image7
Create a Web Part Page
Forms can be embedded on any SharePoint page by using the ClaySys AppForms Web Part, to create a web part page, follow these steps:

  • Click on Site Settings Wheel in the upper right corner of your site and then select “Site Contents” Page.

image1

  •  Select “Site Pages” or simply pages library on Site Contents Page.

image2

  • Click on “New Wiki Page” to add new site page.

image3

  • Give the New page name into the pop-up window and click ‘Create’ to add new page.

image4

  • To add a new web part, click on the ‘Insert’ tab and then click on the ‘Web Part’ button. Then select ClaySys -> ClaySys HTML Web Part.

image5

  • Click ‘Add’ button to add the Web Part.
  • Click on the ‘edit the Web part’ link to edit the page.

image6

  • A new pop-up window appears and here we can configure the ClaySys AppForms by clicking on the ‘Configure’ button.

image7

  • Pop-up appears with listed published forms. We can select the appropriate form by click on the form and add the form by clicking on the ‘Select’ button.

image8

  • Once the configuration is finished, click on the ‘Apply’ button to see the changes. Click ‘OK’ to continue.

image9

  • Click ‘Save’ button to save the changes.

image10

  • Below figure shows the form after Web Part configuration.

image11

Clinical Management Portal Using AppForms

1.Introduction:

ClaySys AppForms Demo template document deals with, 1. Pre-Requisite 2. How to create a main form using different controls 3. How to create the home page to display patient details 4. How to rename a control 5. How to add a image to image control or image button 6. How to configure a search control 7.Adding a new patient Form 8. Query page 9.View comments page 10. To view daily schedule 11. How to use this template.

What are we going to create using this document?
Form1:
Doctor1latest
Form 2:

Docter2
Form 3:
Doctor3

Form 4:
Doctor4

Form 5:
Doctor5

1 Pre-Requisite:

Doctor6

  1. Launch the AppForms URL.
  2. Create a New Folder by clicking on new Folder Tab.
  3. Inside the Folder create a new form by clicking on new Forms Tab.
  4. Browser Preferred – IE8,9,10,11.

2 How to create a main form using different controls

2.1 Controls used in the form are

  • Image
  • Image Button
  • Sub Form
  • Label
  • Search Control
  • Text box as hidden control (visibility is set as false).


3 How to create the home page to display patient details:

3.1 Steps to achieve the above UI

1.Select the first column and by using span option span it to n number of columns, eg: 5.
2.Drag Sub-Form from Group to the spanned column.
3.Inside the sub form add columns. In one of the columns add one image control.
Doctor9
4.Add one more Sub-form inside one of the columns of the first inserted Sub-form.
5.Add two columns to the second Sub-form.
6.Drag and drop one image control and label control to the added columns respectively.
7.Add another label control to the 1st Sub-form.

Doctor10
8.Drag and drop 3 Image button controls.

Doctor11
9.Drag and drop a label control and change the name as Patient.
10.Drag and drop an image button.
11.Drag and drop a combo box.
12.Drag and drop a search control.
Doctor12
13.Image button controls are dragged and dropped.
Doctor13
14.Drag and drop the sub-form.
15./ 16. Drag and drop the image control.
17.Drag and drop the label control.
Doctor14
18.Drag and drop the textbox control.

4 How to rename a control:
4.1 Steps to Rename control.
Doctor15

1.Click on the control.
2.A Quick menu will be displayed.
3.Edit the name of the control in the column name field.
4.We can make the control Visible/ Invisible by selecting the check box respectively .
5.The control can be enabled /disabled by selecting the check box respectively.
6.We can also set the Width and Height of the control.

5 How to add a image to image control or image button:

5.1 Steps to add a image to image control or image button.

1.Select the image/image button control.
2.In the right side Properties drop down select Image source.
3.Browse and select the image from the stored location.
4.The image will be added to the image source and displayed in the image/image button control.
Doctor16
6 How to configure a search control:
6.1 Steps to configure a search control:

1.Create a list in share point with required field.
2.Click on the search control.
3.Quick menu will be opened.Doctor17
4.Select the Data Source tab.
5.Click on edit Data Sources Configuration hyperlink.
6.Select the Site by clicking the radio button from the pop-up and click on Next button.
Doctor18new
7.Select the list created in the share point and click on next button.
Doctor19new
8.Select the columns in the list which should be displayed in the search control.
9.Select the criteria if necessary / click on next button.
10.Select the Relation , if you need to join 2 or more tables.
11.In search result configuration window, you will be allowed to edit the column header ,type and order to display the columns.
Doctor21new
12.Click on finish button. The search control will be configured.
13.In general properties select the Search On load option and the search will be filled when the form is launched. Search can also be filled using various methods.
Doctor22

7.Adding a new patient Form:

Doctor23
7.1 Controls used in the form are

  • Image
  • Image Button
  • Sub Form
  • Label
  • Tab Control
  • Text box
  • Check box
  • Date Time Picker
  • Button

7.2 Steps to create this form:

  1. Follow the same steps used in first form to create the header part.Doctor24
  2. Place a label control by spanning columns and change the name as New Patient.
  3. Change the header Name of the Tab control to Patient Information – New Patient.
  4. Properties –> Tab Collection –> Items –>
  5. Enter the name in Tab Item Name and click on OK button.
  6. The name of the tab control will be changed.
  7. Drag and drop controls as shown in the image above.
  8. The UI design of New Patient Form is completed.

7.3 Save Functionality in the Form:

  1. Button is dragged and dropped.
  2. Create a list in SharePoint.
  3. Add a data source to the form and name it.
    Click On DataSources –> Create DataSource –> Enter Name –> Select the data source as SharePoint –> Click Ok –> Select the list created in the share point –> Click on Next button. Doctor26new
  4. Select Insert option from the drop down and click on add button. Doctor27new
  5. Map the columns of list to the design controls and click on OK button. Doctor28new
  6. Click on Add Trigger Button:   Doctor31new
  7. We had named the save button as btnSave  Doctor30new
  8. Select btnSave as trigger and click on Create Rule button.
  9. The rule will be created–> Click on close button.
  10. Click on Finish button
  11. The data source will be added
  12. By using this form we will be able to insert the data into the List created in the share point. In this form New patient details will be added.

8 Query Form:
Doctor34new

8.1 Controls used in the form are

  • Image
  • Image Button
  • Sub Form
  • Label
  • Button

8.2 Steps to create this form:

  1. Create the header by using the same steps used in the above forms.
  2. Span columns and drop a label control. Name the label as Queries.
  3. Change the back ground color to eg: Green. The back ground color option is present in Properties–> Style –> Background color   Doctor35
  4. Complete the design as shown in the design.

9.View comments page:

Doctor36
9.1 Controls used in the form are

  • Image
  • Sub Form
  • Label
  • textbox
  • Button

9.2 Steps to achieve the above Form

  1. Drag and drop all the controls and achieve the Form UI design.
  2. For Close button, Click on the button –> Quick menu will be displayed–> Select Rule/Attributes –> Create rule –> Click on start –> Add an action –> Write rule CloseTab(). Doctor37
  3. This form should be shown as a pop-up when the VIEW button in   Query Form Is Clicked. So Is Pop-Up option should be selected in this form. Click on any part of form–>Properties –> Form Details–> Is Popup =True.  Doctor38

The Form will be displayed as popup.

10 To view daily schedule Form:
Doctor39new

10.1 Controls used in the form are

  • Image
  • Image Button
  • Date Time Picker
  • Label
  • Search Control

10.2 Steps to achieve the above Form

  1. Drag and drop all the controls and achieve the Form UI design.
  2. In this a label for error message and search control is placed and marked as Invisible.
  3. When the Form is loaded, the date time picker displays the current date. This is achieved using a rule.

Rules –> New Rule –> Add Action –> dtpselectdate.Value=GlobalVariable(Now)

dtpselectdate.Value=GlobalVariable(Now) means

dtpselectdate.Value – Value Of date time picker. the name of date time picker is given as dtpselectdate in form design.

GlobalVariable(Now) – this selects the current date.
Doctor40

  1. FormLoad is set as trigger. In Default Tab –> form load will be displayed. Doctor41
  2. When the Form is loaded, if there is any appointment scheduled for the current date the search control will be displayed with data.
  3. If there is no appointment scheduled for the current date, the error message will be displayed.
  4. This is achieved using rules.
  5. Have Date Time Picker as trigger .

Rules:

Create a new Rule –> Add a Action Rule FillDataSync(Search3)

Add a decision:

If

Search3.TotalRowCount>0   -> Search3.Style.Visibility=True

-> lblError.Style.Visibility=False

Else

   -> Search3.Style.Visibility=False

   -> lblError.Style.Visibility=True

Doctor42

  1. The Form Design is complete.

11 How to use this template:

11.1 Uploading List Template:

The below given list is used for creating the template form.

Doctor_Final

11.1.1 Steps for uploading list templates

  1. Click on settings at the right corner of the window.  Doctor43
  2. Click on ‘Site settings’ from the drop down menu, we can see the following window appearing.   Doctor44
  3. Click on ‘List template’ option as shown in the above image. And we can see ‘List Template Gallery’. Click on ‘Files’ at the left most corner as shown in the following image.  Doctor45
  4. Click on ‘Upload Document’  Doctor46
  5. Following Pop up will appear where we can browse a list template stored in our computer and click ‘OK’ button.  Doctor47
  6. Following pop up will appear where we can change the name of the List Template and enter the Description as required and click on ‘Save button’.   Doctor48
  7. Now go to the required sub site, click ‘Settings’ on the right corner. Then click on ‘Site Contents’. Following Screen appears in which click on ‘add an app’.   Doctor49
  8. Following screen will appear where we can type the uploaded template name and click search.   Doctor50
  9. Then you can see the Uploaded template, Click on it.
  10. On clicking it, we will get following Pop up. Enter the name for the List template and click ‘Create’ button

Doctor52

11.2 Uploading Tenant:
11.2.1 Steps for Uploading Tenant:

  1. Click on the ‘Backup and Restore’ on the left side of the App form Designer window .Then click on ‘Import Site’ -> Browse the Tenant and click Load.  Doctor53
  2. Select the ‘Zip File’ and ‘Site Name’ and click ‘Next’   Doctor54
  3. Click ‘Next’ button Doctor55
  4. Click on ’Import’ button   Doctor56
  5. Backup re stored successfully.   Doctor57

11.3 Creating a Web Part page:

Forms can be embedded on any SharePoint page by using the ClaySys AppForms Web Part, to create a web part page.

11.3.1 Steps to create a web part page:

  1. Click on Site Settings Wheel in the upper right corner of your site and then select “Site Contents Page”.  Doctor58
  2. Select “Site Pages” or simply pages library on Site Contents Page.  Doctor59
  3. Click on “New Wiki Page” to add new site page.  Doctor60
  4. Give the New page name into the pop-up window and click ‘Create’ to add new page.   Doctor61
  5. To add a new web part, click on the ‘Insert’ tab and then click on the ‘Web Part’ button. Then select ClaySys -> ClaySys HTML Web Part.  Doctor62
  6. Click ‘Add’ button to add the Web Part.
  7. Click on the ‘edit the Web part’ link to edit the page.  Doctor63
  8. A new pop-up window appears and here we can configure the ClaySys AppForms by clicking on the ‘Configure’ button.   Doctor64
  9. Pop-up appears with listed published forms. We can select the appropriate form by click on the form and add the form by clicking on the ‘Select’ button.   Doctor65
  10. Once the configuration is finished, click on the ‘Apply’ button to see the changes. Click ‘OK’ to continue.  Doctor66
  11. Click ‘Save’ button to save the changes.
  12. Below figure shows the form after WebPart configuration.

Doctor1latest

Creating Cascading Dropdown List Using AppForms

IntroductionCascadingDropDown enables a common scenario in which the contents of one combobox depends on the selection of another combobox. The Cascading Dropdown Menu allows you to drill down through hierarchical data by using one dropdown menu as a filter into the next. The purpose of this document is designed to be a reference for any person wishing to implement or any person interested in the architecture of the cascading dropdown for the ClaySys AppForms or how to configure the combo boxes in AppForms with cascading dropdown effect.

The Dashboard form contains an Add New button; it will navigate to a popup form. In that form we can create a new cascading combination. When the user selects maker from “Make” combo box, model of the car should populated in “Model” combo box and when the user selects model, color of the car should be populated in “Color” combo box. Click Save to save the values and it will reflect in the dashboard form. We can update the values by clicking on the ‘Edit’ link provided in the dashboard form. The values in the combo boxes are populated from SharePoint lists. The ‘Make’ list contains the car maker names. The ‘Model’ list contains the model of the car and the ‘Color’ list contains the color of the cars.

CascadingImage1
CascadingImage2

It is designed to guide development and design in ClaySys AppForms, including:

  • Creating the form
  • Form design
  • DataSource configuration
  • How to use this template
  • Uploading List Templates
  • Import tenant
  • Create a webpart page

Creating the form
Form Design
Folders are used to store and organize forms that have a logical association or relationship.To create a new form click ‘New Folder’ button on the toolbar of the designer.

  • On clicking the New Folder option, it will create a new folder and the name will be in the edit mode. You can type a new name for the folder.

CascadingImage3

  •  Then click on the ‘New Form’ link on the toolbar. Give an appropriate name for the form. Click ‘Save’ to save the form.

CascadingImage4

  • You can drag and drop controls format the styles easily.

CascadingImage5

  • ‘Check-In Form’ to save the changes and publish to get the completed form for the end user to use. A form must be checked-out to make modifications while all aspects of the form can be examined while checked-in.

CascadingImage6

DataSource Configuration

Following steps will explain about the DataSource configuration of ComboBox control.

  • Click on the ‘Make’ ComboBox and select the DataSources tab to edit the DataSource.

CascadingImage7

  • A pop-up window appears to select the item source. Select the appropriate Item source and click ‘OK’ to continue. Here we select the Item Source as ‘SharePoint’

CascadingImage8

  • Select the SharePoint List in the next window. Click ‘Next’ to continue.

CascadingImage9

  • Click “Add” button in the criteria window to Write the appropriate criteria for filling the ‘Make’ ComboBox in the Criteria Builder . Click ‘Next’ to continue.

CascadingImage10

  • Select the value member and display member from DataSource wizard. Click ‘Next’ to continue.

CascadingImage11

  • Click “Add Trigger” in the miscellaneous window.

CascadingImage12

  • We can select and add the trigger by clicking the check box corresponding to the control.

CascadingImage13

  • Click ‘Create Rule in the Manage Rule window to create FilldataSync( ) rule associated with the corresponding control/Event as trigger. Choose whether to Sync the command. By default, the ‘IsSync’ check box is

CascadingImage14
CascadingImage15

  • If you need to display items in any sorting order, select the column name from “Column” and select the Order. Click “Add” button without fail. Click ‘Finish’ to end the process.

CascadingImage16

  • Click “Preview”. You can see that Maker names are populating in combo box.

CascadingImage17

  • When the user selects ‘Acura’ from Make, Model names should be populated in the ‘Model’ combo box.
  • To configure the ‘Model’ ComboBox follow the steps for configuring the ‘Make’ Combo Box up to the list selection.
  • Give the criteria for filling the ‘Model’ combo box as given below .

CascadingImage18

  • Click “Next” to continue. Follow the configuration steps of ‘Make’ combo box to add the trigger for ‘Model’ combobox. Add trigger as ‘Make’ and complete the configuration.
  • When you select the value from the combobox ‘Make’, the ‘Model’ will populate the Names of corresponding Maker. Click “Preview”. You can see that Model names are populating in combo box.

CascadingImage19

  • Click ‘Color’ and follow above steps that you followed for ‘Make’ and ‘Model’ upto selecting the List.Give the criteria for filling the combo box ‘Color’.

CascadingImage20

  • Give ‘Make’ and ‘Model’ as a trigger and complete the configuration.

CascadingImage21

  • Click “Preview”. You can see the Color names are populating in the combo-box, corresponding to the values in the other combo boxes.

CascadingImage22

How to use this template
Uploading List Templates

List templates that were downloaded to a file on the file system can be uploaded to the list template gallery. To perform the following steps, you must have Read permission to the folder or network share that contains the list template file. Before uploading the list template, it should be added to the list template gallery of the root site. Following steps will explain about how to add the list template in to the list template gallery.

  • On the Site Actions menu, click ‘Site Settings’.

CascadingImage23

  • In the Galleries column, click List template This option appears only to users who have the Manage Lists permission. Site owners have this permission by default.

CascadingImage24

  • The List Template Gallery page appears. Select Files and click ‘Upload Document’.

CascadingImage25

  • Either type the path or file name (including the file extension) of the list template that you want to upload, or click ‘Browse’ to select the file. Choose whether to overwrite the existing files. By default, the ‘Overwrite existing files’ check box is selected.

CascadingImage26

  • Click ‘OK’ to choose the file.
  • A pop-up appears to edit the name, title and description of the list template.

CascadingImage27

  • Click ‘Save’ to include the list template into the list template gallery.
  • Once the list template is added to the list template gallery, we can create a new list using the list template uploaded. Following steps explains how to create a new list using list template.
  • From the Site Actions drop-down menu in the top right, select ‘Site Contents’ of your site.

CascadingImage28

  • Click ‘add an app’.

CascadingImage29

  • Find the list template that was uploaded.

CascadingImage30

  • Click on the list template to use for this site

CascadingImage31

  • Pick a name for the new list. We can add this app multiple times with a unique name.

CascadingImage32

  • Click on the ‘Create’ button. A list has now been created using the list template.

Import Tenant

Following steps will explain about tenant import.

  • Open the ‘Backup and Restore’ option in AppForms in the destination site and click on the ‘import site’ tab.

CascadingImage33

  • Select the backup file we had saved from the source site.

Cascading34

  • Once the file is selected, click on the load button.

Cascadingimage34

  • This will show you the different sites that were exported from the source site. If there are more than one site content saved, then you can map each site in backup file to different sites in the current site. Select the required site content that needs to be restored and select the destination site in the current site as shown below. Once we are done with the backup mapping, click on the next button to proceed with the import.

Cascadingimage35

  • Now we will have to remap the sites we had used in the source website to the actual site in the target site. The drop down will show you the sites/sub sites to help you with the data source mapping. Click ‘Next’ to continue.

Cascadingimage36

  • Click ‘Import’ to continue.
  • This will import all the site content we had backed up from the source site and we are ready to work with the forms in the current site.

CascadingImage37

 Create a Web Part Page

Forms can be embedded on any SharePoint page by using the ClaySys AppForms Web Part, to create a web part page, follow these steps:

  • Click on Site Settings Wheel in the upper right corner of your site and then select “Site Contents Page”.

Cascadingimage38

  • Select “Site Pages” or simply pages library on Site Contents Page.

CascadingImage39

  • Click on “New Wiki Page” to add new site page.

CascadingImage40

  • Give the New page name into the pop-up window and click ‘Create’ to add new page.

Cascadingimage41

  • To add a new web part, click on the ‘Insert’ tab and then click on the ‘Web Part’ button. Then select ClaySys -> ClaySys HTML Web Part.

Cascadingimage42

  • Click ‘Add’ button to add the WebPart.
  • Click on the ‘edit the Webpart’ link to edit the page.

Cascadingimage43

  • A new pop-up window appears and here we can configure the Claysys Appforms by clicking on the ‘Configure’ button.

CascadingImage44

  • Pop-up appears with listed published forms. We can select the appropriate form by click on the form and add the form by clicking on the ‘Select’ button.

CascadingImage45

  • Once the configuration is finished, click on the ‘Apply’ button to see the changes. Click ‘OK’ to continue.

CascadingImage46

  • Click ‘Save’ button to save the changes.

Cascadingimage47

  • Below figure shows the form after WebPart configuration.

Cascadingimage48

  • Click “Add New” button to open the cascading form. Select values from 3 combo boxes and click save to save values to list.

CascadingImage49

Web service in ClaySys AppForms

Introduction

A web service is a software system designed to support inter operable machine-to-machine interaction over a network. In ClaySys AppForms you can connect to the web service to read/write data unless you have restrictions from the server to have the connectivity to the web service from the server. The purpose of this document is designed to be a reference for any person wishing to implement or any person interested in the architecture of the web service with the ClaySys AppForms.

Here we will be using a web service called ‘Currency Converter’, to get the conversion rate from one currency to another currency. The label will display the currency conversion rate of two countries from the two combo boxes. Also we can calculate the equivalent amount of money based on this conversion rate in the text boxes. If we select the currency codes of countries from the two combo boxes, two text boxes available in the right side of the page will be enabled. We can enter currency amount in one of the text box and the other will give the corresponding amount based on the conversion rate.

Image1

It is designed to guide development and design in ClaySys AppForms, including:

  • Creating the form
  • Form Design
  • Data Source configuration
  • Rules
  • How to use this template
  • Import tenant
  • Create a new web part page

Creating the form
Form Design

Folders are used to store and organize forms that have a logical association or relationship. To create a new form click ‘New Folder’ button on the toolbar of the designer.

  • On clicking the New Folder option, it will create a new folder and the name will be in the edit mode. You can type in the new name for the folder.

Image2

  • Then click on the ‘New Form’ link on the toolbar. Give an appropriate name for the form. Click ‘Save’ to save the form.

Image3

  • You can drag and drop controls format the styles easily.

Image4

  • ‘Check-In Form’ to save the changes and publish to get the completed form for the end user to use. A form must be checked-out to make modifications while all aspects of the form can be examined while checked-in

Data Source Configuration

Following steps will explain about the Data Source configuration of Combo Box.

  • Click on the Combo Box control and click the Data Sources tab to edit the Data Source.

Image6

  • A pop-up window appears to select the item source. Select the Item Source as ‘Static’ so that the values can be given as static.
Image7
  • Following figure shows the combo box in preview.

Image8

When you upload the form, Web service DataSource will automatically be added to “DataSource settings”. Following steps will explain about how to create a new WebService DataSource.

  • In the Data Source wizard on the left side of the designer, select the DataSource Type as WebService.
  • Enter the Title& Description for Web Service Data Source. This is mandatory.

Image10
Enter URL for the WebService. Example URL: http://www.webservicex.net/currencyconvertor.asmx?wsdl

Image11

  • Username and Password are not required for this Public Web service. Select ‘Make it Public’ for the availability of created Data Source across all the sites. If its public, it will be available for all the site collections.

Image12

  • Select ‘Is SharePoint ‘for the UserProfile SharePoint WebService.
  • Click on the icon to insert or update the DataSource.
  • A message will pop up indicating the successful insertion of web service. Click ‘Ok’.
image13
  • Following steps will explain how to configure the web service data source.
  • To create an external DataSource click on the ‘Create DataSource’ link on the left side of the designer.
Image14

Give the DataSource name and select the DataSource type as ‘Webservice’. Click ‘OK’ to continue.

Image15
DataSource configuration wizard with all the WebService datasource mapped will be populated. Select the ‘Currency Convertor’ DataSource from the available DataSources. Click ‘Next’ to continue.

Image16
Click ‘Add’ button to add the Select command. DataSource operation in webservice can be defined only for ‘Select’.
Image17
Select the DataSource object as ‘ConversionRate’. Click ‘Next’ to continue.

Image18
A sample SOAP request shows. Click ‘Next’ to continue.

Image19
Enter the control name for the selected DataSource object for XML request. In the request XML view, give the ‘FromCurrency’ as ‘cmbCountry1’ combobox and ‘ToCurrency’ as ‘cmbCountry2’ combobox .Click ‘Next’ to continue.
Image20
A sample SOAP response shows. Click ‘Next’ to continue.

Image21
In the response XML view, give the ‘ConversionRateResult’ as ‘txtConversionRateResult’ textbox. Click ‘Next’ to continue.
Image22
Data Source operation for ‘Select’ is now defined.

Image23
Once the Data source operation is defined, it is bound to a control or event that triggers its execution. It is given by ‘Add Trigger’ button. So that the corresponding Execute Command rules will be created with associated trigger.

Image24
We can add the trigger by clicking the check box corresponding to the control.

Image25
Click ‘Create Rule’ will automatically create the corresponding ExecuteCommand( ) rule for the select command associated with the trigger.

Image26
Image27
Click ‘Finish’ to save and close the data source configuration.

Rules

The rules section is the most powerful section in the AppForms. The rules can be configured using the Rules Engine. Following are the rules associated with the application.

The rule named ‘GetcurrencyConversionRate’ is basically the DataSource select operation of webservice. Based on the two conditions shown in the figure, the textbox controls can be enabled/disabled and the values of ‘ConversionRateResult’ are populated from the webservice also fills the values of ‘Equivalent amount’ label controls on comboboxes (‘cmbCountry1’ and ‘cmbCountry2’) trigger. This process is converted into concise, yet readily understood rule expression statements that represent the underlying execution logic of the form as shown in the figure.

Image28

The rule is named ‘CalculateToAmount’ gives an equivalent amount of money in ‘txtToAmount’, which is the multiplicative amount of ‘txtConversionRateResult’ and the ‘txtFromAmount’ on ‘txtFromAmount’ trigger.

Image29

The rule is named ‘CalculateFromAmount’ gives an equivalent amount of money in ‘txtFromAmount’ which is the divided amount of ‘txtToAmount’ and ‘txtConversionRateResult’ on ‘txtToAmount’ trigger.

Image30

 How to use this template

Import Tenant

Following steps will explain about tenant import.

Open the ‘Backup and Restore’ option in AppForms in the destination site and click on the ‘import site’ tab.

Image31
Select the backup file we had saved from the source site.Image32
Once the file is selected, click on the load button.

Image33
This will show you the different sites that were exported from the source site. If there are more than one site content saved, then you can map each site in backup file to different sites in the current site. Select the required site content that needs to be restored and select the destination site in the current site as shown below. Once we are done with the backup mapping, click on the next button to proceed with the import.

Image34
Now we will have to remap the sites we had used in the source website to the actual site in the target site. The dropdown will show you will the sites/sub sites to help you with the datasource mapping. Click ‘Next’ to continue.
Image35
Click ‘Import’ to continue.

Image36
This will import all the site content we had backed up from the source site and we are ready to work with the forms in the current site.

Image37
Create a Web Part Page

Forms can be embedded on any SharePoint page by using the ClaySys AppForms Web Part, to create a webpart page, follow these steps:

Click on Site Settings Wheel in the upper right corner of your site and then select “Site Contents Page”.

Image38

Select “Site Pages” or simply pages library on Site Contents Page.

Image39
Click on “New Wiki Page” to add new site page.

Image40

Give the New page name into the pop-up window and click ‘Create’ to add new page.

Image41
To add a new web part, click on the ‘Insert’ tab and then click on the ‘WebPart’ button. Then select Claysys -> Claysys HTML WebPart.

Image42
Click ‘Add’ button to add the Web Part.
Click on the ‘edit the Web part’ link to edit the page.

Image43
A new pop-up window appears and here we can configure the ClaySys AppForms by clicking on the ‘Configure’ button.

Image44

Pop-up appears with listed published forms. We can select the appropriate form by click on the form and add the form by clicking on the ‘Select’ button.Image45
Once the configuration is finished, click on the ‘Apply’ button to see the changes. Click ‘OK’ to continue.

Image46

Click ‘Save’ button to save the changes.

Image47

Below figure shows the form after Web Part configuration.

Image48