Hi,
How can I set the new geolocation field in a SP2013 list from a SPD list workflow? I've tried 'Set Location to Point([%Variable: X%] [%Variable: Y%])' hoping that a string would work but this fails.
Thanks in advance
Technology Tips and News
Hi,
How can I set the new geolocation field in a SP2013 list from a SPD list workflow? I've tried 'Set Location to Point([%Variable: X%] [%Variable: Y%])' hoping that a string would work but this fails.
Thanks in advance
Hi,
I understand that you want to set the field value using workflow. Are you using SharePoint 2013 workflow or SharePoint 2010 workflow? What error message do you get when running the workflow?
Assume that the geolocation field is a text box field and you want to set the field to get value of variable X and variable Y. If so, the workflow should work. You can have a test with a SharePoint 2010 workflow with the same action to see whether it works.
If I have any misunderstanding, please feel free to let me know.
Thanks,
Entan Ming
Hi,
I'm using a SPD 2013 list workflow. The field to be set is the new Geolocation field in 2013 (see http://msdn.microsoft.com/en-us/library/jj164050.aspx ). My reference to the variable X and Y was an attempt to construct a string to populate the Geolocation field using the 'raw value' method B described in the web page. I would not be able to test with 2010 as it does not have the Geolocation field.
The workflow gets suspended with the following error message;
RequestorId: 91adda23-7a37-d55f-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ApplicationException: HTTP 400 {"Transfer-Encoding":["chunked"],"X-SharePointHealthScore":["0"],"SPClientServiceRequestDuration":["39"],"SPRequestGuid":["91adda23-7a37-d55f-b0ce-7a87af2020c9"],"request-id":["91adda23-7a37-d55f-b0ce-7a87af2020c9"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"MicrosoftSharePointTeamServices":["15.0.0.4454"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1; RequireReadOnly"],"Cache-Control":["max-age=0, private"],"Date":["Mon, 08 Apr 2013 04:16:46 GMT"],"P3P":["CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\""],"Server":["Microsoft-IIS\/7.5"],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"]} at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) in d:\bt\103818\private\source\WF\Microsoft.Activities.Hosting\Microsoft\Activities\Hosting\Runtime\Subroutine.cs:line 282 at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
I, too would appreciate an answer to this. Not being able to easily update the geolocation field in a SharePoint Workflow seriously limits the usability of this feature.
This fellow, Borislav, an MVP, posted how to lookup locations through Bing, and then update the geolocation field using the "Call Http Service" function, however his method actually doesn't work, and doesn't apply to the original question about Lists where you ALREADY have latitude and longitude.
http://mysharepointinsight.blogspot.com/2013/05/how-to-get-coordinates-for-geolocation.html
Seems like the key is the "Call Http Service," but I have not yet seen a good example of how to implement it.
Does anyone have a solution for the original poster and my question as well - - how to update the geolocation field using SharePoint Designer 2013 and pulling existing latitude and longitude from the list?
A solution would be greatly appreciated!
-James
Did you ever get an answer to this? It looks like the last comment on the thread was a few months ago. I'm also looking to update a geolocation column via a workflow and have not been able to figure out any way to write to that field type from a workflow.
The correct construction for a string variable to set a Geo Location data column is:
POINT (LONGITUDE LATITUDE)
If your taking your latitude and longitude values from a calculated column in the workflow, be sure you extract a substring from index (starting at 8) or your values will include 'float;#'.
POINT (LONGITUDE LATITUDE)
If your taking your latitude and longitude values from a calculated column in the workflow, be sure you extract a substring from index (starting at 8) or your values will include 'float;#'.
Are you saying that need to use his blog and change the long and lat variables in the dictionary to Point and build a string variable instead?
Or can I just submit a string variable to the Geolocation with both the longitude and Latitude?
Hi,
Did anyone ever find a solution for this? I'm going to try to bypass this by using the "Call http webservice",
but it would be much nicer if we just could use the Point (x y) command.