- This topic is empty.
- 02/08/2013 at 1:35 am #5358
You can try using one of the <Custom> fields using the option "Calculated value".
I tried it but the field shows up blank but it could be because the fields you mention in your post are indeed blank in my list.
- 02/08/2013 at 1:52 am #5835
If there is a document associated with the item in the document library, those fields should have values in them (for example, EncodedAbsUrl is exactly what it sounds like, a URL encoded string with the full, absolute path to the document on your SharePoint server).
*Every* SharePoint list and document library has fields that are not visible from within the UI, I just want to know how I can get access to them for use in my qListView. If the CAML Filter property of the web part allowed me to define the ViewFields property of the SPQuery object and not just the where clause of the Query property, I could handle it that way, but it does not.
I can work around the absence of EncodedAbsUrl by creating a <custom> field that combines the folder and file name, but it's annoying to have to do that when I know full well that the value I am looking for is already in the list but not available to me through the web part I am using.
- 02/08/2013 at 2:06 am #5834
Have you tried what suggested by creating a custom field and use its Calculated Format attribute, like "<%EncodedAbsUrl%>?
When you have a document associated with the item in doc lib, this should render the URL for you. Please confirm whether this worked for you or not?
- 02/08/2013 at 6:59 am #5833
No, sorry this does not work, either in the grid or with the custom display. No exception is thrown, but neither does anything show up — I just get an empty string.
Additionally, if I've defined the field using one of the <custom> fields and do not check the check box to make it show up in the grid (which I don't want to do because I only want to see the custom display), the definition with the new name and calculated value disappear after a save. So not only do I not get a value back, when I go back into ezEdit the field has reverted to <custom> with no calculated value.
- 02/13/2013 at 6:45 am #5832
Internally we keep track of display name and internal name mapping from SharePoint list but we do not keep any SPField that is hidden. The field you tried to access happen to be hidden field thus not been tracked and the field expression evaluates to none.
Unfortunately there is no other workaround.
- 02/20/2013 at 12:07 pm #4435
When I do queries against document libraries using .Net code and the SharePoint server object model, I can always get to fields that aren’t visible in the SharePoint UI like “FileLeafRef” and “EncodedAbsUrl”. How do I get access to these fields inside of a qListView?
- 02/20/2013 at 12:07 pm #5831
Okay, I figured it was something like that. Thank you for the confirmation.
My philosophy for developing solutions is "if it's there and it can help me finish my task, I should be able to use it." As developers, customers ask us to do all kinds of crazy stuff that sometimes no one has anticipated. As this is a general purpose tool for working with SharePoint lists, I can't help feeling that this web part should give me access to all of the fields in my lists (and libraries).
Please pass on a request to the developers to "track" hidden fields, or at the very least make their tracking a configurable option that can be turned on (either individually or as a group would be fine).
Thanks again for your help.
You must be logged in to reply to this topic.