Setting up a qForm-based solution to perform default grouping and sorting is very simple. There are only two files that need to be updated in the qForm source and the result is a Catalog view organized according to your preferences. For the purposes of this document, we will assume that the file being edited is the original QdCatalogBase.xsn form included in the DBXL v2.2 installation.
Extract the source files for your 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.
Update QdTaskPaneData.xml
4. Open the file QdTaskPaneData.xml in a text editor such as Notepad.
5. Locate the TaskPaneData/View/OrderTab node. By default, the node’s contents are as follows:
<OrderTab>
<OrderOptions>
<Option value="">tp_select</Option>
<Option value="@my:name">tp_sort_option_name</Option>
<Option value="@my:author">tp_sort_option_author</Option>
<Option value="@my:description">tp_sort_option_description</Option>
</OrderOptions>
<SortBy1 isAscending="1"></SortBy1>
<SortBy2 isAscending="1"></SortBy2>
<SortBy3 isAscending="1"></SortBy3>
<GroupBy1></GroupBy1>
<GroupBy2></GroupBy2>
<GroupBy3></GroupBy3>
</OrderTab>
6. Add a line to the OrderOptions node. For example, we will add the following line to the OrderOptions node, which will add the document Status as an option in the sorting and grouping dropdowns.
<Option value="@my:status">Status</Option>
7. Add this value to the <SortBy1> or <GroupBy1>. This will establish the default sorting or grouping when the qForm is opened. Make these two modifications, below, which will result in the documents being sorted by Status and grouped by Author.
<SortBy1 isAscending="1">@my:status</SortBy1>
<GroupBy1>@my:author</GroupBy1>
8. Save and close the file.
Generate and test the modified qForm
9. Right click on manifest.xsf and select Design.
10. Select File > Save As and select a directory and name for the updated form.
11. In DAT, click on New Configuration. Attach the xsn file saved in the previous step and name it qFormSample. Click Save, then click OK in the confirmation dialog.
12. Click the Open link under the file attachment control. This will open the Catalog view of your form.
13. Click + Add Document to create a new forms. Note: Documents need to be assigned via the qForm taskpane in order for status assignments to work. For the purposes of this example, we create four document with the following values:

Result: The documents will be grouped by author and, within the Author groups, sorted by Status.