Quantcast
Channel: Nick Hurst – SharePoint and Nintex OOTB
Viewing all 44 articles
Browse latest View live

SharePoint remove commas from number fields

$
0
0

In some instances you don’t want number fields to display with comma’s in SharePoint views. Unfortunately there is no setting to not display comma’s on number fields.
SharePoint-remove-commas-16-1

Use Calculated field to remove comma’s from number field

For this example I’m going to display a number column (Alias) in a calculated field (Alias Calculated).
Create a calculated field, and for the

SharePoint-remove-commas-16-2

**Do not copy and try to paste this formula, type it in your calculated field and make sure to use the Insert Column option.

2. Type in the following formula:
=text(

Then double click on your number field in the Insert Column box

then type:
,”0″)

Your formula should display something like this: =text([Alias],”0″)
SharePoint-remove-commas-16-3

Choose a number field, with 0 decimal places and click OK.

SharePoint-remove-commas-16-4

This should display your number column without the commas while retaining the benefits of using a number field (field validation & sorting):
SharePoint-remove-commas-16-5

*If you save the number as in the Text format type, sorting will not work correctly.


Nintex Forms Calculated Value Examples

$
0
0

Calculated Value Controls can be used for a variety of purposes, some of the most common uses include:

  • Displaying user profile values
  • Formatting dates and times
  • Calculated dates
  • Calculated numbers
  • Combining form field values together (inside & outside of repeating sections)
  • Displaying other columns from lookup lists
  • Conditionally populate a field value (e.g. If Status equals approved, then populate Approved By with Current User and Approved On with Current Date)

When using Current User of Current Date

If you are using the Current Date, Current User or Current Time references in a calculated value formula:
NF-Calculated-Value-Examples-16-2
In the vast majority of cases you want to set the calculated value to only Recalculate on new mode as usually you are referencing the person who submitted the form or the date/time the form was originally submitted.
NF-Calculated-Value-Examples-16-3

This ensures that the formula only runs on New Form submissions.  If you recalculate on View or Edit Mode the Current User or Current Date/Time used in your formula will change as people view or edit the form.


Displaying user profile values

Using the userProfileLookup function you can display a selected person’s preferred name, department, title, work phone,work email, etc:
NF-Calculated-Value-Examples-16-1
For complete instructions on how to use the userProfileLookup function view this tutorial.


Formatting dates and times

Both Date fields on Nintex forms and the Current Date reference display in the full date, time, and time zone format.  To format dates to display differently you have to use the formatDate() function:
NF-Calculated-Value-Examples-16-4

Or to format times, the DateTimeField is a Date and Time field on the form:
NF-Calculated-Value-Examples-16-5

Or you can format both the date and time from a Date/Time field:
NF-Calculated-Value-Examples-16-6

If you want to display the Current Date and Time in the same field, you will need to reference and format both fields in the Formula.
*Note, the + combines  the references and the ” “ puts in a space between them
NF-Calculated-Value-Examples-16-7

See the Nintex Forms formatDate formats tutorial for more formatting options.


Calculated dates

dateAddDays()

If you are doing a calculation and displaying a date, you will usually need to combine the formatDate() function with your calculation.  The dateAddDays() can be used to add days to a selected date field.
NF-Calculated-Value-Examples-16-9

OR the dateAddDays() can be used to subtract days from a selected date field.  Note that the second value in the dateAddDays() function can either be a field reference or a static number.
NF-Calculated-Value-Examples-16-11

dateDiffDays()

You can also use calculated fields to show the difference between two date fields, or the difference between the current date and a date field.
NF-Calculated-Value-Examples-16-10


Calculated numbers

For number calculations, you can use the regular math operators (+, -, *, /).
NWF-Calc-Value-Examples-16-8

To specify order of operation, use brackets.
NWF-Calc-Value-Examples-16-9


Combining form field values together

You can combine multiple form field values together using the + operator.
NWF-Calc-Value-Examples-16-1
You can add spaces or text in quotes.
NWF-Calc-Value-Examples-16-2
Or runtime functions as well.
NWF-Calc-Value-Examples-16-3

**Combining fields together is a good way to create a meaningful title for the form:
Creating a Calculated Title for Nintex Forms


Displaying information from linked lookup lists

List lookup fields on your form return the looked up item with both the items ID and then the value displayed in the dropdown box (usually the Title field for that item):
NWF-Calc-Value-Examples-16-5

parseLookup()

Use the parseLookup function to return the column value (true)
NWF-Calc-Value-Examples-16-6
OR item ID (false)
NWF-Calc-Value-Examples-16-7

Lookup()

You can display other field values from the item selected in the List lookup fields too.  Use the lookup function with the format:
lookup(lookup list title, ‘ID’, named control, lookup column name to display)
NWF-Calc-Value-Examples-16-4
In the example above the lists title that is being looked up is ‘Items List’ and the column in the Items List which we are displaying the value for is named ‘Price’.


Conditionally populating field values

If()

You can conditionally populate a field value as well, for example if you want the title to be different for different request types.  Use the If() function with the format:
If(condition to test, value if true, value if false)
NWF-Calc-Value-Examples-16-10

If(If())

You can nest if statement if there is more than one condition to test, format is:
If(condition1 to test, value if true, If(condition2 to test, value if true, value if false))
NWF-Calc-Value-Examples-16-11

Populate a field conditionally

You can also populate a field conditionally, for example you can populate an Approved By field with the Current User and Approved On field with the Current Date if someone selects Yes on the Approve Request field on the form.  This is a little more complicated because you would only want these fields populated once (not every time an approved item is edited).  See the Get Current Person Date of person who completed form section tutorial (tutorial coming soon).

New Task list for Nintex Workflow tasks

$
0
0

Some Nintex workflow actions create tasks on the SharePoint site, for example both the Assign Flexi task and Request Approval actions create tasks. These tasks are by default created on the sites ‘Workflow Tasks’ list. If you would like all the tasks for a specific workflow to have it’s own tasks list, you can setup the Nintex Workflow to create it’s own Task list.

**Even Lazy Approval Flexi Tasks still create actual tasks on the site, the task list can be a great resource to review active tasks (i.e. tasks that have not been completed) or to review who approved which task and when.

How to Create a new Nintex Workflow Task list

1. Open the existing workflow, click on the Workflow Settings option.
Workflow-New-Task-List-15-1
2. Scroll down to the Task list section, select Create new… from the dropdown. Enter a name for the new task list for this workflows tasks.
Workflow-New-Task-List-15-2
3. Save the workflow settings, publish the workflow.

4. Once the workflow has been published, the task list can be found on the site. Just click on ‘Site Contents’ in the site left navigation, then scroll down to find your new WF Tasks list:
Workflow-New-Task-List-15-3
**All tasks created by that workflow will now be created in this new workflow tasks list.

Persons name vs login name in NWF emails

$
0
0

SharePoint list and libraries store people picker columns (i.e. Created By, Modified By, Assigned To, etc) values as the person’s claims based login name to ensure each value is unique. If you are using a Nintex Workflow and try to populate a text field or include one of the people picker fields in the email body, their login name will display. Take a look at the Nintex Workflow example below, the email has the ‘Created By’ field reference in it, but when the email is sent it’s displaying the login name:
Nintex-WF-People-names-15-1

Get a Persons display name in Nintex Workflows

To get a person’s name to display in a workflow email instead of their login, you will need to create a workflow variable and populate that variable with the person’s user profile name.

**If you have Nintex Workflow Enterprise edition, there is a ‘Query User Profile’ action which can be used instead of the ‘Set variable’ action displayed below.

1. Either create or edit an existing Nintex Workflow. Add a Set variable action to the workflow.
Workflow-Username-15-1

2. Double click on the action to configure the action, click on the Variables icon.
Workflow-Username-15-2
3. Click on the New icon on the Workflow Variables popup window, then enter a Name for the Variable. Click the Save button which will close the window. Then click the Close button which will close the window and return you to the Configure Action – Set variable window.
Workflow-Username-15-3

4. A. Now you can choose your variable in the Set dropdown field.
B. Choose User Profiles from the Equals dropdown menu.
C. Choose Name from the Source dropdown menu.
Workflow-Username-15-4
5. Click on the Insert Reference icon, on the Insert reference popup window click on the Item Properties tab. Choose the people field which you want to get the Name for. In this example we are going to use the Created By field. Click the OK button to close the popup window.
Workflow-Username-15-5
6. Your finished set variable action should look similar to the example below. Click on the Save button.
Workflow-Username-15-6
7. Add a Send notification action to the workflow beneath the set variable action.
Workflow-Username-15-7
8. The person’s name can either be inserted into the Subject field, or in the email Body. Do not insert the workflow variable into the To, CC, or BCC field. The variable is only the display name, it might not be unique like the people field is.
Workflow-Username-15-8

In this example, click in the email body where you want the persons name to appear. Then click on the Insert Reference icon.

9. On the Insert Reference popup window, click on the Workflow Variables tab, click on your workflow variable you created. Click the OK button to close the Insert Reference popup window.
Workflow-Username-15-9

10. Your send notification action should look similar to the example below, with your workflow variable listed in either the Subject or email Body field:
Workflow-Username-15-10
11. Add descriptive names to your workflow actions, then Publish your workflow.
Workflow-Username-15-11

Finished Product: The workflow email now displays the name of the person instead of their login:
Workflow-Username-15-12

Runtime Function examples for Nintex Forms

$
0
0

There are two types of functions in Nintex forms, ‘Runtime functions’ which run while the form is open and ‘Inline functions’ which run before the form is opened.  Runtime functions are used both for Calculated Value control formulas and for Rule formulas.

The following are a list of common Calculated Value runtime functions, see the rule examples tutorials if you are looking for form rule examples.  This list is in alphabetical order.


dateAddDays()

If you are doing a calculation and displaying a date, you will usually need to combine the formatDate() function with your calculation.  The dateAddDays() can be used to add days to a selected date field.
NF-Calculated-Value-Examples-16-9

OR the dateAddDays() can be used to subtract days from a selected date field.  Note that the second value in the dateAddDays() function can either be a field reference or a static number.
NF-Calculated-Value-Examples-16-11


dateDiffDays()

You can also use calculated fields to show the difference between two date fields, or the difference between the current date and a date field.
NF-Calculated-Value-Examples-16-10


If()

You can conditionally populate a field value as well, for example if you want the title to be different for different request types.  Use the If() function with the format:
If(condition to test, value if true, value if false)
NWF-Calc-Value-Examples-16-10


If(If())

You can nest if statement if there is more than one condition to test, format is:
If(condition1 to test, value if true, If(condition2 to test, value if true, value if false))
NWF-Calc-Value-Examples-16-11


Lookup()

You can display additional field values from the item selected in a List lookup field on your form.  Use the lookup function with the format:
lookup(lookup list title, ‘ID’, named control, lookup column name to display)
NWF-Calc-Value-Examples-16-4
In the example above the lists title that is being looked up is ‘Items List’ and the column in the Items List which we are displaying the value for is named ‘Price’.


parseLookup()

List Lookup fields return both the Items ID and value (2;#Paper Towels).  Use the parseLookup function to either return the column value (true)
NWF-Calc-Value-Examples-16-6
OR item ID (false)
NWF-Calc-Value-Examples-16-7


userProfileLookup()

Can lookup profile values for the specified people picker field or current user.
NF-Runtime-example-16-1
**See the list of Nintex Forms User Profile Values

Formula Examples

$
0
0

Examples of SharePoint Calculated fields, Nintex Form Rules, Nintex Form Calculated Values, and Nintex Runtime Functions or Formulas.


SharePoint Calculated Field formula examples

This article has examples of date and time formulas, mathematical (number field) formulas, and text formulas.

Nintex Forms Rule Formula Examples

These are examples of rules that can hide, disable, or validation fields on Nintex forms.  The article includes examples of rule formulas for text, number, choice, checkbox, and date/time fields.  It also has links for how to validate field formats and check attachment fields.

Nintex Forms Calculated Value control examples

Topics covered include; Displaying user profile values, Formatting dates and times, Calculated dates, Calculated numbers, Combining form field values together, Displaying columns from lookup lists, and conditionally populating a field value.

Nintex Forms Runtime Function examples

This tutorial contains a list of  Runtime Function examples that are used in Calculated Value Controls.

 

 

Alerting Blog author when comments are added

$
0
0

SharePoint blogs allow people to comment on blog posts but unfortunately the blog author is never alerted when a comment to their post is added. Using a Nintex workflow you can add that functionality to a SharePoint blog.

1. First we will create a new column on the ‘Posts’ list so the post author can choose whether to be notified when new comments are created or not. To do this, go to the Site Actions gear in the top right, and click on the ‘Site Contents’ option. On the Site Contents page you can hover over the Posts list, click on the ellipses, and choose settings.
Workflow-Comment-Notification-14-1
2. Once in the Settings of the Posts list, click on the ‘Create column’ link under the columns section. Create the column so Name: Comment Notification, Type: Choice (menu to choose from), Description: Would you like be notified of comments on this post?, Require: Yes, Choice: Yes No, Display choices using: Drop-Down Menu.
Workflow-Comment-Notification-14-2
3. We now need to create the workflow on the Comments list. To do this return to the Site Contents page and this time click on the ‘Comments’ list. On the Comments list click on the List tab then select Create a Workflow in Nintex Workflow from the Workflow Settings dropdown.
Workflow-Comment-Notification-14-2b
4. Since the Workflow is on the Comments list, we need to first query the posts list to get information about the post the comment has been added to. To do this add a Query list action to the Workflow.
Workflow-Comment-Notification-14-3
5. Click the dropdown next to the Query list action and select configure. On the Configure Action screen do the following:

A. Select the Posts list from the dropdown
B. In the filter section, choose the select items only when the following option.
C. Change the dropdown to the ‘ID’ column
D. Click on the Insert Reference Icon in the is equal to filter box.
E. Select the Item Properties Tab
F. Select the Post ID column. Click OK which should populate the is equal to filter box with the Post Id reference.
Workflow-Comment-Notification-14-4
6. In the Sort section of the Configure action screen, in the Field dropdown select the Comment Notification field and click the Add button. Then choose the Created By field and click the Add button. The two fields you just added will be displayed beneath the Field dropdown section, but if you click on them you will not have any options:
Workflow-Comment-Notification-14-5
7. We now need to create Variables to store the Comment Notification and Created By values in. At the top of the Configure Action screen, click on Variables. Then click on New in the Workflow Variables screen. And finally enter a name for the Comment Notification Variable and make it single line of text, click on Save to create the variable.
Workflow-Comment-Notification-14-6
8. Repeat those steps to create a single of text varialbe for Created By as well. Once you have both variables created like shown below, click on the Close button to close the workflow variables screen.
Workflow-Comment-Notification-14-7
9. Now set the Comment Notification and Created By fields to populate your two new variables. Once completed your Configure Action screen should look like this:
Workflow-Comment-Notification-14-8
10. We will now add a condition to check whether the post author chose to be notified of comments are not. To do this Add a ‘Set a condition’ action to your workflow.
Workflow-Comment-Notification-14-9
11. Configure the action so the Condition selection is ‘If any value equals value’, Where ‘Workflow Data’ ‘VarCommentNotification, and for Value just type in ‘Yes’.
Workflow-Comment-Notification-14-10
12. Under the Set condition action on the Yes side, we are going to create a ‘Set variable’ action to get the display name of the person who created the comment for our email. If we just used the ‘Created By’ field, this would return the users fully qualified login name instead of their display name.
Workflow-Comment-Notification-14-11
13. Configure the Set variable action, and then click on the Variables option. On the Workflow variables screen Click on the New icon and create a new single line of text variable for the Created By Name. Once your variable has been created click Close.
Workflow-Comment-Notification-14-12
14. On the Configure action screen, Set ‘VarCreatedByName’, Equals ‘User Profiles’, Source ‘Name’, Equals Value: click on the Insert Reference icon and find the ‘Created By’ field reference. Please see the Getting User Profile values article if you have questions on this step. Once your action looks like the one below, click Save.
Workflow-Comment-Notification-14-13
15. The last action will be to ‘Send notification’ to the Post Created By person.
Workflow-Comment-Notification-14-14
16. Configure the Send notification action, for the To section click on the Phone book. Then on the Select people and groups screen expand the ‘Lookup’ section and choose the VarCreatedBy Workflow variable.
Workflow-Comment-Notification-14-15
17. Enter a Subject for the email, I’d recommend including the Title field reference in the subject so the post author knows what post the comment is in reference to. Then add the text and field references in the body so it looks like the example below. Once the send notification action is setup, click on the Save button.
Workflow-Comment-Notification-14-16
18. The final step is give the workflow a name, description, and set the start condition for the workflow. Click on the Workflow Settings icon, Type in a Title, Description, and for Start when items are created: choose the Yes option. Save your settings and Publish the Workflow.
Workflow-Comment-Notification-14-17
** It’s a good idea to edit the actions to add descriptive titles to each of the actions while they are fresh in your mind. This way it’s obvious what each action does for anyone else looking at this workflow.
Workflow-Comment-Notification-14-18

Finished Example: Now when someone adds a comment to a blog post, the person who created the blog post will be notified via email:
NWF-Blog-Comments-new-16-1

Preventing Duplicate Nintex Workflow Emails

$
0
0

Duplicate emails can sent out when a workflow is set to start when an item is modified and you are not checking to see if that same email has already been sent out. To prevent duplicate emails from being sent out each time the item is modified, either:

A. Only start the workflow when items are created. For example if you have confirmation email that just needs to be sent out when a new item is created, create a workflow that only starts when an item is created. If you try to combine the confirmation email into a workflow that also starts when items are modified, the confirmation email will get sent every time the item is modified.

B. Create a hidden column to check if email has already been sent or not. For workflows that start when items are modified, it’s advisable to create a hidden column on the list/library to record whether an email is sent or not.

Create hidden column for email confirmations

1. Go to the list or library that the workflow is on. Click on the List/Library tab and select the List/Library settings icon. Once on the List Settings page, click Create column link under the Columns section:
Nintex-Workflow-Emails-15-3

2. Column Name: enter a descriptive title for the type of email, Type of column: choose the Choice option, Required: No, Type Choices: No Yes, Using: dropdown, Default Value: No, uncheck the add to default view option:
Nintex-Workflow-Emails-15-4

**After you have your new column all setup, click on the OK button to create the column and return to the list/library settings page.

3. Next click on the Advanced settings link on the list/library settings page:
Nintex-Workflow-Emails-15-9

4. Select Yes for ‘Allow management of content types’. Click on the OK button to return list/library settings page.
Nintex-Workflow-Emails-15-10
5. On the list/library settings page click on the content type that is displayed in the Content Type section. Depending on the type of list or library, this could be ‘Task’, ‘Item’ or ‘Document’.
Nintex-Workflow-Emails-15-11
6. The new column you just created should be displayed along with an ‘Optional’ Status. Click on your new column.
Nintex-Workflow-Emails-15-12

7. Select Hidden from the column settings options.
Nintex-Workflow-Emails-15-13

**Your new column is now on the list and will be hidden from when people are creating, editing or viewing items. You can now return to your list or library.

8. Once you have the hidden column on your list/library, the next step is to create a Nintex Workflow on the list or library. Add a Run If action to your workflow, and put a Send Notification action right below the Run If action:
Nintex-Workflow-Emails-15-5

9. Configure your Run If action so it runs if your Email Confirmation field equals No. Optionally you can add a second condition it it’s needed for you process. In the example below, I added a second condition that only runs if the % complete equals 100.
Nintex-Workflow-Emails-15-6
10. Add a ‘Set field value’ action under the send notification action, still inside the Run if action. Configure the set field value to set your Email Confirmation field to Yes. This way once the email is sent, the confirmation field is set to Yes, and the Run If condition will no longer send that email.
Nintex-Workflow-Emails-15-7
11. Your finished workflow should look something like this, a Run If action with both a Send Notification action and a Set Field Value action inside the Run If action:
Nintex-Workflow-Emails-15-8


Lock down specific list or form columns with a workflow

$
0
0

Although it is not possible to just lock down specific columns on a list, it is possible to use a workflow to create and sync two lists together.  One list would be available publicly or to a larger audience, and the other list you could lock down to just 1 or more groups.

In this example all edits are happening on the locked down list, then the status and who is assigned the issue is updated on the public list.  Essentially it’s a locked down issue work list where we wanted to publish some of the information publicly.

Setup a public list to go along with a locked down list

1. Create your Nintex form or List that will be locked down, in this example we have a short form that only has 5 fields:
Private-Public-lists-15-1
2. On your locked down list, create a new column called Entry Created, Choice, Not required, No and Yes for the choices, Drop-Down Menu, No for the default choice.
Private-Public-lists-15-2

3. Our workflow is actually going to check this value and change it so we need to hide this field. Go to List Settings > Advanced Settings > Allow management of content types: Yes. Then back on the List Settings screen click on the Item content type, click on the Entry Created column, and choose Hidden. Click OK to save your changes.
Private-Public-lists-15-3

4. Now we are going to create our new list to show the selected columns from our locked down list to a broader audience. Create a new Custom List, name your new list, and then start creating the columns. The first column you need to create is the LinkedID column, make it a number column, make the field required, and 0 for number of decimal places. This field will be populated by our workflow and will store the ID number of our linked entry from the locked down list.
Private-Public-lists-15-4

5. For all the other columns that you want to duplicate from your locked down list, use the same Column Name as the locked down list but make all the duplicated columns either a Single line of text, Multiple lines of text, or number field. The reason we don’t use choice fields or people fields on this list is over time that could create errors if the choice column is updated on one list but not the other or if someone specified in a people picker field leaves the organization. By just storing data in one of these 3 column types, we eliminate that problem.
Private-Public-lists-15-5

6. Optional – If you want to store the name of the person who created the item in the locked down list. Create a new column Called Submitted By and make it a single line of text field. A ‘Created By’ field already exists on this list so we need to name that field something else.
Private-Public-lists-15-6

7. Here’s an example of my public list, we are going to 4 columns of information and then the LinkedID column as well on this list.
Private-Public-lists-15-7

8. Now it’s time to create the Workflow. Return to the Locked Down list, and go to the Create a Workflow in Nintex Workflow option.
Private-Public-lists-15-9
9. The first action on our workflow is the Action set action:
Private-Public-lists-15-10

10. Double click on the Action set action, click on the Common tab option, click the Run as workflow owner option. This will run all actions in this action set as the person who publishes the workflow. This allows us to lock down the public list so only the workflow can add new items or update new items on it.
Private-Public-lists-15-11

11. Add a descriptive title to the Action set action, the little shield shows that this action set is setup to run as workflow owner.
Private-Public-lists-15-12

12. Add a Set a condition action under the Action set.
Private-Public-lists-15-13

13. Configure the Set a condition action so: Condition – If current item field equals value, Where – Entry Created, equals, Value – Yes. What this condition is checking is if an item has already been created on the public list for this entry.
Private-Public-lists-15-14

14. Add a descriptive label for the Set a condition, then add a Create item action under the No branch.
Private-Public-lists-15-15

15. Configure the Create item action, Create item in – [Choose the name of whatever your public list is called], you should see that any required fields on your Public list are already listed at the bottom once you choose your list:
Private-Public-lists-15-16
16. Using the Field dropdown, you can add the other columns you want to populate as well:
Private-Public-lists-15-17

17. For all non-people picker fields, click on the document icon next to the field and choose the corresponding Item Property. So Title on the public list should equal the Title on the locked down list for example. (People pickers and the LinkedID instructions are in step 18 and 19).
Private-Public-lists-15-18

18. For people picker fields, change the Value dropdown to User Profiles. For source choose Name, and then click on the document icon to insert the reference to the people picker field on your locked down list. So in the example below I’m getting the Assigned To person’s name and the Created By persons name:
Private-Public-lists-15-19

19. For number fields such as LinkedID, change the Value dropdown to List Lookup, Source – Current item, Field ID. This will populate the LinkedID field on the public list with the unique ID number of the item on the Locked down list:
Private-Public-lists-15-20

20. This is what my completed Create item action looks like:
Private-Public-lists-15-21

21. Directly underneath the Create item action, add a Set field value action. Configure this action so the Entry Created column, Equals – Value – Yes. What this does is change the Entry Created field on our locked down item to Yes after we create the item on the public list.
Private-Public-lists-15-22

22. On the Yes side of the Set condition action, add an Update item action.
Private-Public-lists-15-23

23. Configure the update item action. Update – [Name of your Public List], Where – LinkedID, Equals – List Lookup, Source – Current item, Field – ID. What this does is ensures that the linked item in your public list is updated if anything changes on your locked down list.
Private-Public-lists-15-24

24. Now we need to set what fields might need to be updated. This should not include the LinkedID field nor the Created By/Submitted By field as those will not change after an item is submitted. Again use the Field dropdown to add any additional fields and then setup the field mappings just like you did in the Create item action.
Private-Public-lists-15-25

25. Your Completed workflow should look like the example below. If you are adding this workflow to a list which already has real data in it, please on Save your workflow and do not Publish it yet, then submit a Bridge support request for a review before publishing.
Private-Public-lists-15-27

26. Click on the Workflow Settings option, name your workflow, and choose Yes for both Start when items are created and modified. Then Publish your workflow.
Private-Public-lists-15-26

27. So what should happen, is when you create a new item on your locked down list, an entry should also be created on your public list. So here’s our new Locked Down list item:
Private-Public-lists-15-28

28. And the workflow will create an item on the Public List linked to the Locked down list entry. Also make sure to test editing the Locked down list and ensure that the Public list entry is edited as well.
Private-Public-lists-15-29

SharePoint Calculated Columns

$
0
0

SharePoint Calculated Columns can be used to remove commas from number fields, open links in a new tab, categorize active items, display images, customize text, and do date or mathematical calculations.

Introduction to SharePoint Calculated Columns

How to create a new Calculated Column on a SharePoint list or library.

Calculated Column Examples

A list with screenshots of examples of Calculated Column formulas and how the column displays on the list or library.

Displaying number fields without commas

Using a calculated column you can remove the commas from number fields (1,000).

Column to group similar items together

Using a Calculated Column you can specify which items should be grouped together, for example maybe all Pending and In Progress tasks should be grouped as Active.

Creating Hyperlinks using Calculated Columns

You can create hyperlinks which you can even specify to open in a new tab using a calculated columns.

Fields missing from Calculated Column Insert Column

Some field types are not available to be inserted into a calculated column, these include checkboxes, multiple lines of text, person fields, hyperlinks, lookup, and managed metadata.

 

 

Nintex Forms conditionally require attachments

$
0
0

To only require attachments on forms some of the time, you will need to use a javascript function to evaluate the conditions to make attachments required.  If you want attachments required all the time, you can use the attachment control setting.

Conditional form file attachment(s)

In this example we are going to require at least 1 file attachment if the Request type is Conference or Training.

1.   Double-click on the control control you want to check the value of to make attachments required, in this case the Request Type field.
NF-Cond-Attachments-16-5

 

2. Expand the Validation section, select Yes for custom validation, type in ‘ValidateAttachments’, enter a descriptive message for attachments being required.
NF-Cond-Attachments-16-1

3. Next expand the Advanced section, select Yes for Client ID in Javascript, type in a Javascript variable name.
NF-Cond-Attachments-16-6

4. Click on the Nintex Forms tab, select Settings.  Expand the Custom Javascript section, paste in the following function:

function validateAttachments(source, arguments)
{
var elm = NWF$(‘.nf-attachmentsTable’);
var requesttypeValue = NWF$(‘#’ + RequestTypeClientID).val();
arguments.IsValid = true;if ((requesttypeValue == ‘Conference’) || (requesttypeValue == ‘Training’)) {
if (elm.length > 0 && elm.find(‘tr’).length >= 1) {
arguments.IsValid = true;
} else {
arguments.IsValid = false;
}}}

RequestTypeClientID refers to the Client ID you created in step 3.
The length >= 1 refers to the number of attachments required.

NF-Cond-Attachments-16-2

Finished Example: If someone selects either Conference or Training for Request Type, they will be required to include 1 or more attachments:NF-Cond-Attachments-16-4

Copying Nintex Workflow Emails

$
0
0

The problem with trying to copy the email text from one Nintex workflow email to another, is the field references don’t copy. If you just highlight all the text in one email, and paste it into another workflow email, it appears like it works (references are in red and underlined), but it’s just red underlined text not true field references:
Nintex-workflow-Copying-Email-Text-16-1

Copying workflow emails

If you are using the Send notification action, you can just copy the entire action by right-clicking on the action and selecting copy, then right-clicking on a node in the workflow and select Paste. This will copy the entire email action including the field references:
Nintex-workflow-Copying-Email-Text-16-2

Copying Workflow email text

There are instances where you might need to just copy the text of the workflow email though, the most common is for Assign Flexi task or other ‘User interaction’ workflow actions where the email body is inside of the actions.

1. Go to your email body that you already have setup with field references.
A. Click inside of the email body
B. Click the Edit Source option (it’s in the Format Text tab)
Nintex-workflow-Copying-Email-Text-16-3

2. Copy the HTML source of the email, click OK to close the HTML source display.
Nintex-workflow-Copying-Email-Text-16-4

3. Go to the email template you want to paste the text into and click inside the email body.
If it’s a Flexi Task:
A. Click on the General tab
B. Click on the Reminders option
Nintex-workflow-Copying-Email-Text-16-5

4. Click the Edit Source option (you might need to click on the Format Text tab first)
Nintex-workflow-Copying-Email-Text-16-6

5. Paste the HTML Source you copied in step 2, click the OK button
Nintex-workflow-Copying-Email-Text-16-7

6. Your email with field references should now be displayed in the email body.
Nintex-workflow-Copying-Email-Text-16-8
Finished Example: The copied email text is now showing the referenced fields instead of the red underlined text:
Nintex-workflow-Copying-Email-Text-16-9

Nintex forms open new form on submit

$
0
0

You can set a Nintex form to go to a new blank form when the previous form is submitted.  This is usually used for short forms where people need to submit multiple forms all at the same time.  You can set this up by using the Form Settings > Advanced > Redirect URL field.

1. Click on the form Settings option on the Nintex Forms Designer ribbon, expand the advanced section, and type in NewForm.aspx for Redirect URL:
Nintex-Open-New-Form-Submission-16-1

2. Save the form settings

3. I would recommend to also add a label at the bottom of the form notifying people what will happen when they submit the form.  I’ve seen instances where people re-enter the same information because they didn’t realize the form actually submitted.  So for example maybe create a label control like this:
Nintex-Open-New-Form-Submission-16-2

4. Publish the form.  Now when people Submit the form, a new blank form will open.

 

Only returning real people in search

$
0
0

Depending on how your active directory and profile import is setup, you could have a bunch of non-employee accounts showing up in your SharePoint people search results.  This could include test accounts, admin accounts, service accounts, or anything along those lines.

You can edit the People Search core results webpart query though to filter out results that don’t contain an email address, job title, department or other profiles values.  At our organization we were able to eliminate almost all non-employee accounts using this method.

Filtering which user profiles are returned

1. Go to your people results search center page and edit the page.

2. Edit the People Search Core Results web part
limiting-people-search-1

3. Click on the Change Query option
limiting-people-search-2

Ensuring all users have an Email
Include the filter:
WorkEmail:@YourCompanyEmailAddress

The colon (:) means contains so it just ensures that all accounts end with that email address.
limiting-people-search-3

Ensuring all users have a Job Title
I haven’t been able to find a good way to ensure a field is not blank.  The only work around I know of is to ensure that Job Title contains one of the letters of the alphabet:
(JobTitle:a* OR JobTitle:b* OR JobTitle:c* OR JobTitle:d* OR JobTitle:e* OR JobTitle:f* OR JobTitle:g* OR JobTitle:h* OR JobTitle:i* OR JobTitle:j* OR JobTitle:k* OR JobTitle:l* OR JobTitle:m* OR JobTitle:n* OR JobTitle:o* OR JobTitle:p* OR JobTitle:q* OR JobTitle:r* OR JobTitle:s* OR JobTitle:t* OR JobTitle:u* OR JobTitle:v* OR JobTitle:w* OR JobTitle:x* OR JobTitle:y* OR JobTitle:z*)
limiting-people-search-4

Ensuring all users have a Department
Same as the Job title, this ensures that the users Department is not blank:
(Department:a* OR Department:b* OR Department:c* OR Department:d* OR Department:e* OR Department:f* OR Department:g* OR Department:h* OR Department:i* OR Department:j* OR Department:k* OR Department:l* OR Department:m* OR Department:n* OR Department:o* OR Department:p* OR Department:q* OR Department:r* OR Department:s* OR Department:t* OR Department:u* OR Department:v* OR Department:w* OR Department:x* OR Department:y* OR Department:z*)
limiting-people-search-5

Combing multiple filters together
You can combine multiple filters together, so what we did was require a user account to have an email address AND department AND job title which drastically improved our people results:
limiting-people-search-6

When you have the query working like you desire, Click OK to save the query and OK to save the web part settings.

Deploying your changes globally

If you find that customizing the query returns you better people results, you can create a custom search result source that reflects your new query.  That way instead of changing the actual query text, you can just change the result source for the query.

Go to the Central Administration > Search Administration (If you are a farm admin) or Site Collection Settings (if you are Site Collection Admin).  Click on the Search Result Sources link.

On the Manage Result Sources page, find the Local People Results and copy it.
limiting-people-search-7

This will open a copy of that Result source.  Give it a unique Name and click on the Launch Query Builder.  This will allow you to duplicate your query that you did at the web part level.
limiting-people-search-8

Once you have saved your new Result source, go to your people search results web part(s) and edit the Query.  Now all you have to do is Select your new result source and then your Query text can return to just being the searchboxquery.
limiting-people-search-9

Content Search web part (CSWP) Setup

$
0
0

Content Search web parts or CSWP are probably the most useful web parts in my opinion.  This post will give an introduction to CSWP’s, show how to edit the content that is displayed, and links to how to customize the display of CSWP’s at the bottom.

Adding a CSWP to a page

Go to the page, edit the page, click Insert, Web part, Content Rollup (Category) and Content Search web part.
cswp-1

Once the web part is on the page, click on the dropdown and select Edit Web Part.
cswp-2

Editing the CSWP query

In the web part properties, click the Change query button
cswp-3

When the query window opens, click the Switch to Advanced Mode option.
cswp-4

The advanced mode lets you configure the Query how ever you would like.  After making changes click the Test query to see what types of results would be returned.  In this example only results from the /cs/testsc/ootb site and that a type of document or list item will be returned.
cswp-5

The Keyword filter has a couple helpful pre-existing filters like sites, lists or libraries, or items (which is really files or items).
cswp-6

So for example, if you choose only return items and add the filter, it will insert the (contentclass:STS_ListItem OR IsDocument:True) filter:
cswp-8

The Property Filter

The Property filter is what you will use to create most of queries though, they have a short list of common property filters and then a option to Show all managed properties.
cswp-9

There are a ton of Property filters to choose from.
cswp-10

One property filter that I use quite a bit is the Author property, you can set the CSWP to only return items that were authored by the current user:
cswp-11

Or you can add a Property filter to only return items that were created in the last 5 days.  Notice in this example, I used the Today’s date (-5 days) property filter, then customized it to 10 days after it was in my Query text.

This query returns files or items, authored by the current user, AND was created in the last 10 days:
cswp-12

Using Refiners to build property Query’s

Click on the Refiners tab, the refiners are great to show you  a list of properties and their values that you can use to edit your Query Text.  I rarely leave a Refiner added, as they are pretty restrictive.  But find a refiner and Add it to see what items would be returned.  In this case we are filtering the SPContentType property to only return an Item.
cswp-13

Once you find a refiner or two that you were looking for, remove the refiners and return to the Query text (Basics tab).
cswp-14

You can now type out the refiner, so SPContentType=Item accomplishes the same thing as the refiner did.
cswp-15

Typing our the Query text provides much more flexibility than refiners.  For example by putting brackets around the property you can add an OR so you can return both the Item OR Document type:
cswp-16

Sorting the displayed results

Click on the Sorting tab, by default your items will be sorted by search result rank which usually doesn’t make much sense for CSWP since no is entering a search term.
cswp-17

The two sort orders I use most often are either sorting by LastModifiedTime Descending then by Created Descending.  This should display the most recently edited content first.
cswp-18

Or by ViewsRecentUniqueUsers Descending then by ViewsLifeTimeUniqueUsers descending.  This should display the content that has had the most unique people view it first.
cswp-19

More web part settings

Once you are done editing your query, click the OK button to return to your web part properties.  Below the Change query button you can change the numbers of items shown in the web part.

The Control lets you choose to regular list view of items, a list view with a paging control, or a slideshow version which usually works best for videos or images.

The Item control allows you to select which display template for the web part.  The display template controls the number of fields you can show and whether to display an image or not.
CSWP-20.jpg

Expand the Property Mappings section and check the Change the mapping of managed properties option.  This allows you to specify different properties to display, depending on what display template you choose you will have a different number of fields shown here.
cswp-21

For example this is the ‘Picture on left, three lines on the right’ Item display template with properties changed to display the Title, Author, and LastModifiedTime.
cswp-23

Picture URLs

By default the Picture URL property is configured to show the PublishingImage;PictureURL;PictureThumbnailURL.  Unless the results are publishing pages or images though, they probably won’t have an image specified for them.  So how do you change that?
cswp-24

You can actually add an existing column to any list or library on SharePoint that the CSWP will automatically display any image specified for.  Just go to the list or library, click on list/library settings, and under the Columns section click on Add from existing site columns.
cswp-25

Scroll down to the Rollup Image column, and Add it to the list or library.
cswp-26

You will now be able to specify an image for your list or library items.
cswp-27

In this example I specified Rollup Images for documents in my library.
cswp-28


Create a Content Search web part Display Template

$
0
0

You can either upload an existing Content Search Web Part (CSWP) template to your Site Collection or you can create your own CSWP display template.  Although you can use other tools to create and edit the display template, SharePoint Designer (SPD) is probably the tool that works best.

Create a custom CSWP Display Template

1. Open the Site Collection parent site (This is where the Master pages and page layouts library is located) using SPD.
cswp-ex-14

2. Click on the Pin icon next to All Files, expand _catalogs, masterpage (Master Page Gallery), Display Templates, Content Web Parts.cswp-ex-7

3.  Start with an existing template, If I want an image in my display template I usually use the Item_Picture3Lines.html template.  Right click on the HTML file, select Copy.
cswp-ex-8

4. Right Click next to the file, select Paste.
cswp-ex-10

5. Down at the bottom of Content Web Part items you should now see a new copy of the HTML file that you copied.
cswp-ex-11

6. Rename the file (no spaces in file name), then Check Out the file, and select to Edit File in Advanced Mode.  If you get any errors during this process, just try renaming or checking the file out again.  Sometimes you have to do try a couple of times before it will work.
cswp-ex-12

7. Change the Title for file, the Title is what appears in the CSWP web part Display Template Item dropdown menu.
cswp-ex-13

8.  Make your changes to the CSWP file, then Save the file.

9.  Right click on the HTML file, select Check In, select Publish a major version and OK.
cswp-ex-15

Now for any CSWP added to any of the sites in that site collection, you will see your new custom display template (Custom Discussions in this example).
cswp-ex-6

CSWP Simple Announcements

$
0
0

Using the Content Search Web part and a CSS file you can create a simple Announcements list that pulls announcements from multiple sites or announcements lists.
cswp-simple-announcement-1

Creating Simple Announcement CSWP listing

1. Download and extract the css and announcement icon from the zip file:
cswp-simple-announcements.zip

2. Add the css file and icon to the Site Assets library on the site.
cswp-simple-announcement-11

2. Edit a Site Page and Insert a Content Rollup > Content Search Web Part onto the page.

3. Edit the web part.
CSWP-simple-announcement-2.jpg

4. Click on the Change query option.
CSWP-simple-announcement-3.jpg

5. Click on the Switch to Advanced Mode option.
cswp-simple-announcement-4

6. Edit the Query text, your Query text should include the path to 2 or more sites or announcement lists enclosed in brackets and seperated by OR statements:
(path:”https://hostname/sites/sitename/lists/announcements/” OR path:”https://hostname/sites/testsite/”)

Then also include: SPContentType=Announcement
cswp-simple-announcement-12

7. Click on the Sorting tab, and sort by Created Descending:
cswp-simple-announcement-6

8. Select the number of announcements to show and the Two lines Item display template.
cswp-simple-announcement-7

9. Expand the Property Mappings section, check the Change the mapping of managed properties, for Line 2 select the Created property.  Click OK to save your web part.
cswp-simple-announcement-8

10.  Add a Media and Content > Script Editor web part to the page.

11.  Edit the Script Editor web part
cswp-simple-announcement-9

12. Click the Edit Snippet option, enter a link reference to the css file in the Site Assets library in the Script Editor.  The format of the link reference is included in the screenshot below, you can either use the full path to the file or ../SiteAssets/filename.

Click the Insert button to save the Script Editor.
cswp-simple-announcement-10

You should now have a simple announcements web part which pulls announcements from multiple lists and displays them ordered by the most recently created ones first:
cswp-simple-announcement-1

CSWP Simple Discussion Posts

$
0
0

Using the Content Search Web part and a CSS file you can create a simple Discussion board list that pulls discussion board posts from multiple sites or discussion boards.
cswp-simple-discussion-1

Creating Simple Discussions CSWP listing

1. Download and extract the css and announcement icon from the zip file:
cswp-simple-discussions

2. Add the css file and icon to the Site Assets library on the site.
cswp-simple-discussion-2

2. Edit a Site Page and Insert a Content Rollup > Content Search Web Part onto the page.

3. Edit the web part.
CSWP-simple-announcement-2.jpg

4. Click on the Change query option.
CSWP-simple-announcement-3.jpg

5. Click on the Switch to Advanced Mode option.
cswp-simple-announcement-4

6. Edit the Query text, your Query text should include the path to 2 or more sites or discussion lists enclosed in brackets and separated by OR statements:
(path:”https://hostname/sites/sitename/” OR path:”https://hostname/sites/testsite/lists/discussionboard”)

Then also include: SPContentType=Discussion
cswp-simple-discussion-4

7. Click on the Sorting tab, and sort by Created Descending:
cswp-simple-announcement-6

8. Select the number of discussions to show and select the Picture on left, 3 lines on right Item display template.
cswp-simple-discussion-5

9. Expand the Property Mappings section, check the Change the mapping of managed properties, for Line 2 select the Created property.  Click OK to save your web part.
cswp-simple-discussion-6

10.  Add a Media and Content > Script Editor web part to the page.

11.  Edit the Script Editor web part
cswp-simple-announcement-9

12. Click the Edit Snippet option, enter a link reference to the css file in the Site Assets library in the Script Editor. The format of the link reference is included in the screenshot below, you can either use the full path to the file or ../SiteAssets/filename.

Click the Insert button to save the Script Editor.
cswp-simple-discussion-7

You should now have a simple discussions web part which pulls discussion board posts from multiple lists and displays them ordered by the most recently created ones first:
cswp-simple-discussion-1

CSWP Discussion Display Template

$
0
0

This is a downloadable display template that you install on your site collection to allow any Content Search Web Part (CSWP) to display discussion board posts with an icon, description, # of replies and last replied.
cswp-disptemp-discussion-20
Compared to the CSWP simple discussion format, this display template adds a hover affect, the ability to have 4 field references instead of 3, and eliminates the need to add a script editor with a link reference to each page the CSWP is on.

Adding Discussion Display Template to Site Collection

You must have manage hierarchy permissions or higher on the site collection home in order to upload new display templates.

1. Download and extract the 3 files from the zip file:
CustomDiscussionDispTemp.zip

Upload the CSS file and icon

2. Add the CSS file and Icon to the Style Library at the Site Collection top site.
cswp-disptemp-discussion-2

3. If there are the green checked out icons next to the files, click the checkbox next to the 2 files, select the Files tab, and Check In the 2 files.
cswp-disptemp-discussion-3

4. Select Major version if presented with an option, click OK.
cswp-disptemp-discussion-4

Upload the display template

5. Go to the Site Collection Site Settings, select the Master pages and page layouts option.
cswp-disptemp-discussion-5

6. Click on the Display Templates folder
cswp-disptemp-discussion-6

7. Click on the Content Web Parts folder
cswp-disptemp-discussion-7

8. Click on the Files tab, select Upload Document
cswp-disptemp-discussion-8

9. Click the Browse button
cswp-disptemp-discussion-9

10. Find and select the Item_custom_discussions HTML file that you extracted in Step 1.
cswp-disptemp-discussion-10

11. The file properties window should popup, the Content Type, Title, Description, etc should all be pre-filled so just select Save.
cswp-disptemp-discussion-11

12. Click the checkbox next to the Item_custom_discussions.html file, click on the File tab, Check In (if option if available), then Publish (if option is available).
cswp-disptemp-discussion-12

Add and configure the CSWP on a page

13. Go to a page and edit the page, Insert a Content Rollup > Content Search Web Part onto the page.  Edit the web part.
cswp-disptemp-discussion-14

14. Click the Change query button.
cswp-disptemp-discussion-15

15. Click the Switch to Advanced Mode option.
cswp-disptemp-discussion-16

16. Edit the Query text, your query text should include the path to one or more sites or discussion lists, if you have multiple enclose the paths in brackets and separate with OR statements.  Append SPContentType=Discussion to the end of the Query Text.
cswp-disptemp-discussion-17

17. Click the Sorting tab, Sort by Created Descending.  Click the OK button at the bottom to save your query.
cswp-disptemp-discussion-18

18. Select how many items you want to display, select the Custom Discussions Item display template, click OK to save the web part settings.
cswp-disptemp-discussion-19

Your CSWP should now be displaying discussions with the custom formatting:
cswp-disptemp-discussion-20

CSWP Announcements Display Template

$
0
0

This is a downloadable display template that you install on your site collection to allow any Content Search Web Part (CSWP) to display announcement items with an icon, body text, author and posted date.
cswp-disptemp-announcement-1

Compared to the CSWP Simple Announcements format, this display template adds a hover affect, the ability to have 4 field references instead of 3, allows you to display the first line of the announcement body, and eliminates the need to add a script editor with a link reference to each page the CSWP is on.

Adding Discussion Display Template to Site Collection

You must have manage hierarchy permissions or higher on the site collection home in order to upload new display templates.

1. Download and extract the 3 files from the zip file:
CustomAnnouncementDispTemp.zip

Upload the CSS file and icon

2. Add the CSS file and Icon to the Style Library at the Site Collection top site.
cswp-disptemp-announcement-2

3. If there are the green checked out icons next to the files, click the checkbox next to the 2 files, select the Files tab, and Check In the 2 files.
cswp-disptemp-announcement-3

4. Select Major version if presented with an option, click OK.
cswp-disptemp-discussion-4

Upload the display template

5. Go to the Site Collection Site Settings, select the Master pages and page layouts option.
cswp-disptemp-discussion-5

6. Click on the Display Templates folder
cswp-disptemp-discussion-6

7. Click on the Content Web Parts folder
cswp-disptemp-discussion-7

8. Click on the Files tab, select Upload Document
cswp-disptemp-discussion-8

9. Click the Browse button
cswp-disptemp-discussion-9

10. Find and select the Item_custom_announcements HTML file that you extracted in Step 1.
cswp-disptemp-announcement-4

11. The file properties window should popup, the Content Type, Title, Description, etc should all be pre-filled so just select Save.
cswp-disptemp-announcement-5

12. Click the checkbox next to the Item_custom_announcements.html file, click on the File tab, Check In (if option if available), then Publish (if option is available).
cswp-disptemp-announcement-6

Add and configure the CSWP on a page

13. Go to a page and edit the page, Insert a Content Rollup > Content Search Web Part onto the page.  Edit the web part.
cswp-disptemp-discussion-14

14. Click the Change query button.
cswp-disptemp-discussion-15

15. Click the Switch to Advanced Mode option.
cswp-disptemp-discussion-16

16. Edit the Query text, your query text should include the path to one or more sites or announcement lists, if you have multiple enclose the paths in brackets and separate with OR statements.  Append SPContentType=Announcement to the end of the Query Text.
cswp-disptemp-announcement-7

17. Click the Sorting tab, Sort by Created Descending.  Click the OK button at the bottom to save your query.
cswp-disptemp-discussion-18

18. Select how many items you want to display, select the Custom Announcements Item display template, click OK to save the web part settings.
cswp-disptemp-announcement-8

Your CSWP should now be displaying announcements with the custom formatting:
cswp-disptemp-announcement-1

Viewing all 44 articles
Browse latest View live