in

InfoPath Dev

DBXL v2.2 Getting Started

Downloads: 223 File Size: 431kB
Posted By: ErnestoM Views: 367
Date Added: 06-30-2008

For a fully formatted version of this document, please click the Download link above. Visual formatting has been toned down for html publishing. 

This short, post-installation tutorial will guide you through some common tasks so that you can quickly begin using Qdabra Database Accelerator (DBXL). The following tasks will use the ExpenseReport form that ships with InfoPath 2007.

Task 1: Prepare Sample Form – Expense Report

1. Customize the Expense Report sample.

a. Start InfoPath and select Customize a Sample.
b. Select Sample – Expense Report.
c. Click on Design this form.

2. Publish to your local machine.

a. Select File > Publish. InfoPath will prompt you to save the form.
b. Enter c:\ExpenseReport-old.xsn, or any location on your local hard drive, and click Save.
c. In the first screen of the Publishing wizard, select the radio button for To a Network Location.
d. Click Next.
e. Enter a path to publish to. For the purposes of this document, we assume c:\ExpenseReport2.xsn.
f. Click Next twice, and then click Publish.
g. Click Close to close the wizard.

Task 2: Attach a License

Before you can begin using DBXL, you must attach a license. Note that DBXL comes with a Trial license, so these steps should not be necessary. However, you may follow these steps to add a license you have purchased. Note that only members of DbxlAdmins are able to manage licensing.

1. Launch the DBXL Admin Tool (DAT).

a. Open Internet Explorer.

Note: Vista users need to run Internet Explorer as Administrator.
• You can run this process on a different machine, just make sure that http://<servername> is in the intranet or is set as an intranet site in the IE security settings.

b. Enter http://<servername>/QdabraWebService/forms/DAT/template.xsn in address field, where <servername> is the site DBXL is installed.
c. Click Go. The File Download dialog should appear.
d. If prompted, click Open. 

2. Configure the DBXL License.

a. Click on the Configure Licenses icon on the left hand side of the DAT header. The Licensing view will load.

b. In the Add License Pack table, click on Click here to attach a file under the License File column. Note that this field will only allow valid, base64-encoded binary data files.
c. In the Contact email column, enter the email associated with the License Pack you have selected.

 

d. Click on the Add License icon.
e. You will receive a dialog notification that says License Pack successfully added; click OK to dismiss it.

A table called Installed License Packs will display, showing the Serial number of the license, and the name and contact email, as well as the allowed number of Document Types and Documents. Also shown is the expiration date of the license.

If the license allows for the use of the Active Directory Web Service (ADWS), a second table will display showing the license granting permission for ADWS.

f. Click on Catalog to return to the catalog view of the DAT.

Task 3: Verify Installation Succeeded

1. Create a new configuration in DAT.

a. In DAT, click on New Configuration.
b. Type ExpenseReport2 into the Name field. This is the Document Type name.
c. Under InfoPath Form Template, click on Click here to attach a file.
d. Enter c:\ExpenseReport2.xsn and click Insert. The DAT will attach the XSN file.
e. Click Save. The DAT will confirm the operation through a dialog box. Click OK to close it.
f. Click Catalog.

2. Verify that you can open the form.

a. In the ExpenseReport2 row click the InfoPath icon under Open. The form will open and you will be able to fill it out.

b. Close the form.

Note: We will test submit in an upcoming task.

Task 4: Add Active Directory Lookup to your Form

Active Directory includes a wealth of information about your company’s organization. This task will show you how to auto populate fields in your InfoPath form with the email address and full name of the currently logged on user.

1. Open your form template.

a. In InfoPath, click on File > Design a Form Template.
b. Click on On My Computer in the left task pane.
c. Enter the path where you stored the newly created form, which is C:\ExpenseReport2.xsn, and click Open. ExpenseReport2 will open in Design mode.

2. Add the Active Directory Data Connection to your form.

a. Click Tools from menu and select Data Connections.
b. Click Add.
c. Select the radio button to Create a New Connection to and Receive Data. Click Next.
d. Select the radio button for Web Service. Click Next.
e. Enter the URL of the service: http://<servername>/QdabraWebService/ADUserInfo.asmx. Click Next.
f. Select the operation (Web Method) named GetMyInfo. Click Next.
g. Click Next. There is no need to check the checkbox of Store a copy of the data in the form template.

 

h. Click Finish, making sure that the Automatically retrieve data when form is opened is checked, and then click Close.

3. Change the Email Address field to auto-populate.

a. Double click on the Employee E-mail Address field in the view.
b. In the Default Value section, click on the fx button to the right of the field.
c. Click Insert Field or Group.
d. Select the GetMyInfo (Secondary) data source from the dropdown
e. Expand myFields/dataFields/tns:GetMyInfoResponse/GetMyInfoResult/ADProp
f. Select the Value node.
g. Click Filter Data.
h. On the Filter Data dialog, click Add.
i. Select Key in the first drop down.
j. Leave the second dropdown as is equal to.
k. In the third dropdown, select the option Type text, then type mail. Notice that InfoPath adds double quotes after you type and tab out.

l. Click OK five times to close the dialogs

4. Change the Name field to auto-populate. Note that these will be very similar to Section 3 above.

a. Double click on the Name field in the view.
b. In the Default Value section, click on the fx button to the right of the field.
c. Click Insert Field or Group.
d. Select the GetMyInfo (Secondary) data source from the dropdown.
e. Expand myFields/dataFields/tns:GetMyInfoResponse/GetMyInfoResult/ADProp
f. Select the Value node.
g. Click Filter Data.
h. On the Filter Data dialog, click Add.
i. Select Key in the first drop down.
j. Leave the second dropdown as is equal to.
k. In the third dropdown select Type text, and then type the text cn. Notice that InfoPath adds double quotes after you type and tab out.
l. Click OK five times to close the dialogs.

5. Save the form back to DBXL and verify the results.

a. Select File > Save, and then close the form.
b. Switch back to DAT and click the icon in the Edit column for the ExpenseReport2 Document Type row.
c. Attach the updated InfoPath form and click Save. Click OK to dismiss the confirmation dialog.
d. Click Catalog, and then click the InfoPath icon under Open for the ExpenseReport2 Document Type row.
e. Verify that the fields are auto-populating correctly.

Task 5: Add Database Submit

1. Open your form template.

a. In InfoPath, click on File > Design a Form Template.
b. Click on On My Computer in the left task pane.
c. Enter the path where you stored the form, which in our example is C:\ExpenseReport2.xsn, and click Open. ExpenseReport2 will open in Design mode.

2. Configure a Submit button to use the DBXL web service. (If your form, like the ExpenseReport sample, already has Submit button, skip steps a and b.)

a. Click Controls in the task pane.
b. Click and drag a button control and drop it in your form’s view.
c. Double click the button to display properties.
d. Click on Submit Options.
e. Click dropdown and select Web Service from the dropdown.

3. Add the Qdabra DBXL Web Service to the form.

a. In the Submit Options dialog, click the Add button to add a data connection.
b. Type in the location of the Qdabra DBXL Web Service in the format http://<servername>/QdabraWebService/DbxlDocumentService.asmx.
c. Click Next. InfoPath will contact the server.
d. In the list of web method operations, choose the web method to use for submitting the form, which is called SubmitDocument.
e. Click Next.

4. Configure the parameters.

a. Ignore the first parameter, called tns:docTypeName. It will default to the DocType of the form.
b. Select the second parameter, named tns:xml.

i. Under Parameter options select the Entire form (XML document, including processing instructions) radio button.
ii. Check the Submit data as a string checkbox.

c. Select the tns:name parameter.

i. Select the radio button Field or Group in the Parameter options section.
ii. Click the button next to the Field or Group text box. The Select a Field or Group dialog will appear.
iii. Select the expenseReport/employee/name field and click OK.

d. Select the tns:author parameter

i. Select the radio button Field or Group in the Parameter options section
ii. Click the button next to the Field or Group text box. The Select a Field or Group dialog will appear.
iii. Select the expenseReport/employee/emailAddress node and click OK.

e. Select the tns:description parameter.

i. Select the radio button Field or Group in the Parameter options section
ii. Click the button next to the Field or Group text box. The Select a Field or Group dialog will appear.
iii. Select the expenseReport/purpose node and click OK.f. Click Next. Click Finish. Click OK. Click OK.

5. Save the updated form.

a. Click Save on the File menu.
b. Close the form.
c. Click Edit Configuration for ExpenseReport2 in DAT.
d. Attach the updated form and click Save.

6. Verify Submit works.

a. Click on the Document tab, and then click New.
b. Fill out the form including the Business Purpose, Employee Name, and Employee Email Address fields. When done, click the Submit button.
c. Click Refresh in DAT. The new document is added with the Name, Author, and Description data populated from the Document tab.

Task 6: Specify a Reference ID for your Form

1. Open the DBXL Administration Tool (DAT).
2. Click on the Edit button for the Document Type ExpenseReport2.
3. Change the Base Reference # under the Ref. ID table.

 

4. Click on Save. A dialog will confirm that the changes were saved. Click OK.
5. Click on Catalog.
6. Open a new form by clicking the Open icon for Document Type ExpenseReport2.
7. Fill out the form and submit it using the Submit button.
8. Click on the Edit button of the Document type ExpenseReport2 in DAT.
9. In the General tab, verify that Base Reference # has increased.
10. Click on the Documents tab, where you can check the Ref. ID number for each document submitted.

Task 7: Add “My Forms” Web Part to a SharePoint Web Page

SharePoint 2003

1. Add the new MyForms Web part to a page.

a. Open your local SharePoint site and click on Create in the top menu.
b. Under Web Pages click on Web Part Page.
c. Enter the Name of the web part page, select Full Page, Vertical in Choose a layout template, and click Create.
d. In the Web Part List click Filter, then select Web Parts in the Show dropdown.
e. Drag and drop MyFormsWebPart into the body of Web Part page placeholder area.

2. Configure the MyForms Web Part.

a. Click the small triangle at the top right of the MyFormsWebPart and select Modify Shared Web part.
b. Change the Web Service URL to point to the DbxlDocument Web Service for your DBXL installation (http://<server>/QdabraWebService/DbxlDocumentService.asmx).
c. Click Apply. This will create the link to your DBXL installation.
d. Select the Document Type for the Expense Report template you deployed to DBXL.
e. Uncheck Show only my documents and click OK.

SharePoint 2007

1. Add the new MyFormsWebPart to a page

a. Click on Site Actions and then click on Create.
b. Click on Web Part Page under Web Pages.
c. Enter the name of the new web part page.
d. Under Choose a Layout Template select Full Page, Vertical and then click the Create button.
e. Click Add a Web part.
f. Under the Miscellaneous category, select the checkbox for MyFormsWebPart and then click the Add button.

2. Configure the My Forms Web Part

a. In the MyFormsWebPart title bar click Edit and then click Modify Shared Web Part.
b. Change the Web Service URL to the correct URL for your instance of DBXL. Click Apply.
c. Select the Document Type for the Expense Report template you deployed to DBXL and uncheck Show Only My Documents. Click OK.
d. Click on Edit in the MyForms Web part and click Modify Shared web part.
e. Click on the + sign next to Appearance and change the value in the Title text box to Expense Report.
f. Scroll up to the Column Display Selector area and uncheck all the checkboxes for the columns you do not want to see. Change the ordering of the columns as desired and click OK when finished.  

Task 8: Setup a button on SharePoint to open your form

These instructions are written for SharePoint 2007. The steps are similar for SharePoint 2003.

1. Navigate to the Expense Report web part page created in the previous task.
2. Click Site Actions, and then select Edit Page.
3. Click Add a Web part. Select Content Editor web part under the Miscellaneous category. Click the Add button.
4. Click the Edit button of the Content Editor Web Part and click Modify Shared Web Part.
5. Click the Source Editor button
6. Copy the following text and paste in the source editor window.

<script>
var strTemplate = "
http://<server>/qdabrawebservice/Forms/expensereport2/template.xsn";
var strSaveLocation = "
http://<server>/qdabrawebservice/Forms/expensereport2";
 
function CreateNewRequestForm()
{
    // Based on WPQ3combineDocuments()
    var objOpenXMLDoc = new ActiveXObject("SharePoint.OpenXMLDocuments.1");
    var bSuccess = false;
    bSuccess = objOpenXMLDoc.CreateNewDocument(strTemplate, strSaveLocation);
}
 
</script>
<input id="btnCreateExpenseReport" onclick="CreateNewRequestForm()" type="button"
value="Create ExpenseReport" name="btnCreateExpenseReport">

7. Modify the URLs in strTemplate and strSaveLocation by replacing <server> with the machine name DBXL is installed, and click the Save button.
8. Click the + sign next to Appearance and in the Chrome Type dropdown select None, and then click OK in the configuration pane.
9. Click on Exit Edit Mode, and then click on the Create ExpenseReport button you just added. Your form corresponding to this Expense Report Document type will open.

Filed under:

Comments

No comments exist for this file.
Copyright © 2003-2007 Qdabra Software. All rights reserved.
View our Terms of Use.