Wrox Real World Sharepoint 2010 – Chapter 10

[Chapter 10: Automating Business Processes]

Infopath form is completely based on XML. InfoPath Designer – for designers; InfoPath Filler – by end users to fill out the form.

InfoPath can be used independently of Sharepoint. Form templates can be placed on a network drive or on intranet; user can get them and fill them out. Or, forms can be sent directly user’s mail inboxes, where they can fill out in Outlook 2010 and submit it back.

Form templates – usually consists of labels and controls through which you want o accept user inputs. These elements are best arranged in table.  InfoPath Designer allow you to use a Rule Engine to decide how the controls should behave. Three types of rules that can be created:
(1) validation – validating
(2) Formatting – changing format of a control
(3) Action – such as setting a field’s value, submitting data…

You can quickly start incopporating rules in your form by using Quick Rules.  Think of Quick Rules as a wizard. Or you can start from scratch by clicking “Manage Rules”. InfoPath Form ends with *.xsn. Publishing and sharing the Form via Sharepoint is the recommended option, because the Sharepoint framework provides a multitude of built-in options to support the form process. When the form is published to Sharepoint, it can utilize all the base features available, such as versioning, check in-out, attach to workflow etc. An added feature is Merge View, that let’s you merge the information of multiple instances of the filled-out forms.

07/17/2011, 11:25PM, Page 341

When the user fills out and saves the form (inputs), it is saved as an XML file, which has a pointer pointing to the original InfoPath form (*.xsn). Options to send the form input back:
(1) email, (2) to a Sharepoint library, (3) to s predefined connection in Sharepoint and (4) to a web service.  Page 344

*** Using Sharepoint Designer to build SP Solutions — SPD’s work begins with Site COllection. You cannot create a site collection with SPD.

Side note about external content type: Just data sources that connect to external databases; to create a ECT is to create a connection to a database and set up read/write/execute options. After that you can create a Sharepoint list based on this new connection. Not that you have to go to Sharepoint Admin to set the permission for this ECT – or else you get a Access Denied by BDC error when you want to browse the list (called external List)> This is where to set the permission:
Central Admin –>Application Management –> manage service Application –> click “BDC service” –> Locate the ECT –> Right click the item and select “set permission”.

** Combining InfoPath and Sharepoint Designer: Practice:
(1) A training request form is esigned and published to a new forms lib called Training Requests
(2) Visio is sued to model a workflow for routing the training request form, and the workflow is exported.
(3) The exported workflow file is imported into SPD and attached to the training Requests library.
(4) Workflow rules are configured within SPD and published.

When you rename a control in InfoPath, always use Pascal – such as TrainingRequested because Sharepoint recognize this format and will break the words for you  when needed.

Two ways to mark a InfoPath field “required”
(1) select the field, and in the Ribbon (“Control Tools/Property”), check “Cannot be blank”.
(2) Quick Rules – select the control, from ribbon Add Rules –> Is Blank –> Show Validation Error.

You can copy/paste a rule from one InfoPath control to another — after you copy them you can modify them to fine tune it.

**** iMPORTANT
**** When you create a InfopathForm, and define adata source that retrieves a list of items such as (Product Names) and use it to populate a drop down box, you might get an erro rmessage when you preview the form: Infopath doesn’t support cross domain……

You need to do this to get rid of this error: File –>Advanced Form Options –> Security and Trust –> Select Full Trust.

*** Another important note: If your trust level is set to Full Trust (becuse you need to test it/preview it in InfoPath), you need to change it back to “Domain” (allow access to all resources in the same domain) before you publish it. or else you get an weird message that says the form has to be approved by an admin first….. change it back and the warning will go away.

Once you publish it, you can go to the form library (“Taining Request”) fill out the form by : Documents –> New Document.

07/18/2011, 11:51PM, Page 358

You need to export the data connectons to Sharepoint Server (create a Data Connection Library, or DCL, first). In InfoPath, Manage Data Connections –> Convert to Data Connection File

Best practice designing InfoPath Form and data connection libraries:
1. Create data connections locally first using infoPath (*.odc) and then convert/export them to Sharepoint server under a data connection library.
2. When Designing Infopath form control (such as a drop down) populate the drop down by associating it with a data connection that is saved on Sharepoint server, not a local one.
3. When the form is published, the form will automatically use the data connection files in the DCL.

SPD can be used to create the following workflows:
(1) list workflow – simplest. meant for a specific list or library and are not portable.
(2) Reusable – very portable. Can be used to attach to a content type, which can then be used in other lists/libraries. Reusable workflow can be packaged and deployed to other site collections.
(3) Site workflows – deployed to a site and work on all site components when execute.

 When you import VISIO workflow design file (VWI) into SPD, you need to decide which list/library to attach it to, or make it a reusable workflow so you can configure it later. Important step because you cann’t change it later.

07/19/2011, 08;19PM, Page 375

Post a comment or leave a trackback: Trackback URL.

Leave a comment