AdamP

Forum Replies Created

Viewing 15 posts - 61 through 75 (of 80 total)
  • Author
    Posts
  • in reply to: Vlookup "Count" on list view – issue with groups #10126
    AdamP
    Participant

      A bit more clarity after further investigation…

      The issue occurs with the ajax item paging within a group, not the “full” paging at the bottom of the page. See attached image. Navigating to the next set of items kills the vlookup data, as does navigating back onto the first set of items that was displayed.

      Also of note – if I turn on the ajax options on the library view – ‘Enable Asynchronous Update’ etc – the vLookup data doesn’t show at all, even when the page initially loads.

      in reply to: Passing hyperlink data to child from parent #10112
      AdamP
      Participant

        I see this behaviour too

        parent (library) is dispform = child hyperlink fields populated correctly
        parent (library) is editform = same behaviour as Christine is seeing

        SP 2010
        DFFS frontend v4.365 BETA 4
        DFFS backend v4.365 BETA 3
        vLookup frontend v2.259
        vLookup backend v2.254

        If it helps…these are the pair of fields while in editform;

        
        
        		<td valign="top" class="ms-formbody">
        		<!-- FieldName="Hyperlink"
        			 FieldInternalName="Hyperlink"
        			 FieldType="SPFieldURL"
        		  -->
        			<span dir="none">
        		<span class="ms-formdescription">Type the Web address: (<a id="ctl00_m_g_a649582e_ac56_4384_9529_527468bd171f_ctl00_ctl02_ctl00_ctl02_ctl00_ctl00_ctl03_ctl00_ctl00_ctl04_ctl00_ctl00_UrlControlId" href="javascript:TestURL('ctl00_m_g_a649582e_ac56_4384_9529_527468bd171f_ctl00_ctl02_ctl00_ctl02_ctl00_ctl00_ctl03_ctl00_ctl00_ctl04_ctl00_ctl00_UrlFieldUrl')" target="_self">Click here to test</a>)
        		 <br /></span>
        		<input name="ctl00$m$g_a649582e_ac56_4384_9529_527468bd171f$ctl00$ctl02$ctl00$ctl02$ctl00$ctl00$ctl03$ctl00$ctl00$ctl04$ctl00$ctl00$UrlFieldUrl" type="text" value="http://www.google.co.uk" maxlength="255" id="ctl00_m_g_a649582e_ac56_4384_9529_527468bd171f_ctl00_ctl02_ctl00_ctl02_ctl00_ctl00_ctl03_ctl00_ctl00_ctl04_ctl00_ctl00_UrlFieldUrl" title="Hyperlink" class="ms-long" dir="ltr" onfocus="this.select();" /><br />
        		<span class="ms-formdescription">Type the description: <br /></span>
        	   <input name="ctl00$m$g_a649582e_ac56_4384_9529_527468bd171f$ctl00$ctl02$ctl00$ctl02$ctl00$ctl00$ctl03$ctl00$ctl00$ctl04$ctl00$ctl00$UrlFieldDescription" type="text" value="Test 1" maxlength="255" id="ctl00_m_g_a649582e_ac56_4384_9529_527468bd171f_ctl00_ctl02_ctl00_ctl02_ctl00_ctl00_ctl03_ctl00_ctl00_ctl04_ctl00_ctl00_UrlFieldDescription" title="Description" class="ms-long" /><br />
        	</span>
        			
        			
        		</td>

        Adam

        in reply to: Vlookup "Count" on list view – issue with groups #10096
        AdamP
        Participant

          Hi Alexander

          We’re currently on SP2010, calling vLookup_listview.html from a CEWP below the library.

          vLookup Backend v2.251
          vLookup Frontend v2.253

          I’m pretty sure that we used vLookup_listview.html from the same DFFS package (18 October 2015), it looks identical to the code in the change log for v2.204. Should we be using something different for SP2010?

          Adam

          AdamP
          Participant

            Hi Jon

            This isn’t something I’ve done and looks pretty complex (to me) to achieve.
            If I understand you correctly, it sounds like you want to do something similar to the example in this post, but with eight sub-menus filtered off the first selection rather than just one;
            Combining SPJS-Lookup with Cascading Dropdowns

            Adam

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

              Spot on Alexander! Thank you.

              I’ve renamed argObj to cBoxObj and hitObj in the respective CEWPs and all is well again.

              Adam

              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

                                Viewing 15 posts - 61 through 75 (of 80 total)