LastIndexOf in a SharePoint 2013 workflow using SharePoint Designer 2013

Unfortunately, there is no out-of-the-box Workflow action for String.LastIndexOf() in SharePoint 2013 workflows when working with SharePoint Designer 2013, but using the new Loop condition, you can get the last index of any character or string:

Use the following actions to retrieve the last index:

Click for a bigger version

This algorithm uses the following local variables:

This can come in handy, when you want to dissect a filename or URL in a workflow.

One thought on “LastIndexOf in a SharePoint 2013 workflow using SharePoint Designer 2013

  1. Pingback: Extract the parent foldername of a document in a SharePoint Designer 2013 workflow | Morgan's SharePoint Blog

Leave a Reply

Your email address will not be published. Required fields are marked *