Follow

How to generate custom file name

Applies To: Information Worker for SharePoint 2013/2016 and Cloud

 

In some cases it is required to design PDF form which must rely on completely unique naming pattern - for example using information from fields of the PDF form.

The main idea behind this guide is to demonstrate how to create custom name for PDF form by using custom server function which combines several different fields' values.

Step 1 - Create empty server function

Creating Server rule by clicking on "Add rule or function" in Rules tab of Designer Options section:
addrule.PNG
Make sure that Return Type is set to Text:
returntype.PNG

Step 2 - Add rules to generate custom name

Designing of naming logic inside created Server rule:

In this case newly submitted form' name will contain values from "FirstName", "LastName" and "Date" fields:
rule.PNG

How to build:
1. Add Action "Return Value" from the list of available actions;
2. Set function "Concentrated texts" for return value;
3. Set function "Concentrated texts" for already existing "Concentrated texts" - in this example second parameter is selected;
4. Assign values of your PDF fields for First Name and Last Name as "Concentrated texts" parameters;
5. For date first pick function "Format datetime value to string" and pass your Date field value as first parameter and date pattern as second parameter.
Note: do not use date format with "/" symbols for form naming.

Step 3 - Configure file naming

Assigning rule as naming option:
Open Designer SharePoint section and click on "Reassign" for "Name" column:
reassignname.PNG
Switch to "Advanced Mode" and use created function from step 1 as naming source:
namingsource.PNG
Once added - click on "Apply custom mapping" button.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk