in

InfoPath Dev

How to customize Status values in qForm

Downloads: 31 File Size: 80kB
Posted By: ErnestoM Views: 99
Date Added: 08-19-2008

A solution based on Qdabra’s qForm (QdCatalogBase.xsn) includes Status workflow in the taskpane, consisting of the following values: Saved, Submitted, Reviewed, Approved, Rejected and Closed. These may not be compatible with your needs, but they are easily customizable when designing your solution.

Extract the source files for qForm

1. Navigate to C:\Inetpub\wwwroot\QdabraWebService\install and right-click on QdCatalogBase.xsn. Select Design.
2. Select File > Save As Source Files, and select an output directory for the source files.
3. Close InfoPath.

Modify the language files

4. Navigate to the folder where the source files were saved and open QdCurrentLanguage.xml in a text editor such as Notepad.
5. Find the section that contains the status values, which looks like this:

<tp_status_saved></tp_status_saved>
<tp_status_submitted></tp_status_submitted>
<tp_status_reviewed></tp_status_reviewed>
<tp_status_approved></tp_status_approved>
<tp_status_rejected></tp_status_rejected>
<tp_status_closed></tp_status_closed>

6. Add a new line. For this example, we will add a status value called Proposed, with a line that will look like this:

<tp_status_proposed></tp_status_proposed>

7. Save and close QdCurrentLanguage.xml.
8. Open QdCurrentLanguage.xsd in a text editor such as Notepad.
9. Find the section that contains the status values, which looks like this:

<xs:element name="tp_status_saved" />
<xs:element name="tp_status_submitted" />
<xs:element name="tp_status_reviewed" />
<xs:element name="tp_status_approved" />
<xs:element name="tp_status_rejected" />
<xs:element name="tp_status_closed" />

10. Add a new line. For this example, since we will add a status value called Proposed, the line will look like this:

<xs:element name="tp_status_proposed" />

11. Save and close QdCurrentLanguage.xsd.
12. Open QdLanguageSource.xml in a text editor such as Notepad.
13. Find the section that contains the status values, which looks like this:

<tp_status_saved>Saved</tp_status_saved>
<tp_status_submitted>Submitted</tp_status_submitted>
<tp_status_reviewed>Reviewed</tp_status_reviewed>
<tp_status_approved>Approved</tp_status_approved>
<tp_status_rejected>Rejected</tp_status_rejected>
<tp_status_closed>Closed</tp_status_closed>

14. Add a new entry. For this example, the line that will look like this:

<tp_status_proposed>Proposed</tp_status_proposed>

15. Save and close QdLanguageSource.xml.
16. Open QdLanguageSource.xsd in a text editor such as Notepad.
17. Find the section that contains the status values, which looks like this:

<xs:element name="tp_status_saved" />
<xs:element name="tp_status_submitted" />
<xs:element name="tp_status_reviewed" />
<xs:element name="tp_status_approved" />
<xs:element name="tp_status_rejected" />
<xs:element name="tp_status_closed" />

18. Add a new entry. For this example, the new line will look like this:

<xs:element name="tp_status_proposed" />

19. Save and close QdLanguageSource.xsd.

Note that you should not change existing strings, but instead add new ones with the customized text, as we have done in these steps.

Modify QdConfig.xml

20. Open QdConfig.xml in a text editor such as Notepad.
21. Find the section that contains the status values, which looks like this:

 <StatusOptions>
  <Status isClosed="false" value="Saved">tp_status_saved</Status>
  <Status isClosed="false" value="Submitted">tp_status_submitted</Status>
  <Status isClosed="false" value="Reviewed">tp_status_reviewed</Status>
  <Status isClosed="false" value="Approved">tp_status_approved</Status>
  <Status isClosed="false" value="Rejected">tp_status_rejected</Status>
  <Status isClosed="true" value="Closed">tp_status_closed</Status>
 </StatusOptions>

22. Add a line within the <StatusOptions> node, above the line for the Saved status, which will look like this:

<Status isClosed="false" value="Proposed">tp_status_proposed</Status>

Note that the isClosed value determines whether documents with that status value will be shown in the Catalog view. For example, documents with status Closed are by default not shown in the Catalog.

23. For illustration purposes, comment out the line for Saved status. It will look like this:

<!--<Status isClosed="false" value="Saved">tp_status_saved</Status>-->

24. Save and close QdConfig.xml.

Save and test the modified qForm

25. Right click on manifest.xsf and select Design. Click on File > Save As and enter a new form name.
26. In DAT, click on New Configuration. Attach the xsn file saved in the previous step and name it. Click Save, and then click OK in the confirmation dialog.
27. Click the Open link under the file attachment control. This will open the Catalog view of your form.
28. Click + Add Document to create a new forms. In the status dropdown in the taskpane, Saved has now been replaced with Proposed.

Filed under: ,

Comments

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