Building Dynamic Strings in SharePoint Designer Workflows

A few people have asked if it is possible to create a SharePoint Designer workflow variable that includes references to other variables. Indeed, it is possible.

The Build Dynamic String action in the Workflow Designer allows you to define any combination of static text, list field data, and workflow data in a single variable. When you click dynamic string for this action, you can look up values as needed in the String Builder dialog box, as shown here when creating a meeting request message.



To look up the value of another workflow variable, change the Source list value to Workflow Data and select the appropriate item from the Field list. In this example, the workflow already has a MeetingRequestDate variable that will be used in the dynamic string.



After you define the string value, click Variable: variable and then click Create a new variable to provide a new variable name.



It should be noted that these dynamic strings cannot be referenced when creating a task with the Assign a To-do Item action. Lookups are not allowed in the Name or Description fields of the Custom Task Wizard. However, you can reference dynamic strings when using the Send an Email action. Lookups can be performed in the To, CC, Subject, and message body fields of the Define E-mail Message dialog box.

Print | posted on Wednesday, February 28, 2007 11:03 AM

Feedback

# re: Building Dynamic Strings in SharePoint Designer Workflows

Left by Ralph Rivas at 8/22/2007 7:47 AM
Gravatar Can you add forumlas here?

# re: Building Dynamic Strings in SharePoint Designer Workflows

Left by David Gerhardt at 8/22/2007 5:27 PM
Gravatar Hi, Ralph.

Yes, you can use the Do Calculation action to save formula output to a variable. Then, you can look up that variable in the Build Dynamic String action.

Hope this helps...

Regards,
David

# re: Building Dynamic Strings in SharePoint Designer Workflows

Left by David Gerhardt at 8/29/2007 8:46 AM
Gravatar I do not know the maximum length of a string variable in a SharePoint Designer workflow. That sounds like a good question for the SharePoint Designer team (http://blogs.msdn.com/sharepointdesigner/)...

Regards,
David

# re: Building Dynamic Strings in SharePoint Designer Workflows

Left by David Gerhardt at 9/18/2007 8:31 AM
Gravatar Hi, Rob.

I would use a combination of InfoPath and SharePoint Designer for your scenario. Within the InfoPath form template, you could include button controls that set “send” data source fields based on specific email groups. InfoPath has a simple data connection wizard that allows you to pull data (e.g., with Web services) from external sources. Then, in the SharePoint Designer workflow, you could include an action to send an email message using the “send” data source fields from the InfoPath form.

Hope this helps…

Regards,
David

# Custom Workflow Strangeness

Left by Mirrored Blogs at 1/9/2008 4:54 PM
Gravatar Today I ran into two unexpected behaviors of my custom workflow (created with SharePoint designer). First

Your comment:





 
Please add 6 and 8 and type the answer here:

Copyright © David Gerhardt

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski