tag:blogger.com,1999:blog-79311319716852837922024-03-14T01:38:42.953-07:00Jessica Wang's BlogShare Point and other random informationJessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-7931131971685283792.post-45458559994912864352010-05-27T20:38:00.000-07:002010-05-27T20:38:54.653-07:00MOSS Usage Reports explainedI got an email from a client asking me about MOSS usage reporting and why the numbers seems to not match up. After some googling, I found a great <a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Components-PostAttachments/00-08-92-78-09/MOSS-Usage-Reports-explained.doc">document</a> with detailed description of parameters displayed in the usage reports.Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com0tag:blogger.com,1999:blog-7931131971685283792.post-12341555236591592932010-05-05T21:21:00.000-07:002010-05-05T21:30:15.113-07:00Viewing your SP 2007 files using Outlook 2010<span style="font-family: Arial, Helvetica, sans-serif;">You can connect a list/library on <span class="goog-spellcheck-word" style="background: #ffffff;">SharePoint</span> 2007 to your Outlook 2010. Doing so will allow you to </span><br />
<ul><li><span style="font-family: Arial, Helvetica, sans-serif;">preview document from Outlook</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">post reply to discussions via Outlook</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">search within the connected list/library using Outlook Instant Search</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">it enables offline access and editing</span></li>
</ul><span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><strong><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">Synchronise items to Outlook</span></strong><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #073763;">Step 1</span></strong> Navigate to a <span style="background-color: white;"><span class="goog-spellcheck-word" style="background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: repeat;">SharePoint</span> library</span> or list that you want to sync with Outlook.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #073763;">Step 2</span></strong> Click on Actions from the toolbar and select Connect to Outlook.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgsxbR02dKy9Cu9nWvaPgZMuIq2bPwBaWHfG8FZeMPorBNPUIy8TWCo1nofWrbUdItjAjAT804Llq4g0H03jXDaIebfMlwHOx3JUsRPuQcKiPQ14QvXc7OD8DSl9h5QU0KDJzf1ePMZLmN/s1600/Actions.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgsxbR02dKy9Cu9nWvaPgZMuIq2bPwBaWHfG8FZeMPorBNPUIy8TWCo1nofWrbUdItjAjAT804Llq4g0H03jXDaIebfMlwHOx3JUsRPuQcKiPQ14QvXc7OD8DSl9h5QU0KDJzf1ePMZLmN/s200/Actions.png" tt="true" width="173" /></a></div><div></div><span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #073763;">Step 3</span></strong> A windows will pop up requesting for permission to access Outlook, click Allow.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxXgyl9rGXmmaSoRb90xOXWOEfadxTnWgPp9pDlN46iTXEkB7V4SCyXy4ZH197FVLFSNWdzd-F1g5QBqnNV9SWeORsZJWrk62ebKvGWDskT9EGmN-8RGUfNeHogp8Ddhq49vjx-GHNcqOn/s1600/warning.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="140" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxXgyl9rGXmmaSoRb90xOXWOEfadxTnWgPp9pDlN46iTXEkB7V4SCyXy4ZH197FVLFSNWdzd-F1g5QBqnNV9SWeORsZJWrk62ebKvGWDskT9EGmN-8RGUfNeHogp8Ddhq49vjx-GHNcqOn/s200/warning.png" tt="true" width="200" /></a></div><div></div><span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #073763;">Step 4</span></strong> The library is now connected to Outlook and can be found in your left navigation pane in </span><span style="font-family: Arial, Helvetica, sans-serif;">Outlook under<span style="background-color: white;"> <span class="goog-spellcheck-word" style="background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: repeat;">SharePoint</span> Lists</span> header. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_WYSybYdBAeyVPJNPpGfUrpqMWRyhllMUx8RXngtdE9n3Km5a7f92Uh0-DyF8BTU12-nNtQQd7_uAI76FoZSbnMU8KyzxGfmAi_tC2rmfqzMEHzcaS4goyu7DIQ_-fEfRGFAc28miu6gJ/s1600/outlook+left+pane+edited.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_WYSybYdBAeyVPJNPpGfUrpqMWRyhllMUx8RXngtdE9n3Km5a7f92Uh0-DyF8BTU12-nNtQQd7_uAI76FoZSbnMU8KyzxGfmAi_tC2rmfqzMEHzcaS4goyu7DIQ_-fEfRGFAc28miu6gJ/s320/outlook+left+pane+edited.png" tt="true" /></a></div><div></div><span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div><span style="font-family: Arial, Helvetica, sans-serif;"></span></div><strong><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">Preview Document</span></strong><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;">Select the document from the connected list in Outlook and the document content will be shown in the Reading Pane. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc90UxgYbP3ObuwPiktq8bX2Q_QuzaNjd8iIBllveJ4SY1h6jqnGFnRhH_FKUlQz9FPIzqpFaKn_2eYd3D7lz3mQajQRjoHr-xY7a4wJnQOgmvQXBFRoyI2He6BX6TBPV5yJKIP9sImjab/s1600/reading+pane+edited.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc90UxgYbP3ObuwPiktq8bX2Q_QuzaNjd8iIBllveJ4SY1h6jqnGFnRhH_FKUlQz9FPIzqpFaKn_2eYd3D7lz3mQajQRjoHr-xY7a4wJnQOgmvQXBFRoyI2He6BX6TBPV5yJKIP9sImjab/s400/reading+pane+edited.png" tt="true" width="400" /></a></div><div></div><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><br />
<br />
<strong><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">Offline access and editing</span></strong></span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><strong>SharePoint</strong></span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white;"><span style="background-color: white;"><span class="goog-spellcheck-word" style="background: yellow;"><span style="background-color: white;"></span></span></span></span></span><span style="font-family: Arial, Helvetica, sans-serif;"></span></span><br />
<div><div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"><br />
</div></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: black;">Documents that you have edited will have an icon to indicate that the changes have not been saved to <span style="background-color: white;"><span class="goog-spellcheck-word" style="background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: repeat;">SharePoint</span>.</span></span> </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span></div><div><div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"><br />
</div></div><span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-S8L_qPCRbSfhjkyGtVr0J13KXnuxS7BXuX2AmhnyWsy7dTJxWlvBFJENz7LZjyEK5U9_1k1FVI5hHzLac6-_Kn1EZUrfElR7nj_zAEnYcwHASSOlMbvAKLQpWVEreI2Ki5H9RVq74M1N/s1600/offline+file+edited.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><strong><img border="0" height="107" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-S8L_qPCRbSfhjkyGtVr0J13KXnuxS7BXuX2AmhnyWsy7dTJxWlvBFJENz7LZjyEK5U9_1k1FVI5hHzLac6-_Kn1EZUrfElR7nj_zAEnYcwHASSOlMbvAKLQpWVEreI2Ki5H9RVq74M1N/s400/offline+file+edited.png" tt="true" width="400" /></strong></a></div><div></div><span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #073763;"><strong>Step 1</strong></span> <span style="color: black;"><em>Double click</em> the document to open it</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #073763;"><strong>Step 2</strong></span> <span style="color: black;">Click on <strong>File</strong> and select <strong>Check In</strong></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div><span style="color: black;"></span></div><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #073763;"><strong>Step 3</strong></span> <span style="color: black;">Select the type of check in and enter comments pertaining to the changes made to this</span></span><span style="color: black;"><span style="font-family: Arial, Helvetica, sans-serif;"> document and click <strong>OK</strong>.</span></span><br />
<span style="color: black;"><br />
</span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBxqsdDxtevxpvcNWLjuMvvRZhTAzkh93UFhBgTUOyZCfNOqpd-_wchO0nNVdhmSLbHUSOqlYxS16ZSl5Tk7lhLuMmCiYTW618-r15Yctqgh3BeeuhC0OphOM1ioIgU2mfYtnSdaNtJOU8/s1600/check+in+file+edited.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><strong><img border="0" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBxqsdDxtevxpvcNWLjuMvvRZhTAzkh93UFhBgTUOyZCfNOqpd-_wchO0nNVdhmSLbHUSOqlYxS16ZSl5Tk7lhLuMmCiYTW618-r15Yctqgh3BeeuhC0OphOM1ioIgU2mfYtnSdaNtJOU8/s400/check+in+file+edited.png" tt="true" width="400" /></strong></a><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #073763;"><strong></strong></span></span></div><div class="separator" style="clear: both; text-align: left;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #073763;"><strong>Check in your offline document onto SharePoint</strong></span></span></div><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #073763;"><strong>Step 1</strong></span> <span style="color: black;"><em>Double click</em> the document in Outlook to open it.</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #073763;"><strong>Step 2</strong></span> <span style="color: black;">Click on <strong>Edit Offline</strong></span><strong> </strong></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIusWcXxf_juK1TsaQ3l4rfP39owOcCCYuiwuhEynvl0byKaIUkfhFMtGb_omoPw2_Al_MVToKuNXuv1MkShb5QU-BaZZEz20RWB1c14tEF0LkZbFDeeIolcIKZt-ddGtRJ4r-9fEdUMWq/s1600/word+edited.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><strong><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIusWcXxf_juK1TsaQ3l4rfP39owOcCCYuiwuhEynvl0byKaIUkfhFMtGb_omoPw2_Al_MVToKuNXuv1MkShb5QU-BaZZEz20RWB1c14tEF0LkZbFDeeIolcIKZt-ddGtRJ4r-9fEdUMWq/s320/word+edited.png" tt="true" /></strong></a></div><div></div><span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #073763;"><strong>Step 3</strong></span> <span style="color: black;">A pop up box will appear providing information on where your document will be </span></span><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: black;">stored when it’s being edited offline. Click <strong>OK</strong> to proceed.</span> </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBBj4w8bKITrNCry3zaj4BIm0nLlt2UR-JonStRAPn6nrirWmD2GvcvaSaPwXZr8hzZEL9AQo6dFa9CeGnF6zb8fyoG6jOMYJcDfqG_Wg9e5BpC9S5ITh51XcUxCT90FyI0tgi3BcYiZ6G/s1600/advise.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><strong><img border="0" height="112" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBBj4w8bKITrNCry3zaj4BIm0nLlt2UR-JonStRAPn6nrirWmD2GvcvaSaPwXZr8hzZEL9AQo6dFa9CeGnF6zb8fyoG6jOMYJcDfqG_Wg9e5BpC9S5ITh51XcUxCT90FyI0tgi3BcYiZ6G/s200/advise.png" tt="true" width="200" /></strong></a></div><div></div><span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<div></div><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #073763;"><strong>Step 4</strong></span> <span style="color: black;">Make your changes and save the document.</span></span>Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com0tag:blogger.com,1999:blog-7931131971685283792.post-41003650228542226102010-05-02T21:07:00.000-07:002010-05-04T20:59:13.339-07:00Hiding left navigation in SharePoint 2010To hide the left navigation in SharePoint 2010, you will need to the following to a content editor web part on the page. Place it so that its the first webpart on the page to load, otherwise, you will be able to catch a glimpse of the left navigation.<br />
<br />
<style type="text/css"><br />
<br />
<br />
#s4-leftpanel{<br />
<br />
display:none<br />
<br />
}<br />
<br />
.s4-ca{<br />
<br />
margin-left:0px<br />
<br />
} <br />
<br />
</style>Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com1tag:blogger.com,1999:blog-7931131971685283792.post-80580165964576658512010-04-13T17:52:00.000-07:002010-04-13T17:54:18.515-07:00Unable to Browse to SharePoint Site from Server - Custom Host Header<span style="color: #666666; font-family: Verdana, sans-serif;">I have created a web application with a custom host header and on the server, I am not able to browse to the site. The problem is the loopback check. To resolve this issue, I need to disable loopback check registry key.</span> <span style="color: #666666;"><br />
<span style="font-family: Verdana, sans-serif;"></span></span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;">1. Open the Registry Editor (regedit) </span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;">Caution: Incorrectly editing the registry can severely damage your system. Before making changes to the registry, you should back up any valued data on the computer.</span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;">2. Open the following key: HKLM\System\CurrentControlSet\Control\Lsa.</span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;">3. Create a new DWORD value called DisableLoopbackCheck.</span><span style="color: #666666; font-family: Verdana, sans-serif;"><br />
4. Set the value to 1.</span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;">5. Reboot the server. </span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;"><strong>Note</strong>: This is required for the change to take effect.</span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;">If this resolves the issue, there is a more secure way of making this change. Instead of making the server-wide change that DisableLoopbackCheck implements, you can disable checking for specific host names. For more information about how to do this, see the following article in the <a href="http://support.microsoft.com/kb/896861"><span style="color: blue;">Microsoft Knowledge Base</span></a></span><br />
<span style="color: #666666;"><br />
<span style="font-family: Verdana, sans-serif;"></span></span><br />
<span style="color: #666666; font-family: Verdana, sans-serif;">Information is taken from <a href="http://msdn.microsoft.com/en-us/library/ee384252.aspx"><span style="background-color: white; color: blue;">Microsoft MSDN site</span></a></span>Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com1tag:blogger.com,1999:blog-7931131971685283792.post-16359632261138518762010-01-11T20:18:00.000-08:002010-01-12T03:18:45.077-08:00WebPart Maintenance PageSharePoint gives you "An unexpected error has occured" after you dropped in a custom webpart. So how do you get to the webpart maintenance page to delete the webpart? Simple, just add <strong>?contents=1</strong> to the end of the URL. <br />
<br />
Example: <a href="http://localhost/sites/TeamA/pages/default.aspx?contents=1">http://localhost/sites/TeamA/pages/default.aspx?contents=1</a>Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com4tag:blogger.com,1999:blog-7931131971685283792.post-78211136037605730722010-01-11T20:06:00.000-08:002010-01-11T20:13:19.169-08:00Tool to migrate from Wordpress to Blogspot using Blog2BlogIts a .Net application that supports the migration of contents(excluding comments) from <br />
<br />
- Live Journal <br />
- Blogger <br />
- Wordpress <br />
<br />
to <br />
<br />
- Blogger<br />
- Live Journal<br />
- MSN Spaces<br />
- Wordpress<br />
<br />
Link to the <a href="http://linuxlore.blogspot.com/2007/09/livejournal-to-blogger-or-blogger-to.html">author's blog</a> and link to the <a href="http://www.paulcooley.com/linuxlore_blogstorage/apps/blog2blog/blog2blog-2.5.0.0.zip">software</a>Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com1tag:blogger.com,1999:blog-7931131971685283792.post-46175789099355359012009-11-29T18:11:00.000-08:002010-01-11T20:11:37.439-08:00Add stsadm to pathHow to add stsadm to path so that you will not need to point it to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN to use it. <br />
<br />
Just type in @set PATH=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN;%PATH% in the command prompt.Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com0tag:blogger.com,1999:blog-7931131971685283792.post-75913983108483391752009-04-08T07:39:00.000-07:002010-01-11T20:11:00.842-08:00Site Owner is unable to create sub sites - Access deniedSpecial thanks to Neville Pinto and Brain Farnhill who helped me with this problem.<br /><br /><strong>The problem:</strong><br />1. Owner of site C which is located under <a href="http://top/sites/siteC">http://top/sites/siteC</a> cannot create a subsite under site C<br />2. Owner has read only rights on <a href="http://top">http://top</a> <br />3. <a href="http://top/sites">http://top/sites</a> inherits all permissions from parent site<br />4. Access denied error when creating a subsite on site C<br /><br /><strong>The solution</strong> is that straight forward, just that it didn't occur to me!! <br />1. The site owner needs to have contribute rights to the Site Directory. <br />2. Break inheritance on site list on <a href="http://top/sites">http://top/sites</a> and give owner of site C contributor rights <br /><br />Problem solved!<br />Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com1tag:blogger.com,1999:blog-7931131971685283792.post-69357127667815567222009-04-08T07:27:00.000-07:002010-01-11T20:13:46.238-08:00I passed my 74-674 BVPS examI passed my BVPS exam on Monday 30th March. It is a bit late to blog about it but what the hell. <br /><br />I found the materials on <a href="https://iwsolve.partners.extranet.microsoft.com/BVPS/Resources.aspx">BVPS</a> extremely helpful, especially the study guide. I guess the key to it is to be mentally prepared to read 5 case studies and when in doubt, always go back to the case study. :) Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com2tag:blogger.com,1999:blog-7931131971685283792.post-48360579359978582192009-02-01T03:20:00.000-08:002010-01-11T20:11:37.440-08:00Custom Application.master - workflow errorI have a custom application.master page to customise the look and feel of the _layout page. I accidentally copied the search control onto the application.master. All works well until you try to create a workflow and it would not work, and you will recieve an error(not very friendly error). Existing workflow can be used, you just can't create new workflows.<br /><br />So if you have the same problem as I do, I hope this post saves you some time.Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com1tag:blogger.com,1999:blog-7931131971685283792.post-5720095644737474482009-01-22T07:43:00.000-08:002010-01-11T20:13:46.238-08:00Make A Promise To Go Green And Get 250 GB Free File HostingI know this is not related to SharePoint in any way but we need to save the earth besides there is a bonus for you. Do your bit for the earth and pledge now.<br /><br />I promise to <br />1. not print out documents to read whenever possible. <br />2. print on recycle paper and on both sides. Do you?<br />3. switch off all appliances (except the fridge) at the power outlet whenever they are not in use. Do you?<br /><br /><a href="http://www.smashingapps.com/2009/01/20/make-a-promise-to-go-green-and-get-250-gb-free-file-hosting.html">http://www.smashingapps.com/2009/01/20/make-a-promise-to-go-green-and-get-250-gb-free-file-hosting.html</a>Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com0tag:blogger.com,1999:blog-7931131971685283792.post-39474186813032044882008-10-12T11:20:00.000-07:002010-01-11T20:14:06.432-08:00Increase Size of Site Template using STSADMTo increase the size of the default sharepoint template size for Sites<br /><br /> Run Command Prompt, Type in<br /><br />stsadm -o setproperty -pn max-template-site-size -pv 200000000<br /><br />The line above will change the max size that can be saved as a site template to 20MB, the default value that is set is ony 10MB.Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com1tag:blogger.com,1999:blog-7931131971685283792.post-70769990087862885462008-10-01T13:18:00.000-07:002010-01-11T20:11:37.440-08:00Global variables in Javascript<strong>L_Menu_BaseUrl</strong> - the base URL of the site.<br /><br /><strong>L_Menu_LCID - </strong>the LCID of the site you're in. Useful if you need to determine the language of the site.<br /><br />.<br /><strong>L_Menu_SiteTheme - </strong>the name of the theme applied to the site.<br /><br />There is one more useful variable, but this one can't be used on custom master pages that you created. This one is used in the SharePoint's default pages:<br /><br /><strong>_spUserId</strong> - the ID of the logged in userJessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com0tag:blogger.com,1999:blog-7931131971685283792.post-55595593034292192782008-07-12T07:12:00.000-07:002010-01-11T20:12:17.868-08:00Display site members from AD GroupsI recently have to do this for a client. The web part is suppose to display a list of all users from the Sharepoint Security groups for every site. The out of the box webpart(Site Users) will display only the name of the AD group and not the members within it.<br /><br />To get started, it is easier if you installed the Webpart templates for VS.NET<br /><br />Created a solution using webpart template and you are ready to go.<br /><br /><strong>Call this function to pass in the name of the ADgroup and it will return a list of users name.</strong><br /><table border="1" cellspacing="0" cellpadding="0"><br /><tbody><br /><tr><br /><td width="616" valign="top">//Query Active Directory to get users from Active Directory Groups<br /><br />public StringCollection GetGroupMembers(stringstrGroup)<br /><br />{StringCollection groupMemebers = new StringCollection(); <br /><br />try<br /><br />{DirectoryEntry ent = new DirectoryEntry(<a href="//OU=youOU,DC=yourDC/">LDAP://OU=youOU,DC=yourDC</a>);<br /><br />DirectorySearcher srch = new DirectorySearcher("(CN=" + strGroup + ")");<br /><br />SearchResultCollection coll = srch.FindAll(); <br /><br />foreach (SearchResult rs in coll)<br /><br />{ResultPropertyCollection resultPropColl = rs.Properties;<br /><br />foreach (Object memberColl in resultPropColl["member"])<br /><br />{DirectoryEntry gpMemberEntry = new DirectoryEntry("LDAP://"+ memberColl);<br /><br />System.DirectoryServices.PropertyCollection userProps = gpMemberEntry.Properties;<br /><br />//getting user properties from AD<br /><br />object obVal = userProps["displayName"].Value;<br /><br />object obAcc = userProps["sAMAccountName"].Value;<br /><br />if (null != obVal) {<br /><br /> groupMemebers.Add( "User Name:" +obAcc.ToString() + ", User login name:" + obVal.ToString() + "<br>");}}}}<br /><br />catch (Exception ex)<br /><br />{//writer.Write(ex.Message);}<br /><br />Return groupMemebers;</td><br /></tr><br /></tbody></table><br /><strong>To get the names of the current site users from Sharepoint Security Groups:</strong><br /><table border="1" cellspacing="0" cellpadding="0"><br /><tbody><br /><tr><br /><td width="616" valign="top">ArrayList belongToDomain = new ArrayList();<br /><br />ArrayList names = new ArrayList();<br /><br />using(SPSite collSite = new SPSite(SPContext.Current.Site.ID))<br /><br />{using (SPWeb elevatedWeb = collSite.OpenWeb(SPContext.Current.Web.ID))<br /><br />{//All users in the site<br /><br />SPUserCollection collUser = SPContext.Current.Web.AllUsers;<br /><br />SPGroupCollection collgroup = SPContext.Current.Web.Groups;<br /><br />//for each item in the collection of groups<br /><br />foreach (object group in collgroup){<br /><br />//display all users other then the visitors<br /><br />if (group.ToString() != "Visitors"){<br /><br />//check that the users in the whole site collection belongs to current site group<br /><br />foreach (SPUser singleuser in collUser)<br /><br />{//get the list of groups that the user belongs to<br /><br />foreach (SPGroup userGroup in singleuser.Groups)<br /><br />{//check if it matches any of the current site groups<br /><br />if (group.ToString() == userGroup.ToString())<br /><br />{//check if the user from the sharepoint group is a AD group<br /><br />if (singleuser.IsDomainGroup)<br /><br />{//pass the name into Array that query the AD<br /><br />belongToDomain.Add(singleuser.ToString());}<br /><br /> else{<br /><br />//otherwise add into the Array that stores list of names, in case the user name is not from an AD group.<br /><br /> names.Add(singleuser.LoginName);<br /><br />);}} }}}}}}<strong></strong></td><br /></tr><br /></tbody></table><br /><strong>Now that we have the names of the AD groups from the share point security groups and query the AD for a list of user name. It is now in the names array, we need to make sure that there are no duplicate names. So call the function below and pass in the names array.</strong><br /><table border="1" cellspacing="0" cellpadding="0"><br /><tbody><br /><tr><br /><td width="616" valign="top">//remove duplicate users name Function<br /><br />public ArrayList RemoveDups(ArrayList items)<br /><br />{<br /><br /> ArrayList noDups = new ArrayList();<br /><br /> foreach (string strItem in items)<br /><br /> {<br /><br /> if (!noDups.Contains(strItem.Trim()))<br /><br /> {<br /><br /> noDups.Add(strItem.Trim());<br /><br /> }<br /><br /> }<br /><br /> noDups.Sort();<br /><br /> return noDups;}</td><br /></tr><br /></tbody></table><br /><strong></strong>Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com0tag:blogger.com,1999:blog-7931131971685283792.post-70182057664517810632008-03-25T10:01:00.000-07:002010-05-05T23:04:34.039-07:00Display Current User Name in a pageI had to display the current user name in a page within Sharepoint, So I created this javascript to get the name from the welcome link.<br />
<br />
1. Enter the javascript within the page.aspx<br />
<br />
<span style="color: #073763;"><!– Script for displaying name –></span><br />
<span style="color: #073763;"></span><br />
<span style="color: #073763;"><script language=”javascript” type=”text/javascript”></span><br />
<span style="color: #073763;">var Loginname = document.getElementById(“zz6_Menu”).innerHTML ; </span><br />
<span style="color: #073763;">var end = Loginname.indexOf(“<”); </span><br />
<span style="color: #073763;">var nameOnly = Loginname.substring(8, end);</span><br />
<span style="color: #073763;">document.write(nameOnly);</span><br />
<span style="color: #073763;"></script></span><br />
<br />
There are 2 ways which you can get the Id which is highlighted in red.<br />
<br />
1. Right the page and view source to get the ID<br />
<br />
2. Using IE Developer Toolbar, click on the Name<br />
<br />
<a href="http://sharepointrookie.wordpress.com/files/2008/03/welcome.png" title="welcome.png"><img alt="welcome.png" height="105" src="http://sharepointrookie.wordpress.com/files/2008/03/welcome.png" width="400" /></a>Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com0tag:blogger.com,1999:blog-7931131971685283792.post-65117232319461390812008-03-25T04:43:00.000-07:002010-05-05T23:01:55.950-07:00XPath Operators<h2><a href="http://www.codeguru.com/csharp/csharp/cs_misc/designtechniques/article.php/c7589__1/">XPath Queries</a></h2><br />
<strong>/ (child operator)</strong> <br />
<br />
<span style="color: #0c343d;">Refers to the root of the XML document when used at the beginning of the XPath expression. The child operator is used to specify the next child to select. The expression "/Employees/Employee", for, example says, start at the root of the XML document, select the Employees node and then select all the Employee child nodes within the Employees node. This will return the two Employee nodes in the sample XML document.</span><br />
<br />
<strong>// (recursive descendant operator)</strong> <br />
<br />
<span style="color: #0c343d;">The recursive descendant operator indicates to include all descendant nodes in the search. Using the operator at the beginning of the XPath expression means you start from the root of the XML document. The expression "//LastName" starts at the root and finds any LastName node. The expression "/Employees//LastName" selects the Employees node and then, within that node, finds any LastName node. It yields the same result, but searches in a different way.</span><br />
<br />
<strong>* (wildcard operator)</strong> <br />
<br />
<span style="color: #0c343d;">The wildcard operator finds any node. The expression "/*" finds any node under the root, which in our case is Employees. The expression "/Employees/*" means find any node under the Employees node, which in our case results with the two Employee nodes. Now what is the difference between the "/Employees" and "/Employees/*" expression? The first expression returns the Employees node but the second node finds any node under the Employees node, meaning it returns the two Employee nodes. The expression "//*" means to select any node including descendant nodes, so it will effectively list every single node in the complete XML document.</span><br />
<br />
<strong>. (current context operator)</strong> <br />
<br />
<span style="color: #0c343d;">The current context operator refers to the current context. For example, you have written some code that selected the Employees node and then from there you run the expression "./Employee", which means it starts out from the currently selected Employees node and then selects the two Employee nodes. The expression "Employee" would yield the same result because it also starts out from the current context. Similar the expression ".//LastName" means start from the current context, the Employees node, and find any LastName node including any descendant nodes.</span><br />
<br />
<strong>.. (parent operator)</strong> <br />
<br />
<span style="color: #0c343d;">The parent operator refers to the parent. For example, the expression "/Employees/Employee/.." returns the Employees node because you navigate down to the Employee nodes and then tell it to return its parent, which is the Employees node.</span><br />
<br />
<strong>@ (attribute operator)</strong> <br />
<br />
<span style="color: #0c343d;">The attribute operator refers to an attribute instead of an element. The expression "/Employees//@ID" selects any ID attribute it finds under the Employees node. Now, keep in mind that the XPath query always returns the selected node. In the case of an attribute, the node below it is its value. So, the expression really two returns nodes, each with the value of each selected attribute. Furthermore, you can use the wildcard operator with attributes, so "/Employees//@*" means any attribute underneath the Employees node.</span><br />
<br />
<strong>[ ] (filter operator)</strong> <br />
<br />
<span style="color: #0c343d;">You can apply a filter operator to filter the selected nodes. This works with attributes and with elements. The expression "/Employees/Employee[@ID=1]" returns any Employee node under the Employees node that has an ID attribute with the value one. You also can apply filters that just say that an attribute or element with that name needs to be present. For example, the expression "/Employees/Employee[WebAddress]" returns Employee nodes that have a WebAddress node as child. The expression "/Employees/Employee[FirstName='Klaus']" returns the Employee node that has a FirstName node with the value Klaus.</span><br />
<br />
<strong>text() function</strong> <br />
<br />
<span style="color: #0c343d;">The "text()" function refers to the text of the selected node or attribute. The expression "//Employee//text()" does not list all the descendant nodes of all Employee nodes but rather the value for each descendant node. The expression "//Employee/FirstName[text()='Klaus']" lists all FirstName nodes which have a value of Klaus.</span><br />
<br />
<strong>[ ] (collection operator) </strong><br />
<br />
<span style="color: #0c343d;">When your expression returns more then one node with the same name, you have a collection returned. The expression "//Employee" returns two Employee nodes, which is nothing more than a collection of Employee nodes. You can apply a collection operator and specify which item from the collection you want to select. Keep in mind that the index starts at one. The expression "//Employee[2]" returns the second Employee node. The order of the selected nodes is the same order as in the XML document. You can use the collection operator in any blend, such as "//Employee[1]/LastName", which selects the first Employee node and then from there the LastName node.</span><br />
<br />
<strong>( ) (group operator)</strong> <br />
<br />
<span style="color: #0c343d;">The collection operator can sometimes have some odd side effects. Assume you have two Employee nodes and each has two Job nodes. What does the expression "//Employee/Job[1]" return? It returns the first Job node for each selected Employee node. But, using the group operator allows you to apply explicit precedence to selections. The expression "(//Employee/Job)[4]" first selects all Job nodes for all Employee nodes and from that collection it returns the fourth node. The group operator can only be applied to the top level expression; for example, "//Employees/(Employee/FirstName)" is invalid.</span><br />
<br />
<strong>comment() function</strong> <br />
<br />
<span style="color: #0c343d;">Returns a comment node. The expression "//comment()" returns any comment node in the XML. The expression "/Employees/comment()" returns the comment nodes under the Employees node.</span><br />
<br />
<strong>node() function</strong> <br />
<br />
<span style="color: #0c343d;">XML documents consist of elements, attributes, and their values, each being a node. So, in XPath expressions you can use a node() function instead of a node name or the text() function. It is a generic way to address a node. The expressions "//Employee/JobTitle/node()" and "//Employee/JobTitle/text()" return the same result, the value of both JobTitle nodes. But, "//Employee//node()" will not just return the elements but also the values of each element, because both are nodes.</span><br />
<strong>| (union</strong> <strong>or set operator)</strong> <br />
<br />
<span style="color: #0c343d;">Returns the union of one or more location paths. The expression "//LastName </span><br />
<span style="color: #0c343d;">//FirstName" returns all the LastName and FirstName nodes. It preserves the order of the elements as in the XML and does not return any duplicates. The two location paths "//Employee[@ID=1] </span><br />
<span style="color: #0c343d;">//Employee[FirstName='Klaus']" return the same nodes but the union of these two returns just the one unique node.</span>Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com0tag:blogger.com,1999:blog-7931131971685283792.post-36712541779398742522008-03-25T04:42:00.000-07:002010-05-05T22:52:57.586-07:00Customizing RSS Viewer to display Weather.com forecast<span style="font-family: Arial, Helvetica, sans-serif;">Step 1: Register for Free at </span><a href="http://weather.com/"><span style="font-family: Arial, Helvetica, sans-serif;">Weather.com</span></a><span style="font-family: Arial, Helvetica, sans-serif;"> to get your Partner ID and License Key</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Step 2: Enter</span><a href="http://xoap.weather.com/weather/local/ASXX0075?cc=*&dayf=6&par=PartnerID&prod=xoap&unit=m&key=LicenseKey"><span style="font-family: Arial, Helvetica, sans-serif;"> http://xoap.weather.com/weather/local/ASXX0075?cc=*&dayf=6&par=PartnerID&prod=xoap&unit=m&key=LicenseKey</span></a><span style="font-family: Arial, Helvetica, sans-serif;"> into RSS Feed URL</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Step 3: Edit the XSL</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br />
</span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><?xml version=”1.0″ encoding=”ISO-8859-1″ ?><xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”><xsl:output method=”html” indent=”yes” encoding=”iso-8859-1″ /><br />
<br />
<xsl:template match=”/weather”></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:variable name=”med-img-dir”>WeatherIcons/60×59</xsl:variable></span><br />
<br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><!–Purpose: Weather Webpart, information from Weather.com–></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:variable name=”day” select=”dayf/day[@d]“></xsl:variable></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:for-each select=”$day”></span><br />
<br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><!– Current Weather Conditions –></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><table width=”100%”></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><tr></span><br />
<br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><!–Image–></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><td style=”width: 70px;font-size: 11px” rowspan=”3″></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:variable name=”img-ext”>png</xsl:variable></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:variable name=”iconnumber” select=”part[@p='d']/icon” /></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><img src=”{$med-img-dir}/{$iconnumber}.{$img-ext}” mce_src=”{$med-img-dir}/{$iconnumber}.{$img-ext}” alt=”{$iconnumber}.{$img-ext}” width=”40″ height=”42″ /></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></td></span><br />
<br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><!–Day and Date–></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><td style=”font-size: 11px; font-weight: bold; padding:0px 0px 0px 0px” colspan=”2″></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:value-of select=”./@dt” />,</span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:value-of select=”./@t” /></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></td></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></tr></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><tr></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><td style=”font-size: 11px; padding:0px 0px 0px 0px” colspan=”2″> <br />
<xsl:value-of select=”part[@p='d']/t”/></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></td></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></tr></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><tr></span><br />
<br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><!–Temperature–></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><td style=”font-size: 11px; padding:0px 0px 0px 0px”>Min:</span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:value-of select=”low”></xsl:value-of>C </td></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><td style=”font-size: 11px; padding:0px 0px 0px 0px” >Max:</span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:value-of select=”hi”></xsl:value-of>C </td></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></tr></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></table></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></xsl:for-each></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #073763;"></xsl:template></xsl:stylesheet></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br />
</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span>Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com0tag:blogger.com,1999:blog-7931131971685283792.post-46230657372571822722008-03-25T04:32:00.000-07:002010-05-05T22:49:14.286-07:00Get User Collection from a Sharepoint Group<span style="font-family: Arial, Helvetica, sans-serif;">I have been working on getting a drop down list in Infopath to be populated with users of a Sharepoint Group. You can't connect directly to the drop drop list, so you will need to create <strong>2</strong> data sources, <strong>1</strong> to the web service and <strong>another</strong> xml file with dummy data which will be replace be information from the web service.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">1. Create a data connection to the web service using the data connection wizard.</span><br />
<u><span style="color: blue;"><span style="font-family: Arial, Helvetica, sans-serif;"><</span><a href="http://servername/_vti_bin/UserGroup.asmx?WSDL"><span style="font-family: Arial, Helvetica, sans-serif;">http://servername/_vti_bin/UserGroup.asmx?WSDL</span></a></span></u><span style="font-family: Arial, Helvetica, sans-serif;">></span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://sharepointrookie.wordpress.com/files/2008/03/dataconnection.png" style="margin-left: 1em; margin-right: 1em;" title="Data Connection"><span style="font-family: Arial, Helvetica, sans-serif;"><img alt="Data Connection" height="272" src="http://sharepointrookie.wordpress.com/files/2008/03/dataconnection.png" width="400" /></span></a></div><span style="font-family: Arial, Helvetica, sans-serif;"><br />
</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">2. Click next and select GetUserCollectionFromGroup</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">3. Enter Sample data, which is the name of the group which you wish to get data from.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">4. You will need dummy data to be connected to the drop down list first. There are 2 dummy users in the xml, it tells infopath that it is repeating.<br />
<br />
<strong><span style="color: #073763;">DummyData.xml</span></strong></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><?xml version=”1.0″ encoding=”utf-8″ ?></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #073763;"><dfs:myFields xmlns:dfs=”http://schemas.microsoft.com/office/infopath/2003/dataFormSolution” xmlns:s0=”http://schemas.microsoft.com/sharepoint/soap/directory/” xmlns:my=”http://schemas.microsoft.com/office/infopath/2003/myXSD/2004-03-16T06-17-54″ xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”> <dfs:queryFields> <s0:GetUserCollectionFromGroup> </s0:GetUserCollectionFromGroup> </dfs:queryFields> <dfs:dataFields> <GetUserCollectionFromGroupResponse xmlns=”http://schemas.microsoft.com/sharepoint/soap/directory/”> <GetUserCollectionFromGroupResult> <GetUserCollectionFromGroup> <Users> <User ID=”1″ Sid=”S-1-5-21-3593225548-2099380924-3969701235-500″ Name=”User1″ LoginName=”login1″ Email=”user1@users.com” Notes=”" IsSiteAdmin=”False” IsDomainGroup=”False”/> <User ID=”2″ Sid=”S-1-5-21-3593225548-2099380924-3969701235-1145″ Name=”User2″ LoginName=”login2″ Email=”user2@users.com” Notes=”" IsSiteAdmin=”False” IsDomainGroup=”False”/> </Users> </GetUserCollectionFromGroup> </GetUserCollectionFromGroupResult> </GetUserCollectionFromGroupResponse> </dfs:dataFields></dfs:myFields><br />
</span>5. Save the dummydata.xml and connect it via the Data Connection Wizard as well.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">6. Link the drop down list to the dummydata.xml</span><br />
<a href="http://sharepointrookie.wordpress.com/files/2008/03/dropdownlist.png" title="dropdownlist.png"><span style="font-family: Arial, Helvetica, sans-serif;"><img alt="dropdownlist.png" height="400" src="http://sharepointrookie.wordpress.com/files/2008/03/dropdownlist.png" width="390" /></span></a><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br />
</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">7. You will need to go to the loading event of the infopath form, which you can get to by going to <strong>Tools</strong>><strong>Programming</strong>><strong>Loading Event.</strong></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">It will open up Visual studio. Within the Loading Event, you will need the following piece of code.</span><br />
<br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">public void FormEvents_Loading(object sender, LoadingEventArgs e){ </span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">//Dummy Data</span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">//get an XPathNavigator to our webservice method </span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">XPathNavigator dutyManagerDummy = this.DataSources["DutyManagerListDummyData"].CreateNavigator();<br />
</span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">//create the XmlNamespaceManager that will allow us to navigate the xml</span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">XmlNamespaceManager umanager = new XmlNamespaceManager(dutyManagerDummy.NameTable);</span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">umanager.AddNamespace("dfs", http://schemas.microsoft.com/office/infopath/2003/dataFormSolution);</span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">umanager.AddNamespace("tns", <a href="http://schemas.microsoft.com/sharepoint/soap/directory/">http://schemas.microsoft.com/sharepoint/soap/directory/</a>);</span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><br />
//get the node that contains all the users from dummy data</span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">XPathNavigator DutyManagerListDummyDataName = dutyManagerDummy.SelectSingleNode("/dfs:myFields/dfs:dataFields/tns:GetUserCollectionFromGroupResponse/tns:GetUserCollectionFromGroupResult/tns:GetUserCollectionFromGroup/tns:Users", umanager);<br />
</span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">//Actual Data</span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">//get an XPathNavigator to our webservice method </span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">XPathNavigator dutyManager = this.DataSources["GetUserCollectionFromGroup"].CreateNavigator();<br />
</span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">//create the XmlNamespaceManager that will allow us to navigate the xmlXmlNamespaceManager dmanager = new XmlNamespaceManager(dutyManager.NameTable);</span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">dmanager.AddNamespace("dfs", http://schemas.microsoft.com/office/infopath/2003/dataFormSolution);</span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">dmanager.AddNamespace("tns", <a href="http://schemas.microsoft.com/sharepoint/soap/directory/">http://schemas.microsoft.com/sharepoint/soap/directory/</a>);<br />
</span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">//get the node that contains all the users from the call to the web service</span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">XPathNavigator dusers = dutyManager.SelectSingleNode("/dfs:myFields/dfs:dataFields/tns:GetUserCollectionFromGroupResponse/tns:GetUserCollectionFromGroupResult/tns:GetUserCollectionFromGroup/tns:Users", umanager);<br />
</span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">try{ </span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">//replace the dummy information from the information from the web service</span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">DutyManagerListDummyDataName.ReplaceSelf(dusers); } </span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">catch(NullReferenceException ee){}</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #073763;">}<br />
</span>Run the preview and you should see the actual data instead of the dummy information.</span>Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com0tag:blogger.com,1999:blog-7931131971685283792.post-66730035040349806002008-03-02T10:21:00.000-08:002010-05-05T22:34:25.086-07:00Customizing Content Query Webpart<span style="font-family: Arial, Helvetica, sans-serif;">Firstly, </span><a href="http://www.heathersolomon.com/blog/articles/customitemstyle.aspx" target="_blank" title="Custom Iem Style"><span style="font-family: Arial, Helvetica, sans-serif;">Heather Solomon </span></a><span style="font-family: Arial, Helvetica, sans-serif;">has an excellent article on it.</span><br />
<b><span style="font-family: Arial, Helvetica, sans-serif;"><br />
Part 1: Export Content Query Web part</span></b><br />
<ul><li><span style="font-family: Arial, Helvetica, sans-serif;">Open it up and search for CommonViewFields</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Add in Fields that you want; you will need to use the internal name and the type of data.</span></li>
</ul><span style="font-family: Arial, Helvetica, sans-serif;"></span><span style="font-family: Arial, Helvetica, sans-serif;">A good tool is </span><a href="http://download.mondosoft.com/Ontolica/SharePointExplorer_V1_5_0_For_WSS3.zip" target="_blank" title="Sharepoint Explorer for WSS"><span style="font-family: Arial, Helvetica, sans-serif;">Sharepoint Explorer for WSS</span></a><br />
<br />
<table border="1" cellpadding="0" cellspacing="0"><tbody>
<tr><td valign="top" width="638"><property name="CommonViewFields" type="string"><span style="font-family: Arial, Helvetica, sans-serif;">InternalName, DateField</span></property></td></tr>
</tbody></table><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Example: Calendar Properties</span><br />
<table border="1" cellpadding="0" cellspacing="0"><tbody>
<tr><td valign="top" width="638"><property name="CommonViewFields" type="string"><span style="font-family: Arial, Helvetica, sans-serif;">EventDate,DateTime; Description,Note; Location,Text; Property_x0020_Unit,Choice</span></property></td></tr>
</tbody></table><br />
<ul><li><span style="font-family: Arial, Helvetica, sans-serif;"> Save the Web Part and Import it back</span></li>
</ul><b><span style="font-family: Arial, Helvetica, sans-serif;"></span></b><br />
<b><span style="font-family: Arial, Helvetica, sans-serif;">Part 2: Locate ItemStyle.xsl under XSL Style Sheet</span></b><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Create your own custom Item Style</span><br />
<br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:template name=”CustomStyle” match=”Row[@Style='CustomStyle']” mode=”itemstyle”> <xsl:variable name=”SafeImageUrl”></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:call-template name=”OuterTemplate.GetSafeStaticUrl”></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:with-param name=”UrlColumnName” select=”‘ImageUrl’”/></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></xsl:call-template></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></xsl:variable></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:variable name=”SafeLinkUrl”></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:call-template name=”OuterTemplate.GetSafeLink”></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:with-param name=”UrlColumnName” select=”‘LinkUrl’”/></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></xsl:call-template></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></xsl:variable></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:variable name=”DisplayTitle”></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:call-template name=”OuterTemplate.GetTitle”></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:with-param name=”Title” select=”@Title”/></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:with-param name=”UrlColumnName” select=”‘LinkUrl’”/></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></xsl:call-template></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></xsl:variable></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:variable name=”LinkTarget”></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:if test=”@OpenInNewWindow = ‘True’” >_blank</xsl:if></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></xsl:variable></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><table></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><tr></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><td style=”width: 200px”> </span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:value-of select=”ddwrt:FormatDate(string(@EventDate),3081, 3)”/></td></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><td valign=”top” rowspan=”3″></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></td> <td class=”linkitem” style=”width: 200px”> </span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:call-template name=”OuterTemplate.CallPresenceStatusIconTemplate”/></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><a href=”{$SafeLinkUrl}” mce_href=”{$SafeLinkUrl}” target=”{$LinkTarget}” title=”mailto:%7B@LinkToolTip}”></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:value-of select=”$DisplayTitle”/></span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></a></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></td></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></tr></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><tr></span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><td rowspan=”3″ align=”left”> </span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><xsl:value-of select=”ddwrt:FormatDate(string(@EventDate),3081, 4)”/></td></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><td>Location: <xsl:value-of select=”@Location”/></td></span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></tr></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><tr></span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><td >PropertyUnit: <xsl:value-of select=”@Property_x005F_x0020_Unit “/></span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></td></span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></tr></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><tr></span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"><td> xsl:value-of select=”@Description” disable-output-escaping=”yes”/></td></span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></tr></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></table></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">To see what fields are being passed in<xsl:for-each select=”@*”></span><span style="color: #073763; font-family: Arial, Helvetica, sans-serif;">P:<xsl:value-of select=”name()” /></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></xsl:for-each></span><br />
<span style="color: #073763; font-family: Arial, Helvetica, sans-serif;"></xsl:template></span> <br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">If you want to format the </span><a href="http://msdn2.microsoft.com/en-us/library/aa505323.aspx#officesharepointddwrt_formatdate"><span style="font-family: Arial, Helvetica, sans-serif;">Date Time using ddwrt</span></a><span style="font-family: Arial, Helvetica, sans-serif;">, remember to add xmlns:ddwrt="</span><a href="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"><span style="font-family: Arial, Helvetica, sans-serif;">http://schemas.microsoft.com/WebParts/v2/DataView/runtime</span></a><span style="font-family: Arial, Helvetica, sans-serif;">" within the <stylesheet>tag.<br />
</stylesheet></span>Jessica Wanghttp://www.blogger.com/profile/14848417734460899852noreply@blogger.com1