Hide a field in a SharePoint edit form based on other values

We have a form (list) that we want to have everyone edit and give comments. Once everyone has edited the item, we want an “overall status” field to trigger a workflow (send extended email). Be we did not want the overall status to be changed until everyone has chimed in. To achieve this, we created a list and there was a dropdown with everyone’s name to Approve the item. The default of the dropdown was “Pending”. I used the jquery below to hide the “overall status” until there were no dropdowns that said “Pending”

$('select :selected').each(function(){
if($(this).text() == "Pending") {
$('tr:has(input[title=Overall Status])').not('tr:has(tr)').hide();
};
});

The hide code is code that Paul Galvin published here.
jquery is cool.

How to make a field in a SharePoint Edit form readonly

Paul Galvin showed how to hide a field in a SharePoint. I wanted to use this code to make a field “read only” once a from has been submitted. Forgetting about DataSheet view (for now), we can put a Content Editor Webpart on the top of the EditFrom.aspx page (to add a CEWP to the top of the edit from, append the URL to this -> EditForm.aspx?ToolPaneView=2) and include his code:

$('tr:has(input[title=Disclaimer])').not('tr:has(tr)').hide();

This will hide the filed based on the Column Name (Disclaimer). Taking this a step further, we can get the selected value (a drop down box in this case), and append a column after the hidden column with some formatting, a column name and the selected value. Effectively making the column readonly.

<script type="text/javascript">
$(document).ready(function(){
$('tr:has(select[title=Disclaimer])').not('tr:has(tr)').hide();
$('tr:has(select[title=Disclaimer])').not('tr:has(tr)').append( '<tr><td nowrap="true" valign="top" width="190px" class="ms-formlabel"><H3 class="ms-standardheader">Disclaimer Accepted:</H3></TD><td valign="top" class="ms-formbody" width="400px">'+$('select[title=Disclaimer] :selected').text()+'</td></tr>');
});
</script>

New to my .bashrc

alias GetExtIP=”wget -q -O – checkip.dyndns.org|sed -e ‘s/.*Current IP Address: //’ -e ‘s/<.*$//'”

Now I can know what my external IP is!!!

Default MAPI profiles after using Office Customization Tool

We are rolling out a new windows 7 desktop (via sccm task sequence) and one of the packages is the newly released Office 2010. I have been using OCT to modify the outlook profile via a PRF file. We want to take advantage of “cached mode” so that is one of the setting I use the PRF and OCT to set. What if I wanted to change the behavior of one machine, so that it does not use “cached mode”? Do I have to re-install office?

Seems that the default mapi profile is created by importing the PRF file. In windows 7, this registry setting can be found here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\User Settings\{GUID}\Create\Software\Microsoft\Office\14.0\Outlook\Setup\ImportPRF

And in Windows 2008 R2 X64 it is here:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\User Settings\{GUID}\Create\Software\Microsoft\Office\14.0\Outlook\Setup\ImportPRF

Just have this registry key (using 8.3 names) point to a PRF with different settings and the new MAPI profiles will use this PRF.

Just discovered TSConfig.INI

I can now customize my winpe to run a VNC Server from a batch using TSConfig.INI and [CustomHook]. In theory, I can use “Create task sequence media” to create a thumb drive, that will reboot into winpe, and I can connect via WinVNC to continue the lite touch task sequence.

I really need to sit down and read the documentation. What else am I missing?

Powered by WordPress. Designed by WooThemes