Home › Forums › vLooup for SharePoint › Display Attchments of Child item in vLookup
- This topic has 3 replies, 2 voices, and was last updated 7 years, 4 months ago by Alexander Bautz.
-
AuthorPosts
-
-
August 2, 2017 at 23:06 #17592
I am trying to implement some code I found in your blog. When I setup the form and vLookup as attached, it shows the “Attachment” as clickable but nothing comes up.
Attached are screens shots of my setup in DFFS as well as what the form looks like.
Thanks for your help Alexander
Attachments:
-
August 4, 2017 at 18:59 #17632
Not sure if you have already done this in your code, but you must edit the code and change the name of the list.
If you have already done this, open the dev tools by hitting F12 > Console and look for error messages there.
Alexander
-
August 4, 2017 at 21:14 #17642
Yes I had already done that. I guess I took the snapshot before I made the change.
After hitting F12 I found 4011 error accessing SPJS library. When I went in there I could not see anything. I received a Web Part Error.
Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe. Correlation ID: d0100c9e-22e8-b0b1-cdfb-d4c838375edf.
I just upgraded this site to 4.41
-
August 11, 2017 at 21:42 #17722
Sorry for the late reply – my inbox have been a bit flooded lately.
It’s unfortunately hard to tell what it could be without looking at it. Is it possible for me to log in and look at it?
If not, could you post (or email me if you don’t want the pictures online) a few screenshots of the errors you receive?
PS: You can insert a console.log statement in the script like this to see whats going on:
function initAttachments(a,item){ console.log(item); if(item.get_item("Attachments")){ ... ... ... function getAttachments(id){ var url = _spPageContextInfo.webServerRelativeUrl+"/_api/lists/getByTitle('The DisplayName of your list')/items?$filter=Id eq "+id+"&$select=AttachmentFiles,Title&$expand=AttachmentFiles"; $.getJSON(url, function(data) { console.log(data); var b = []; ... ... ...
You are using SP 2013+? – if not, you should find a SP 2010 code example in the same forum post.
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.