SPSiteDataQuery and the EncodedAbsUrl hidden field.


When using SPSiteDataQuery among the fields you can ask to be returned is a field called EncodedAbsUrl. This field according to the documentation and public opinion is supposed to return the complete URL of the item in question.

Many people have noted, however, that the value returned for this field is truncated at the server name level. So instead of returning a full URL, say;

http://server/site/docs/doc1.docx

it returns a truncated value;

http://server/

It’s also been noted that it apparently depends on the scope at which you use the SPSiteDataQuery.

My own observation is that when the query is executed at the root or a subsite level, it returns the truncated value. But when the query is executed at a leaf subsite level (a site without any child sites), it returns the other part of the full URL, using the above examples, it would return;

site/docs/doc1.docx

Published by

Phil Harding

SharePoint Consultant, Developer, Father, Husband and Climber.

One thought on “SPSiteDataQuery and the EncodedAbsUrl hidden field.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s