Stump the Panel User Favorites: CGlaves http://www.endusersharepoint.com/STP/ Paul Grenier, Lead Moderator en Fri, 20 Feb 2009 00:05:04 +0000 CGlaves on "HTML calculated column filter display" http://www.endusersharepoint.com/STP/topic/html-calculated-column-filter-display#post-4346 Wed, 18 Feb 2009 11:30:09 +0000 CGlaves 4346@http://www.endusersharepoint.com/STP/ <p>Awesome, thanks for the help. </p> AutoSponge on "HTML calculated column filter display" http://www.endusersharepoint.com/STP/topic/html-calculated-column-filter-display#post-4285 Tue, 17 Feb 2009 11:42:12 +0000 AutoSponge 4285@http://www.endusersharepoint.com/STP/ <p>I think what you want is here, about half-way down the page:<br /> <a href="http://www.endusersharepoint.com/STP/topic/counting-values/page/2" rel="nofollow">http://www.endusersharepoint.com/STP/topic/counting-values/page/2</a> </p> jaxkookie on "HTML calculated column filter display" http://www.endusersharepoint.com/STP/topic/html-calculated-column-filter-display#post-4256 Mon, 16 Feb 2009 10:30:42 +0000 jaxkookie 4256@http://www.endusersharepoint.com/STP/ <p>I can not find the latest version, would you mind posting a link or reference, please? </p> EndUserSharePoint on "HTML calculated column filter display" http://www.endusersharepoint.com/STP/topic/html-calculated-column-filter-display#post-4181 Thu, 12 Feb 2009 16:57:59 +0000 EndUserSharePoint 4181@http://www.endusersharepoint.com/STP/ <p>Chris - Yep. Do you have the latest version? Paul Grenier added a snippet at the bottom of the web part that turns off the filtering function in the column. -- Mark </p> CGlaves on "HTML calculated column filter display" http://www.endusersharepoint.com/STP/topic/html-calculated-column-filter-display#post-4171 Thu, 12 Feb 2009 11:58:54 +0000 CGlaves 4171@http://www.endusersharepoint.com/STP/ <p>Was there ever a fix for to improve the filter drop-down box for the “HTML calculated column” so it didnt display like so:</p> <p><a href="http://pathtosharepoint.files.wordpress.com/2009/01/filterhtml.png?w=277&#38;h=245" rel="nofollow">http://pathtosharepoint.files.wordpress.com/2009/01/filterhtml.png?w=277&#38;h=245</a> </p> bensch on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/3#post-2589 Thu, 20 Nov 2008 06:44:45 +0000 bensch 2589@http://www.endusersharepoint.com/STP/ <p>Durr!<br /> Thanks Paul, that works a treat. Much better than modifying / customising in SPD.<br /> Ben </p> AutoSponge on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/3#post-2572 Wed, 19 Nov 2008 17:30:35 +0000 AutoSponge 2572@http://www.endusersharepoint.com/STP/ <p>You didn't copy my script exactly :)</p> <p>Look again. I replaced innerHTML with two references, innerText and textContent because FF and IE don't use the same one. With these, they ignore the span element and only see the text, so you can reference the * without the span.</p> <p>Copy my script above and try again. </p> bensch on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/3#post-2567 Wed, 19 Nov 2008 15:49:26 +0000 bensch 2567@http://www.endusersharepoint.com/STP/ <p>Hi Paul,</p> <p>Thanks for that I am slowly getting my head around what this script is doing... !</p> <p>It doesn't work yet but I think that may because of the span around the asterisk. </p> <p>May amended script is:</p> <p><code><br /> &lt;script type="text/javascript"&gt;</p> <p>_spBodyOnLoadFunctionNames.push("hideFieldsAfter");</p> <p>function hideFieldsAfter() {<br /> var a = ['Impact of Not Implementing Change *']; //last visible field<br /> var tags = document.getElementsByTagName("NOBR");<br /> for (var i=0; i &lt; tags.length; i++) {<br /> var trtag = tags[i].parentNode.parentNode.parentNode;<br /> var name = tags[i].innerHTML;<br /> if (name == a){<br /> var b = i;<br /> }<br /> if ((trtag.tagName == "TR")&#38;&#38;([i] &gt; b)){<br /> trtag.style.display = 'none';<br /> }<br /> }<br /> }</p> <p>&lt;/script&gt;<br /> </code></p> <p>And the tag that the script looks for is:</p> <p><code><br /> &lt;nobr&gt;Impact of Not Implementing Change&lt;span class="ms-formvalidation"&gt; *&lt;/span&gt;&lt;/nobr&gt;</p> <p></code></p> <p>Cheers<br /> Ben </p> AutoSponge on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/3#post-2555 Wed, 19 Nov 2008 11:39:22 +0000 AutoSponge 2555@http://www.endusersharepoint.com/STP/ <p>Try this (change 'Title' to whatever your last field is):</p> <pre><code>&lt;script type=&quot;text/javascript&quot;&gt; _spBodyOnLoadFunctionNames.push(&quot;hideFieldsAfter&quot;); function hideFieldsAfter() { var a = [&#39;Title *&#39;]; //last visible field var tags = document.getElementsByTagName(&quot;NOBR&quot;); for (var i=0; i &lt; tags.length; i++) { var trtag = tags[i].parentNode.parentNode.parentNode; var ieName = tags[i].innerText; var name = tags[i].textContent; if (name == a||ieName == a){ var b = i; } if ((trtag.tagName == &quot;TR&quot;)&#38;&#38;([i] &gt; b)){ trtag.style.display = &#39;none&#39;; } } } &lt;/script&gt;</code></pre> bensch on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/3#post-2552 Wed, 19 Nov 2008 09:41:41 +0000 bensch 2552@http://www.endusersharepoint.com/STP/ <p>Hi Paul,<br /> I used your JavaScript to hide all fields below Status on a NewForm.aspx and it worked a treat on my local test site.</p> <p><code><br /> &lt;script type="text/javascript"&gt;</p> <p>_spBodyOnLoadFunctionNames.push("hideFieldsAfter");</p> <p>function hideFieldsAfter() {<br /> var a = ['Status']; //last visible field<br /> var tags = document.getElementsByTagName("NOBR");<br /> for (var i=0; i &lt; tags.length; i++) {<br /> var trtag = tags[i].parentNode.parentNode.parentNode;<br /> var name = tags[i].innerHTML;<br /> if (name == a){<br /> var b = i;<br /> }<br /> if ((trtag.tagName == "TR")&#38;&#38;([i] &gt; b)){<br /> trtag.style.display = 'none';<br /> }<br /> }<br /> }</p> <p>&lt;/script&gt;<br /> </code></p> <p>When I tried to implement on our live site the script had no effect...</p> <p>I returned to the test site to replicate the problem and found that if the field that is used in the variable a is a Required field the script does not hide the subsequent fields. If you remove the Required option the script runs fine.</p> <p>Do you (or anyone else) have an idea on making this script work with the final field being Required?</p> <p>Many thanks<br /> Ben </p> AutoSponge on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/3#post-2434 Fri, 14 Nov 2008 18:57:30 +0000 AutoSponge 2434@http://www.endusersharepoint.com/STP/ <p>Jan blogged about using YASR to create alerts based on a view:<br /> <a href="http://weblogs.asp.net/jan/archive/2006/06/13/YASR_3A00_-Alerts-in-SharePoint-2007.aspx" rel="nofollow">http://weblogs.asp.net/jan/archive/2006/06/13/YASR_3A00_-Alerts-in-SharePoint-2007.aspx</a> </p> mlv289 on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/3#post-2373 Wed, 12 Nov 2008 15:08:47 +0000 mlv289 2373@http://www.endusersharepoint.com/STP/ <p>I'm back, thought I would keep this on the same posting as it has to do with another step. I set up an alert to send out the results of these list items on a daily basis. When I get the email, it still has the hidden columns showing. Is there a way to control what is sent out/how the email looks? </p> mlv289 on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/3#post-2146 Tue, 28 Oct 2008 12:34:38 +0000 mlv289 2146@http://www.endusersharepoint.com/STP/ <p>Okay, i got it on my test. Fantastic.<br /> Thanks everybody who contributed! I will probably be back though :) </p> mlv289 on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/3#post-2144 Tue, 28 Oct 2008 12:20:40 +0000 mlv289 2144@http://www.endusersharepoint.com/STP/ <p>Mark - Its seems i brought up the CEWP on the wrong area. I did it on the AllItems.aspx page, except I had already created a customized view so it was actually my own "summary%20view.aspx". Anyway, I put the code on that page, and it blanked out my view. Rookie mistake I suppose. To get around it I just typed in the AllItems.aspx so I could see all the data we have on there, and then recreated my "summary" view. The "blown-up" one is still available but unusable.<br /> so...Christophe - I should open up the page that has a "/DispForm.aspx?" and at the end of where it says "/DispForm.aspx?" delete what is after and add "ToolPaneView=2" then open up the CEWP, add code and the majic happens? I am going to try it on a test page (duh).<br /> Thanks! </p> Christophe on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/3#post-2127 Mon, 27 Oct 2008 22:05:21 +0000 Christophe 2127@http://www.endusersharepoint.com/STP/ <p>As I mentioned, you'd better not edit a default SharePoint form in SPD.</p> <p>The workarounds:<br /> - append ?ToolPaneView=2 to the URL to add Web Parts, for example a Content Editor Web Part (note that this method is not supported by Microsoft)<br /> - if the code of the CEWP blows up the page, use ?contents=1 to remove the faulty Web Part<br /> - if you need to use SPD, create a copy of the form, and keep the original form as backup.</p> <p>(I am re-posting the link with the details:<br /> <a href="http://pathtosharepoint.wordpress.com/2008/08/10/the-content-editor-web-part/" rel="nofollow">http://pathtosharepoint.wordpress.com/2008/08/10/the-content-editor-web-part/</a>)</p> <p>Christophe </p> EndUserSharePoint on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/3#post-2121 Mon, 27 Oct 2008 20:00:56 +0000 EndUserSharePoint 2121@http://www.endusersharepoint.com/STP/ <p>What happened? It would be nice to see a case study on how you demolished your list and then found your way back to safety. -- Mark </p> mlv289 on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/2#post-2120 Mon, 27 Oct 2008 19:55:41 +0000 mlv289 2120@http://www.endusersharepoint.com/STP/ <p>Well, nevermind on that previous post, I fixed, or should I say worked around it. I will try again when I get the nerve again. </p> mlv289 on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/2#post-2118 Mon, 27 Oct 2008 19:26:37 +0000 mlv289 2118@http://www.endusersharepoint.com/STP/ <p>Well....I think I just blew up my list. I just see a blank area where my list summary view used to be. Any help on removing the source code I put in to get my summary view back? </p> Dessie Lunsford on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/2#post-2020 Wed, 22 Oct 2008 11:05:42 +0000 Dessie Lunsford 2020@http://www.endusersharepoint.com/STP/ <p>Christophe,<br /> Y'know, its times like this that I really need to go back through my (+500 and counting) favorites and reorganize them (yet) again. At one point (now that you've reminded me), I did come across this technique a while back and thought that I'd bookmarked it, but for the life of me I cant seem to find it (bookmarking your's now).</p> <p>Great tip!!! Much easier, especially for those without access to SPD.</p> <p>- Dessie </p> Christophe on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/2#post-2014 Wed, 22 Oct 2008 04:42:22 +0000 Christophe 2014@http://www.endusersharepoint.com/STP/ <p>A quick tip: you don't need SPD to add a script to DispForm.aspx. Just append ToolPaneView=2 to the URL and drop a Content Editor Web Part in the page.</p> <p>(more here:<br /> <a href="http://pathtosharepoint.wordpress.com/2008/08/10/the-content-editor-web-part/" rel="nofollow">http://pathtosharepoint.wordpress.com/2008/08/10/the-content-editor-web-part/</a>)</p> <p>Christophe </p> Dessie Lunsford on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/2#post-2001 Tue, 21 Oct 2008 11:09:04 +0000 Dessie Lunsford 2001@http://www.endusersharepoint.com/STP/ <p>Paul,<br /> The script you posted for hiding fields on the "DispForm.aspx" page works perfectly (both versions)...Excellent job!!</p> <p>mlv289,<br /> For your purposes, you can use either script to hide the fields as they both will do the job great.<br /> To use either, open the site in SPD then open the "DispForm.aspx" page for the list and add in the script. The only thing that may throw you off a bit is that if you choose the version that will "Hide all fields following the one specified", you need to make sure and order your fields appropriately so you dont wind up hiding/displaying the wrong fields (i.e. make sure all your calculated columns are listed last - adjust this through the list settings page under "Column Ordering").<br /> The second version which allows you to specify each and every column separately (in an array) makes it so you dont have to worry about the order.</p> <p>For reference, here are the two scripts and how they would appear based on the solution we (you and I) worked out together:</p> <p>(Following Hides all fields listed (in order) after the one specified)</p> <p>&lt;script type="text/javascript"&gt;<br /> _spBodyOnLoadFunctionNames.push("hideFieldsAfter");</p> <p>function hideFieldsAfter() {<br /> var a = ['23. Complied with standard company policies'];<br /> var tags = document.getElementsByTagName("H3");<br /> for (var i=0; i &lt; tags.length; i++) {<br /> var trtag = tags[i].parentNode.parentNode;<br /> var name = tags[i].lastChild.nodeValue;<br /> if (name == a){<br /> var b = i;<br /> }<br /> if ((trtag.tagName == "TR")&#38;&#38;([i] &gt; b)){<br /> trtag.style.display = 'none';<br /> }<br /> }<br /> }<br /> &lt;/script&gt;</p> <p>(Following Hides all fields specified in an array)</p> <p>&lt;script type="text/javascript"&gt;<br /> _spBodyOnLoadFunctionNames.push("hideFields");</p> <p>function hideFields() {<br /> var a = ['C1','C2','C3','C4','C5','C6','C7','C8','C9','C10','C11','C12','C13','C14','C15','C16','C17','C18','C19','C20','C21','C22','C23'];<br /> var tags = document.getElementsByTagName("H3");<br /> for (var i=0; i &lt; tags.length; i++) {<br /> var trtag = tags[i].parentNode.parentNode;<br /> var name = tags[i].lastChild.nodeValue;<br /> if ((trtag.tagName == "TR")&#38;&#38;(name in oc(a))){<br /> trtag.style.display = 'none';<br /> }<br /> }<br /> }<br /> function oc(a)<br /> {<br /> var o = {};<br /> for(var i=0;i&lt;a.length;i++)<br /> {<br /> o[a[i]]='';<br /> }<br /> return o;<br /> }<br /> &lt;/script&gt;</p> <p>Give these a try and let us know how things work.</p> <p>- Dessie </p> AutoSponge on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/2#post-1998 Tue, 21 Oct 2008 08:16:57 +0000 AutoSponge 1998@http://www.endusersharepoint.com/STP/ <p>I took your suggestions and made another modification. This script does not need to know column names, it will turn off filtering for any calculated column:</p> <pre><code>&lt;script type=&quot;text/javascript&quot;&gt; _spBodyOnLoadFunctionNames.push(&quot;filterOff&quot;); function filterOff() { var tags = document.getElementsByTagName(&quot;TABLE&quot;); for (var i=0; i &lt; tags.length; i++) { if (tags[i].textContent){ var name = tags[i].textContent; }else{ var name = tags[i].innerText; //for IE } for(var x = 0; x &lt; tags[i].attributes.length; x++) { if(tags[i].attributes[x].nodeName.toLowerCase() == &#39;fieldtype&#39;) { if (tags[i].attributes[x].nodeValue == &#39;Calculated&#39;) { tags[i].setAttribute(&quot;Filterable&quot;,&quot;FALSE&quot;); } } } } } &lt;/script&gt;</code></pre> <p>As Christophe said, adding a line for "sorting off" is fairly simple. </p> Christophe on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/2#post-1994 Tue, 21 Oct 2008 02:25:03 +0000 Christophe 1994@http://www.endusersharepoint.com/STP/ <p>OK. This would disable both filtering and sorting:<br /> tags[i].setAttribute("Filterable","FALSE");<br /> tags[i].setAttribute("Sortable","FALSE"); </p> EndUserSharePoint on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/2#post-1993 Tue, 21 Oct 2008 02:17:30 +0000 EndUserSharePoint 1993@http://www.endusersharepoint.com/STP/ <p>Christophe - Good feedback, thanks. I'm going to present with what I have now and I'll let you know how it goes. -- Mark </p> Christophe on "Counting Values" http://www.endusersharepoint.com/STP/topic/counting-values/page/2#post-1992 Tue, 21 Oct 2008 02:14:34 +0000 Christophe 1992@http://www.endusersharepoint.com/STP/ <p>Oh, one more thing: it could also be a good idea to remove the sorting option for some calculated columns (sorting on the HTML string may not return what the user expects). </p>