How To: Create a Custom DocuSign Search Filter for the Envelope List
Use the custom DocuSign envelope list search filter to create a specific search for envelopes received, sent, drafted and deleted based on the folders within DocuSign. DocuSign only returns envelopes used in the last 30 days. To show envelopes older than 30 days, you must create a custom search filter with parameters to specify a date range. You generate the custom search filter using the DocuSign Envelope SmartObject list method which, as configured here, returns envelope activity for a specific time period.
Before You Begin
The DocuSign service type allows K2 to integrate with DocuSign. For more information on how to enable this integration see DocuSign Feature Activation.
Runtime Example
Scenario
You want to create a custom search filter based on the created, sent, deleted and drafted DocuSign envelopes. With this custom filter you can find envelopes created, sent, deleted and drafted using a From Date and To Date to specify a date range.
Steps
In this step, you create a new category to contain a form and view for the custom search filter.
- From the K2 Designer, locate and select the All Items folder. Right click and select New Category.
- Name this category DocuSign Management and click OK.
In this step, you create a new list view, add some fields and a table control to the view.
- Locate the Envelope SmartObject within the DocuSign category. Select Envelope and click the Design a new View option.
- On the General tab, name the view Envelope Search and ensure that you select the DocuSign Management category. Select the List View view type and uncheck the Call this method when the form loads check box.
Click Create.
- On the Layout tab, click Create Labels and Controls.
- On the Create Labels and Controls page, select the following fields:
- Email Subject
- Status Changed On
- Created On
- Completed On
- Owner Name
- Sent On
- Click OK.
- Drag a Table control onto the canvas. The control is available in the Layout section of the Toolbox.
- On the Insert Table page, change the Columns and Rows to 5 (five). Click OK.
- The table is added to the view.
In this step, you add controls to the view. You will use these added controls as the search fields on the list view.
- Drag a Label control onto the canvas. The control is available in the Display section of the Toolbox. Change the label name to lblFolder (in the Name field) and Folder (in the Text field).
- Drag a Drop-Down List control onto the canvas. The control is available in the Input section of the Toolbox. Change the Drop-Down List control name to ddlFolder (in the Name field).
- Drag two Label and two Calendar controls onto the canvas.
- Change the label controls as follows:
- Name - lblFromDate
- Text - From Date
- Name - lblToDate
- Text - To Date
- Change the calendar controls as follows:
- Name - clFromDate
- Name - clToDate
- Drag two Label and two Text Box controls onto the canvas.
- Change the label controls as follows:
- Name - lblOwnerName
- Text - Owner Name
- Name - lblOwnerEmail
- Text - Owner Email
- Change the text box controls as follows:
- Name - txtOwnerName
- Name - txtOwnerEmail
- Drag a Label and a Text Box control onto the canvas.
- Change the label control as follows:
- Name - lblSearchText
- Name - Search text
- Change the text box control as follows:
- Name - txtSearchText
- Select the Search Text cell and click on the Merge Cell to the Right button to create a longer field.
In this step, you configure the control properties.
- Select the Drop-Down list control by clicking on it. Click the ellipsis next to Type in the Data Source section of the control's properties.
- The Configure Data Source page shows. In the Use a SmartObject as data source section, click the SmartObject ellipsis to select the Folder SmartObject located within the DocuSign category. Click OK.
- Click the Display ellipsis and change the Display value to [Name]. Click OK.
In this step, you add a rule to the view.
- Click the Rules tab. Select the View executed Initialize rule and click on Edit Rule.
- On the then populate ddlFolder list control with data rule, click the configure link.
- Ensure the Populate List Control with Data page shows as below. Click Finish.
- Click OK to close the Rule Designer. The Envelope Search shows as follows:
In this step, you add a button control to the view.
- Select the Layout tab. Drag a Button control onto the canvas. The control is available in the Action section of the Toolbox.
- Change the button control as follows:
- Name - btnSearch
- Text - Search
In this step, you add a rule to the button control.
- Select the Search button by clicking it. Select the Rules tab and then click Add Rule.
- Select the Actions tab. Select the Execute a method on the View. Click the select method link and select List. Next you click the configure link.
- On the Execute the List Method page, expand the Envelope Search in the context browser and drag the Controls > ddlFolder > Folder > ID property into the Folder ID parameter. Click Finish.
- Locate the following fields from the context browser and setup the rest of the input mappings:
- clFromDate
- clToDate
- txtSearchText
- txtOwnerEmail
- txtOwnerName
- Click Finish to complete the configuration and save your changes.
- On the Rule Designer page, click OK.
- On the view designer page, click Finish.
In this step, you generate a form using the Envelope Search list view.
- Select the Envelope Search view and click Check In.
- With the Envelope Search view selected, click Generate Form.
- On the Generate Form page, click OK.
- The form is ready.
To change to the Lithium theme, you need to edit the form and navigate to the Theme property found under the Appearance heading and select Lithium.
In this step, you run the form and test out the custom search filter.
- Select the Envelope Search form and click Run.
- The Envelope Search form loads.
The following table explains the available options:Search Option Explanation Folder Use this drop down to select the Folder Property. Search Text Use this field to type additional details to refine your search. From Date and To Date Use the date fields to set a date parameter. Owner Name Use this field to specify a user within the DocuSign environment. Owner Email Use this field to specify a user email within the DocuSign environment. - Select and type values to build your search, and then click the Search button.