AdamP

Forum Replies Created

Viewing 15 posts - 61 through 75 (of 75 total)
  • Author
    Posts
  • AdamP
    Participant

    Hi Alexander

    I think Jon’s scenario in the image and your example are slightly different in that Jon is targeting the same field (Channel) on the form twice – as far as I can see that’s an impossibility? Your example targets four completely separate fields – two pairs which cascade nicely.
    Jon’s scenario translated into your example would equate to;
    Casc1,Casc2
    Casc1,Casc4
    in the config for the current list fields. Am I missing something?

    in reply to: People or Group Lookup Item (s) in Workflow #9932
    AdamP
    Participant

    I don’t think this is a question specific to Alexander’s solutions, however the person field can display various properties of the underlying user profile service.
    In the workflow you can probably configure it to pull in both first and last names separately, then add a space (” “) in between them to arrive at what you need.

    See https://technet.microsoft.com/en-us/library/hh147513(v=office.14).aspx
    and http://melick-rajee.blogspot.co.uk/2010/11/how-to-get-users-information-in.html

    in reply to: Documents Libraries and vLookup #9930
    AdamP
    Participant

    Hi Graham

    I’ve not used folders for a while so may be mistaken, but I don’t think you need to do anything special with columns on the folder – simply set it up in the vlookup config page, and the metadata you define will be applied to the default folder content type. It’s a bit like magic – when you check you’ll see the metadata applied even though there are no predefined columns to “receive” it.

    For the add as new version check box question – is this post what you’re looking for?;
    https://spjsblog.com/forums/topic/default-overwrite-existing-files-in-upload-image-unchecked/

    Adam

    AdamP
    Participant

    I think you’re just configuring this incorrectly – it looks like you’re targeting the same field (Channel) in both config sections, which would be impossible, and also using the same list of options for both primary and secondary exception code fields – possible but doesn’t sound likely. Is it really cascading dropdowns that you want?

    To get a four level cascade, you simply list the four fields in the “lookup” list, and then the four fields in the form you want to populate – the “current” list.
    From Alexander’s post;

    lookupListFields: The FieldInternalNames of the fields in the above list.
    thisListFields: The FieldInternalNames of the fields to convert to dropdowns.

    And importantly:

    The length of the arrays “lookupListFields” and “thisListFields” must be the same.

    ie just pair up the from and to fields, and list them in the right order.

    So in your lookup list field you’d have eg Column1,Column2,Column3,Column4
    And in the current list field eg Primary,Secondary,Third,Fourth

    See the original post

    in reply to: CommentBox script not work together with ListAttachment #9916
    AdamP
    Participant

    Sorry to reawaken this thread after 6 months. I’ve just experienced exactly this issue, but unfortunately I’m not loading jQuery twice. I’ve also found that I can suppress the problem by changing the order of the scripts.

    Config that gives me the error message and prevents comment box (licensed version) from loading;

    CEWP-load jQuery (1.11.2)
    CEWP-comment box
    CEWP-hit counter and star rating

    This order generates the attached error message and comment box doesn’t load, but the page view is recorded in the hitcounter list.

    However if I change the order to;
    CEWP-load jQuery (1.11.2)
    CEWP-hit counter and star rating
    CEWP-comment box
    Then everything is fine and works correctly. For a number of reasons I need to get the hitcounter below the comment box. Any ideas what exactly is going on here?
    I split out jquery to be sure it is only loaded once, and on their own hit counter and comment box work correctly, so it does seem to be an incompatibility between the two scripts.

    Thanks

    Adam

    in reply to: Display and click through to attachments on child list #9197
    AdamP
    Participant

    Another update;

    The “normal” SP dialog code didn’t help.

    However I found that if I tick “Open form in new dialog” the problem appears to go away.

    So..using the same dialog for parent and child forms, it appears that the child form is (usually) being passed a %26 instead of an &, but I have no idea where to look to try to resolve (other than sticking with a “new” dialog box.

    in reply to: Display and click through to attachments on child list #9193
    AdamP
    Participant

    Hi Alexander

    Your logic is correct as usual. The broken display form initially only appeared to happen with the initAttachments function in the special configurations area (repeated several times with/without).

    I’ve repeated the tests again today and have seen the same broken display of the child list without the initAttachments function being called – primarily when using dialogs but on a couple of occasions with forms displayed as complete pages. I’m not sure why, but the issue seems to be occurring more frequently now.

    The closest I’ve got to working out what’s going on so far is an anomaly in the child form url – the & characters are replaced with %26 – I think that’s potentially invalidating the item ID and causing the child form to display without any values.

    Any idea what to try next?

    AdamP
    Participant

    Hi Kyle

    Can you use a slightly different approach and make use of DFFS to achieve the same end result and avoid jQuery altogether? I’ve used something similar for a wiki and wanted to control what users did with images (no overwrites or editing – effectively provides version control of the images within pages)
    The upload.aspx form generally isn’t controlled by DFFS…so custom css set ‘there’ won’t have any effect.

    So…
    First – You can modify permissions on the library where you’re storing the images so that people can add but not modify items (you may need to create and edit permission levels to achieve this). We have a permission level called “contribute-add only”. I’ve not double checked but I believe that would prevent an overwrite of files with exactly the same name.
    Second – Use dffs rules on the image library editform.aspx to create a specific and unique filename – eg append the date and their username onto the filename on save. That effectively creates a completely unique file reference that can never be overwritten.

    Does that make sense? Does anyone else have any improved methods?

    I’ve had issues with inserting images into rich text fields on lists though – the image file seems to get stored in a folder called either newform or editform…not very user friendly.

    Adam

    in reply to: Display and click through to attachments on child list #9145
    AdamP
    Participant

    Hi Alexander, thanks for the modified code.

    We’re very close with this, just a couple of issues that have shown up…

    For clarity,a summary of what I’ve ended up with;

    CustomJS area of the form (note I’ve edited the image used for the paperclip to a SP2010 path instead of a SP2013 one) ;

    
    
    function initAttachments(a,item){
    	if(item.get_item("Attachments")){
    		return "<img style='border:0px;cursor:pointer;' width='16' height='16' alt='Attachments' src='/_layouts/images/attachhd.gif' onclick='getAttachments(\""+item.get_item("ID")+"\");'>";
    	}else{
    		return "&nbsp";
    	}
    }
    
    function getAttachments(id){
    var url = _spPageContextInfo.webServerRelativeUrl+"/_vti_bin/ListData.svc/Comments("+id+")/Attachments";
    	$.getJSON(url, 
    		function(data) {
    			var b = [];			
    			spjs.$.each(data.d.results,function(i,o){
    				b.push("<div><a href='"+o.__metadata.media_src+"' target='_blank'>"+o.Name+"</a></div>");
    			});
    			spjs.dffs.dlgBox(b.join(""),true);
    		}		
    	)
    }

    And in the “Special Configurations” text area for the attachments field on the vLookup config;

    {"function":"initAttachments"}

    This works well – when the paperclip is clicked you get a DFFS dialogue with the attachments listed – see screenshot. The only improvement here would be to have a slightly less overbearing overlay, so that the content behind the dialogue is still shown (similar to OOTB sharepoint dialogue boxes).

    The issue I’ve discovered is that with this code set up – the display of child items via the magnifying glass icon breaks – see second screenshot. It looks like it’s losing the item ID of the child item when the child form loads. Field values are filled with “FieldInternalName + ‘field value’ “.

    Any idea of the what’s happening here? It’s almost perfect apart from this one glitch.

    Thanks

    Adam

    in reply to: Display and click through to attachments on child list #9071
    AdamP
    Participant

    Thank you Alexander

    Your response to feedback and requests is outstanding!

    Unfortunately we are still on SP2010 at the moment – what would the code changes be to make it work here?

    Adam

    AdamP
    Participant

    You’re quite right Alexander, the last error seems to be an issue specific to the site collection I was testing in – as yet unresolved, but nothing at all to do with DFFS.

    In production I’m still running a previous version of DFFS so I’ve still got the older code for the overlay (no flicker issues experienced).

    Adam

    AdamP
    Participant

    I’m also seeing errors in the console (for both dispform and editform – both refer to editform.aspx);

    
    
    SCRIPT70: Permission denied
    File: EditForm.aspx, Line: 19, Column: 1

    Which is the document.write line after CDATA

    
    
    // <![CDATA[
    document.write('<script type="text/javascript" src="/_layouts/1033/init.js?rev=BjQJs0OCQh3Zfydsdw2MYw%3D%3D"></' + 'script>');
    in reply to: vLookup on new item on document library #8758
    AdamP
    Participant

    Hi Alexander

    I thought this was the case, however on the setup I’ve got I see the following;

    Add new document>
    File upload dialog, ok
    EditForm.aspx (?mode=upload)
    ‘vLookupAssociations’ just shows as an empty single line of text field (as if it were on a plain old sharepoint form. All other dffs functionality works correctly)

    Edit properties of same file>
    Editform.aspx
    ‘vLookupAssociations’ field loads all associated items from the child list into the area on the form as per config.

    The process I have at the moment is to go back into editing (or viewing) the document properties after initial upload, but it would be nice if it was possible in one hit.

    Any ideas or things I should check?

    AdamP
    Participant

    Success!

    Thanks Alexander, I’ve only done a very quick test of the new file (after remembering to clear the browser cache!!!!) and I am able to traverse from upload.aspx to the following ediform.aspx with DFFS loading exactly as it should. I’ll do some more thorough checking later on.

    Thanks for the swift turnaround, very much appreciated.

    Adam

    in reply to: DFFS Form examples #7684
    AdamP
    Participant

    Just a simple form to start things off. Apologies for the blurred data and the large image size – seemed best to show it all together rather than chopping it up into sections – zoom in to see the detail. I’ve annotated alongside the form to describe which elements of DFFS I’ve used.

    I created this for capturing quarterly reports from about 30 separate contributors. Nothing very fancy here really, but I do have four separate child lists linked up to this parent one via the vLookup plugin. Two for display of read only data, and two where data is being submitted as part of the report – multiple rows as required.

    The only other thing I think I’ve used is html formatting on a couple of fields.

    Attachments:
Viewing 15 posts - 61 through 75 (of 75 total)