1

This is my first question on any stack exchange site, so any recommendations on how to improve asking a question would be tremendously helpful.

The issue I am facing here today is setting a hyperlink field in my InfoPath Form library in SharePoint 2010 through a SPD workflow. Here's what I know:

  1. How to format a URL properly and use string variables to update the Hyperlink field. I have successfully used:

http://www.google.com, Google

and

[%Current Item:Server Relative URL%], [%Current Item:Title%] 
  1. How to create a View-Specific URL for an InfoPath form in an Form library. Ex:

http://www.example.com/sub/subsub/foo/_layouts/FormServer.aspx?XmlLocation=[%CurrentItem:ServerRelativeURL%]&Source=http%3A%2F%2Fwww.example.com%2Fsub/subsub/foo%2FFormLibrary%2FForms%2FAllItems%2Easpx&DefaultView=View&DefaultItemOpen=1

Now the question is, why is my sharepoint workflow not setting the hyperlink field correctly when using this form link in update list field action like so:

Update Item in Current Item

Image of Update List Item

[%Variable:LinkToForm%], [%Current Item:Title%]

where [%Variable:LinkToForm%] contains

http://www.example.com/sub/subsub/foo/_layouts/FormServer.aspx?XmlLocation=[%CurrentItem:ServerRelativeURL%]&Source=http%3A%2F%2Fwww.example.com%2Fsub/subsub/foo%2FFormLibrary%2FForms%2FAllItems%2Easpx&DefaultView=View&DefaultItemOpen=1

Note: I have also tried to replace [%CurrentItem:ServerRelativeURL%] with [%CurrentItem:URLPath%] and it does not work.

My Workflow runs on item creation, and the first message in the workflow is this error:

The workflow could not update the item, possibly because one or more columns for the item require a different type of information.

The workflow continues to run, but the hyperlink field is not set and remains empty.

Perhaps the reason I am trying to do this may be helpful.

In my form library, I would like to have a different "Default View" of the form depending on where it is being opened from. Since this functionality does not exist in SharePoint, the idea was to create a link to the form with the included view (with &defaultview=view) that would show on the default form library view instead of the original link to the form that SharePoint would create.

My Permissions

I am essentially a power user with access to SPD and Limited site admin permissions on my sub-site. I cannot edit default pages.

Has anyone else run across this problem? Any pointers or tips would be appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.