How to develop SharePoint 2010 form builder effectively?

Asked By 70 points N/A Posted on -

Greetings Techyv members, I hope you have a wonderful day. I would like to ask how to develop sharepoint 2010 form builder effectively. What are the steps needed for this and please also share your own experience and review of the product. I would really appreciate it by then. Thank you.

Best Answer by Clayton Freda
Answered By 0 points N/A #131246

How to develop SharePoint 2010 form builder effectively?


Hello Salie,

The Sharepoint 2010 is a powerful tool to generate forms for web pages and offers the following functionality –
Ensures that mandatory fields in the form are not left blank.

The generated form can be embedded easily in any web page or part of a web page.
Support for multiple languages.

You can find a complete guide to developing Sharepoint form builder here.

Best Answer
Best Answer
Answered By 0 points N/A #131247

How to develop SharePoint 2010 form builder effectively?



U2U CAML question designer is a useful device for SharePoint designer. I’ve used this device regularly with SharePoint 2007 growth. However, I’ve got into an issue with using the device with SharePoint 2010. The device is not modified in SharePoint 2010 yet. Though you can use U2U CAML designer with SharePoint 2010 (shown later in this post), you want to use the new functions of CAML (say being a part of the lists) and such new functions are not reinforced in CAML designer. In this publish I’ll display how you can produce CAML question for SharePoint 2010 using fewer resources and LINQ question. First let us talk about on how you can still use the CAML designer to produce CAML for SharePoint 2010. Till now the CAML designer is not servicing SharePoint 2010. However, you can create the device operator by using linking via web assistance as proven below:

Though you can use the older CAML designer with SharePoint 2010, since the CAML designer is not modified yet, you will not get the CAML new functions when you will use CAML designer. Worried? Please do not. There is a way out. Let me clarify. Download CKS graphic Studio Extension: There is a useful and helpful  graphic Studio Expansion for SharePoint designers known as Group Kit for SharePoint (CKS): development device version. You can obtain the extension for SharePoint Hosting server or for SharePoint Base.  Generate Enterprise sessions from SharePoint site: Once you have set up the Group Kit for SharePoint, you can produce entity sessions from Hosting server explorer. First start a SharePoint venture in Visible Studio and then get connected to the SharePoint server from Hosting server explorer ==> SharePoint Connections. Then simply right click your web and click “Generate entity classes” as proven below.

This will produce the entity sessions in the present chosen venture of graphic Studio. Create LINQ uses Linq-to-SharePoint against produced enterprise classes: Once you have produced the enterprise sessions as described in step2, you can use LINQ to SharePoint to create your reasoning that you want to accomplish through CAML. Once you're the Linq, you can run the rule and log the CAML produced from the Linq. For example I have two details Purchases and Item. I want to link two details to get purchase headline and product name. The LINQ will look like as proven below:
using (var dataContext = new MySiteDataContext(siteUrl))
    TextWriter textWriter = new StreamWriter(@"c:caml.txt",false);
    dataContext.Log = textWriter;
    var result = from o in dataContext.Orders
                    join p in dataContext.Product on o.Product.Id equals p.Id
                    select new {OrderName = o.Title, p.ProductName};
    foreach (var v in result)
Code snippet 1: LINQ query using LINQ to SharePoint

As proven in the rule small above, I have used the information perspective produced at phase 2 and I have run a LINQ question against two details of the information perspective. The most important factor to get noticed in above rule small is noticeable with yellow-colored. I have instantiated an itemized text author (initialize with information file stream) and then I had set it as the Log residence of the data context. This will guarantee that any CAML produced from the LINQ question will be published by the author. Once the question gets implemented the CAML is thrown out in the information file (in my situation C:Caml.txt). So far producing any complicated CAML question you can first create its comparative LINQ question and then get the CAML from the log. Get the CAML from the LINQ query: After operating the LINQ to SharePoint question, you have got the CAML question in the log information file as is proven in phase 3. However, you need to perform a bit to create the CAML useful in SPQuery. The CAML produced from rule small 1 is proven below:

          <FieldRef Name="ContentTypeId" />

          <Value Type="ContentTypeId">0x0100</Value>



          <FieldRef Name="ProductContentTypeId" />

          <Value Type="Lookup">0x0100</Value>




    <OrderBy Override="TRUE" />



    <FieldRef Name="Title" />

    <FieldRef Name="ProductProductName" />



    <Field Name="ProductProductName" Type="Lookup" List="Product" ShowField="ProductName" />

    <Field Name="ProductContentTypeId" Type="Lookup" List="Product" ShowField="ContentTypeId" />



    <Join Type="INNER" ListAlias="Product">


        <FieldRef Name="Product" RefType="ID" />

        <FieldRef List="Product" Name="ID" />




  <RowLimit Paged="TRUE">2147483647</RowLimit>


Use CAML question in SPQuery: Now you have got the CAML and you want to use the CAML in SPQuery. The following rule small reveals how I’ve used the CAML (from rule small 2) in SPQuery:
SPQuery query = new SPQuery();
query.Query = @"<Where>
                        <FieldRef Name='ContentTypeId' />
                        <Value Type='ContentTypeId'>0x0100</Value>
                        <FieldRef Name='ProductContentTypeId' />
                        <Value Type='Lookup'>0x0100</Value>
                <OrderBy Override='TRUE' />";

query.ViewFields = @"<FieldRef Name='Title' />
                    <FieldRef Name='ProductProductName' />";
query.ProjectedFields = @"<Field Name='ProductProductName' Type='Lookup'
                                 List='Product' ShowField='ProductName' />
                          <Field Name='ProductContentTypeId' Type='Lookup'
                                 List='Product' ShowField='ContentTypeId' />";
query.Joins = @"<Join Type='INNER' ListAlias='Product'>
                    <FieldRef Name='Product' RefType='ID' />
                    <FieldRef List='Product' Name='ID' />

query.RowLimit = 2147483647;

var list = web.Lists["Orders"];
var items = list.GetItems(query);
foreach (SPListItem item in items)
    System.Console.WriteLine("{0}–{1}", item["Title"], item["ProductProductName"]);


Login/Register to Answer

Related Questions