5 Interesting things in IT, Strategy, Leadership – Week 2, 2014

Now following newly launched Yahoo Tech – http://www.yahoo.com/tech

I’ve Seen The Future Of Health Tech And It’s Going To Improve Your Life In 2014

The Best Of CES 2014 (Tech Crunch) or The Best, Worst, And Weirdest Things We Saw at CES 2014 (Yahoo Tech)

What NASA Can Teach Enterprises About Redundancy

How new devices, networks, and consumer habits will change the web experience

 

Posted in Uncategorized | Leave a comment

5 interesting things – Week 1 – 2014

Next disruptive technology – Digital Health Funding Tops $1.9 Billion in 2013

Digital Marketing trends – 6 Mobile Marketing Trends to Leverage in 2014

Entrepreneurship/Innovation – CrunchWeek 2013 In Review, Part 2: Twitter’s Big IPO, And Tech’s Rising Stars

Enterprise Software: DevOps: 5 Signs Enterprises Need to Unite the Dev and Ops Camps

On a lighter note – 10 Crazy Tech Predictions for 2014

 

Posted in Uncategorized | Leave a comment

SCOM 2007 R2 Reporting Configuration Hangs on SQL Server 2008 R2

Follow this link:

http://support.microsoft.com/kb/2425714

Data Warehouse database can be installed using DBCreationWizard on the database server itself. Dont install this database on the Reporting Server.

Posted in Uncategorized | Leave a comment

Information Architecture Exercises

Information Architecture consists of following:

  • Site Architecture (Site Map)
  • Page Architecture (Page Layouts)
  • Content Architecture (Assets libraries, document libraries, lists)
  • Links Architecture (internal & external links)
  • Metadata Architecture (content types, site columns, term stores, term set groups, term sets, terms)

Site Architecture

  • Site is a collection of web pages which is used to store information in organised way.
  • Site stores list of documents, discussion, events, task and many other types of information.
  • Site provides controlled access to share information among user.  i.e. Only Authorize users are allowed to access shared information.

Columns

  • Node Title
  • Description
  • Parent Node
  • Node Order (left to right)
  • Node Level (top to bottom)
  • Site Owner
  • Site Template
  • Business group
  • Keywords
  • Target URL

Page Architecture

  • A page is part of a Site
  • A page layout can be a 2 column, fullbody or custom
  • A page can consist of paragraphs of text, additional links and embedded links
  • Content approval should be defined at the site level
  • Security can be assigned at page level
  • You can select an existing page with in the site as parent page

Columns

  • Page Title
  • Parent Site
  • Page Order
  • Page Description
  • Page Layout (Article page, subsite home page, 2 column, 3 column, fullbody, custom)
  • Additional Links?
  • Embedded Links?
  • Keywords
  • Content Approval?
  • Page Life Cycle
  • Show in Navigation?
  • Parent Page
  • Page Content Type
  • Business group

Content Architecture

  • Content is part of a Site
  • Content could be a document library, assets library, custom lists
  • Content can have security and workflow assigned to it

Columns

  • Content Title
  • Parent Site
  • Description
  • Content Type (Custom list, document library, asset library)
  • Content workflow?
  • Record?
  • Custom Content Types
  • Keywords
  • Content Security
  • Number of items
  • Maximum content size
  • Content Organizer
  • Auditing
  • Versioning
  • Enable Search?

Use Visio or Mindjet Manager to create the site map that could be reviewed with the business groups to finalize the site map.

5 Best Practices:

  • Do not allow more than 3 levels in navigation
  • Leverage SharePoint sites and pages architecture
  • Provide flexibility in your design to change your site map to allow sites or pages as needed
  • You may need to extend map provider to enable three level navigation and breadcrumbs
  • Content roadmap: Content Identification-> Content Collection -> Content Migration

SP 2010 Intranet Task Map

http://technet.microsoft.com/en-us/sharepoint/gg241215.aspx

Posted in SharePoint 2010 | Leave a comment

Why move to SharePoint 2010

Capabilities of SharePoint 2010

SharePoint 2010 enables organizations to connect and empower people through an integrated set of rich features. SharePoint 2010 facilitates business collaboration in its broadest sense and helps colleagues, partners, and customers to work together in new and effective ways.

SharePoint 2010 Sites: Collaborating Across Organizations

As part of the 2010 release, SharePoint Sites provides portal and collaboration capabilities across intranet, extranet, and Internet sites. SharePoint 2010 brings users together to share information, data, and expertise across organizations. It offers great usability, personalized experiences, and a single infrastructure that saves valuable time and dollars.

Ensuring Broad Adoption

Great usability is the key to broad adoption. A new Fluent UI, an enhanced mobile experience, cross-browser support, and built-in accessibility standards make it easy and rewarding for anyone to use SharePoint 2010.

Delivering Personalized Experiences

Features such as My Sites, user tagging, content targeting, and multilingual support enable users to create individualized experiences. People can find, use, and share information and contacts easily and naturally.

Reducing Costs and Complexity

SharePoint 2010 saves organizations time and money with a unified infrastructure that is manageable and scalable. IT professionals can centrally manage and monitor sites, integrate applications, and reuse popular solutions by using Web parts and templates. Deployment can be on-premises or in the cloud with Microsoft Business Productivity Online Services.

SharePoint 2010 Search: Finding People and Information Anywhere

As part of the 2010 release, SharePoint Search can help the members of your organization find the content, information, and people that they need by combining an integrated, easy-to-manage platform with best-of-breed enterprise search technology. Now more than ever, all of your employees, from sales associates to developers, can do more with Search to get their jobs done.

Going Beyond the Search Box

SharePoint 2010 moves beyond the traditional “10 blue links” and introduces a visual and interactive experience, enabling users to find, explore, and connect to information and people.

Eliminating Compromise Between Manageability and Capability

SharePoint 2010 offers an integrated solution that can tackle the most challenging enterprise search requirements while maintaining the out-of-the-box simplicity and consistency of a durable and secure platform.

Doing More with Search

SharePoint 2010 is a powerful platform for building custom search solutions and applications by using common out-of-the-box tools.

SharePoint 2010 Communities: Working Together Effectively

As part of the 2010 release, SharePoint Communities provides a comprehensive, flexible platform that empowers people to work together in ways that are most effective for them. Enable your people to collaborate in groups, share knowledge and ideas, connect with colleagues, and find information and experts naturally.

Working Together the Way You Want

The global workforce of the twenty-first century is more diverse than ever. Connect and engage all of your employees with a flexible collaboration platform and a diverse set of tools that range from Wikis to Workflows to Workspaces—enabling people to work together the way they want.

Relying on a Secure Collaboration Platform

Let your IT staff rely on an enterprise-ready collaboration platform that is secure and easy to manage and will support your organization’s growing needs. SharePoint 2010 makes social networking safe with granular security and privacy controls, centralized management and policy setting, and robust reporting and analysis.

Extending the Value of Your Community Solutions

The SharePoint platform seamlessly integrates with the rest of the Microsoft Business Productivity infrastructure, including the applications in the 2007 Office system, Microsoft Exchange Server, Microsoft Office Communications Server, Microsoft SQL Server®, and Microsoft Dynamics™. In addition, SharePoint provides Business Connectivity Services and adheres to open standards and protocols, making it easy to integrate third-party applications.

SharePoint 2010 Insights: Making Informed Business Decisions

As part of the 2010 release, SharePoint Insights enables users to find the information that they need across unstructured assets (blogs, wikis, presentations, and documents) and structured assets (reports, spreadsheets, and analytical systems). Empower users to discover the right people and expertise to make more informed and agile business decisions.

Empowering Decision Makers

Empower users to collaborate better and make more agile business decisions by accessing the information they need, when they need it. Powerful self-service capabilities are integrated into familiar tools, so users can create and share the right information and drive the business forward by providing timely responses and taking advantage of opportunities as they arise.

Improving Organizational Effectiveness

Manage, drive, and define organizational success by aligning to key metrics and strategy through context-driven dashboards. Measure critical success factors and empower everyone to create and analyze the information necessary to stay informed and move the business forward. Enable accountability and transparency across the company and remove barriers to productivity.

Enabling IT Efficiency

Use a complete, integrated business collaboration platform that can empower users to discover, analyze, and share the right information across unstructured and structured assets. With a platform built on standards, IT can address business requirements by putting information in the hands of users and focusing on developing, maintaining, and securing systems.

SharePoint 2010 Content: Managing the Content Management Life Cycle From Creation to Disposition

Using Enterprise Content Management (ECM) from Microsoft, your people can participate in the content management life cycle, helping to govern information and promote compliance. As part of the 2010 release, SharePoint Content expertly balances user experience with policy and process, ensuring that everyone participates and all content is managed.

Increasing Productivity and Information Value

Using SharePoint 2010, content management is simple and intuitive, enabling employees to focus on higher-value tasks. In addition, SharePoint 2010 provides coauthoring, metadata-driven navigation, search refiners, and a rich social overlay to help people turn information into action.

Driving Compliance and Reducing Risk

SharePoint 2010 provides a single platform for managing content across the enterprise. By consistently applying metadata, retention schedules, record declarations, and legal holds, SharePoint 2010 can help to ensure that information is managed in accordance with policy and regulation. This can reduce the risk of incorrectly deleting relevant information or retaining information beyond its useful life.

Consolidating Systems and Simplifying Integration

Reducing the need to purchase multiple ECM solutions, SharePoint 2010 delivers the management of documents, records, Web content, rich media, and document output in an integrated, extensible platform. In addition, SharePoint 2010 is built on an open platform that supports interoperability standards such as XML, SOAP, RSS, REST, WebDAV, and WSRP, which significantly reduces the cost of maintaining a heterogeneous environment.

SharePoint 2010 Composites: Taking Action with Managed Solutions

SharePoint Composites empowers business users to rapidly respond to a broad array of business needs with collaborative solutions of their own, without code, both on-premises or in the cloud, through a rich set of building blocks, tools, and self-service capabilities. In addition, it provides IT professionals with manageability and operational insights to ensure a stable platform and control over end-user solutions.

Rapidly Creating No-Code Collaborative Solutions

Empower business users to rapidly and easily address a broad array of business needs by using the browser, or to share their Microsoft Office Access® databases and Microsoft Office Visio® diagrams with others, while enabling advanced users to customize SharePoint with no-code tools in SharePoint Designer and Microsoft Office InfoPath®.

Unlocking the Value of Enterprise Data

Enable your organization to interact with enterprise data directly within the SharePoint and Office experience, in both read and write modes. Users can work with enterprise data as easily as with SharePoint data, whether they are offline, connected, or directly in the rich experience of the Office system.

Maintaining Control over End-User Solutions

IT professionals can manage user solutions and define resource-throttling controls on resource consumption on your server infrastructure, letting SharePoint take care of ensuring that solutions stay within your predefined limits. This enables IT professionals to maintain operational insight and a stable platform, whether online or on-premises.

SharePoint 2010 for the IT Professional

SharePoint 2010 can help to increase IT professionals’ productivity by improving the administrative experience and giving administrators deeper operational insight. Features include a new streamlined Central Administration Web site, new capabilities to manage and monitor the SharePoint farm, and Windows PowerShell™ support. (Sourced from http://sharepoint2010.microsoft.com/product/Benefits/IT-Professionals/Pages
/Top-Features.aspx
.)

Streamlined Central Administration

You will find a revamped and streamlined administration experience in SharePoint 2010. Everything is at your fingertips within Central Administration to help you get your job done, including the addition of the Ribbon to make configuring and managing your server farm even quicker and easier.

SharePoint Health Analyzer

Built into SharePoint 2010, the SharePoint Health Analyzer provides an extensible rules-based engine that monitors farm health and can automatically fix many common configuration and performance issues right out of the box. Through a Problems and Solutions page in Central Administration, you can quickly find and fix potential issues across all servers in your farm, or just let the SharePoint Health Analyzer do it for you.

Usage Reporting and Logging

The new unified logging database in SharePoint 2010 is the central repository for your SharePoint farm’s usage and health data. The new database schema will be fully documented to give you the power and flexibility to write your own reports, in addition to the ones that we provide. Through a new logging Object Model, you can also log your own events and tracing data into the database. Your insight into server usage and performance just became a whole lot easier.

Unattached Content Database Recovery

The new unattached content database recovery feature enables you to temporarily mount an unattached content database and browse content, back up a site collection, or export sites and lists, all through the Central Administration UI and without requiring a recovery farm.

Visual Upgrade

Visual Upgrade enables you to upgrade Office SharePoint Server 2007 to SharePoint 2010 without impacting or changing the user interface in existing sites. The upgraded site initially looks and behaves just as it did in Office SharePoint Server 2007, but you can flip between the layout and site features of Office SharePoint Server 2007 and SharePoint 2010. This gives you access to the new platform capabilities of SharePoint 2010 with the flexibility of choosing when you upgrade your site’s look and feel.

Support for Windows PowerShell

Windows PowerShell is a command-line shell and scripting language that can help IT professionals achieve greater control and productivity. SharePoint 2010 offers a snap-in so that you can take advantage of Windows PowerShell for your SharePoint deployments. Hundreds of cmdlets will be shipped out of the box to help IT professionals manage server farms and automate tasks. In addition, the STSADM command line will continue to be available.

Large List Resource Throttling

Using resource throttling for large lists, you gain granular control over the impact on server performance of lists and libraries that contain between thousands and millions of items. In addition to this, users are automatically educated on how to manage large lists effectively and efficiently.

Sandboxed Solutions

For IT professionals who have performance and security concerns with third-party code and solutions, sandboxed solutions can help to solve the problem. They enable site administrators to upload the solutions that they need. Not only is the solution run in a sandboxed environment and separated from other processes to make it safe, but IT professionals can control the resource that it consumes to prevent performance issues.

Scalable Unified Infrastructure

SharePoint 2010 provides a scalable unified infrastructure. It offers better control over server resources, which can improve processes such as the performance and management of large lists, and data management and protection, by using high availability. A scalable services architecture enables you to effectively manage and centralize services such as Search, My Sites, and Taxonomy. You can manage these service applications through Central Administration and Windows PowerShell can also manage and script them. The architecture is extensible, so third-party companies can build and add services to the platform.

Flexible Deployments

With a quick and simple installation and configuration process, SharePoint 2010 provides a flexible deployment experience. The upgrade from Office SharePoint Server 2007 is smooth and predictable. New functionality enables you to manage how others use SharePoint. For example, you can safely allow site administrators to upload custom user code by using sandboxed solutions. You also have more governance controls. If you want to maintain a centralized SharePoint deployment instead of taking a more decentralized approach, you can block those deployments through Group Policy or track them with Active Directory® marker support.

SharePoint 2010 for the Developer

Software developers can use the SharePoint 2010 developer platform to build business collaboration applications for the enterprise and the Web, all with familiar tools and a rich set of interoperable, out-of-the-box features. SharePoint 2010 includes extensible framework features and tools for building applications, including Microsoft Silverlight™ Web Parts and client application programming interfaces (APIs), LINQ to SharePoint, Business Connectivity Services (BCS), sandboxed solutions, and new SharePoint List data relationships. Developers can more efficiently build SharePoint solutions by using Microsoft Visual Studio® 2010, Microsoft Team Foundation Server 2010, and the new SharePoint Designer 2010. (Sourced from http://sharepoint2010.microsoft.com/product/Benefits/IT-Developers/Pages/default.aspx.)

Developer Productivity

Software developers can increase productivity by using Visual Studio 2010 and the new SharePoint Designer 2010. You can install SharePoint 2010 on Windows® 7 or Windows Vista® for development purposes. Using SharePoint 2010, software developers get a rich set of resources, including software development kit (SDK) documentation and product features such as the developer dashboard page.

Rich Platform Services

SharePoint 2010 provides new features for building business collaboration applications, including Silverlight hosting for user interfaces, LINQ to SharePoint, Client Object Model, BCS, data relationships, and large list scalability. Using BCS, developers can now integrate line-of-business (LOB) data in client solutions in SharePoint and the Microsoft Office system easily and with read/write capability.

On-Premises and Online Deployment

Developers can build sandboxed solutions to be deployed on-premises or online, with built-in API limits and resource governance for administrators. In SharePoint 2010, you can deploy new sandboxed solutions to a corporate intranet, or to a shared hosting environment such as SharePoint Online.

Key Message

The SharePoint 2010 product group made significant investments in improving the overall management experience of SharePoint. These benefits will be realized immediately after performing an upgrade without having to deploy any new out-of-the-box capabilities. This enables organizations to realize value while providing a robust foundation for delivering on future business needs, either by taking advantage of other out-of-the-box capabilities or by improving the support and management of custom developed content.

Posted in SharePoint 2010 | Leave a comment

DPM 2010 – best protection for SharePoint 2010

DPM 2010 New Features and Enhancements

  • DPM 2010 automatically grows volumes as required.
  • DPM 2010 allows you to shrink volumes so your space is used effectively.
  • Support for system protection of Windows Server 2008 and later editions.
  • Exchange Server 2010 databases now appear within the Database Availability Group (DAG) after creating a new protection group.
  • Improved Windows SharePoint support for the following:
    • Restoring individual SharePoint list items.
    • Parallel backups of databases that are on the same instance of SQL Server 2005 in a SharePoint farm.
    • SharePoint list item search recovery. Note that you can now perform a search based on the title of the list item.
    • SharePoint tape backup.

      In DPM 2010, DPM takes the last valid backup at the database level, and then copies the backup to tape. This process creates a complete recovery point for the SharePoint farm. In previous releases, the latest farm level recovery point was backed up to tape, and might not have included all of the databases causing the copy-to-tape operation to be incomplete.

    • Recovery of items in a SharePoint farm using host-headers.
  • The DPM Library Management tab now displays the amount of data that has been written to available tapes.
  • New SQL Server Self Service Recovery Configuration Tool user interface.
    • To open the tool, in DPM Administrator Console, on the Protection tab, in the Actions pane, click ConfigureSelfServiceRecoveryForSQLServer.
  • Enhanced support for SQL Server database administrators. Using the SQL Self Service Recovery tool, the database administrator can now specify the recovered files path in addition to auto-recovery under an instance of SQL Server.
  • In previous releases, DPM performed a long erase operation from tape. For this DPM RC and future releases, DPM will also perform a short (or quick) erase if the following regkey is set:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Data Protection Manager\Agent] "UseShortErase"=dword:00000000

    Ff399383.note(en-us,TechNet.10).gifNote
    Although short erase is a much faster operation than long erase, it does not perform a complete erase of the data from tape. Therefore, do not set the registry key if you have a policy requiring that all data be erased from tape and unrecoverable thereafter.

  • DPM 2010 allows you to protect client computers, like laptop computers, that may not be connected to the network at all times.
  • Users of protected client computers can recover their data without waiting for the backup administrator.
Posted in SharePoint 2010 | Leave a comment

Capacity Planning for SharePoint: System Center Capacity Planner 2010 (Formally discontinued by Microsoft)

Overview

System Center Capacity Planner 2007 provides you with the tools and guidance to simplify deployment planning for Microsoft server products and to use "what-if" analyses to predict the impact of change. Capacity Planner 2007 is available for anyone to download and no longer requires a TechNet subscription.

Capacity Planner 2007 helps you plan your deployment efficiently and predict the impact of change in the following ways:

  • Helps ensure the success of supported Microsoft server products, such as Exchange Server 2007, Windows SharePoint Services 3.0, Office SharePoint Server 2007, and System Center Operations Manager 2007. Plan the correct amount of infrastructure needed for a new application to meet service-level goals.

  • Infrastructure planning and optimization. Plan ahead for IT purchases to optimize cost.

  • Proactive performance planning. Help an organization meet their service-level goals consistently—now and in the future.

  • Performance analysis and predictive reporting. Report performance trends and bottlenecks, automatically, to manage current and future performance issues.

System Center Capacity Planner 2007 is designed to help you create a system architecture model for deploying a Microsoft server application, such as Exchange Server 2007. Capacity planning models for Windows SharePoint Services 3.0, Office SharePoint Server 2007, and System Center Operations Manager 2007 are available as separate downloads. A typical system architecture model consists of:

  • Topology. Site locations, types of networks, network components, and network characteristics (bandwidth, latency).

  • Hardware. Server distribution and characteristics, server and network mapping.

  • Software. Server role and service mapping, file and storage device mapping

  • Usage profiles. Site usage and client usage.

After you create a model, you can run a simulation that provides a summary and details about the performance of the application and its supporting components.

 

Click here to learn more

Posted in Uncategorized | 1 Comment

SharePoint 2007: Roles and Redundancy

Role Purpose Fault Tolerance Typical Servers notes
WFE serves HTML and routing requests YES, can exist on multiple servers 2 or more servers in a farm NLB for load balancing & host headers
Query Server role executes search queries against locally stored copy of the index yes on each WFE needs disk space
Index Server Role indexes all configured content sources, creates index and propagates to query servers NO, one index per SSP per farm Dedicated server possible to run index and query on the same but this will disable propagation. recommendation is to keep them separate
WSS Search slimmed down version of MOSS Search No runs on the same server as index In MOSS setting, this is used for Help
Excel Calculation Service performing calculations on excel workbooks that are stored in content databases Yes placed on WFE, recommended is to put them on dedicated pair of servers as it is resource intensive Fault tolerant but session state is not, so users stay on the same server during the session duration
Document Conversions Load Balancer Service balances document conversion requests from across the server farm No, app server can have only one balancer service typically placed on Index server  
Document Conversions Launcher Service schedules and initiates the document conversions on a server yes, multiple launchers can exist each WFE each WFE must have the set of document conversion applications installed
WSS Incoming Email receiving mails and placing them in email enabled lists yes each WFE SharePoint Directory service configuration
WSS Outgoing Email sends outbound email to SMTP n/a n/a n/a
Central Administration farm wide administration can be made fault tolerant index or one of the web servers web app runs on all web application servers but service runs on only one
Posted in SharePoint | Leave a comment

SharePoint 2007: from SQL Server Perspective

FARM (Top)

SERVERS (WFE, AT, DT)

WEB APPLICATIONS (CA, SSP Admin, Content)

DATABASES (Config, Content, SSP, Search)

SITE COLLECTIONS (Portals, Team Sites, Blogs)

SITES (Blogs, Wikis, Team)

LISTS (Doc Libraries, Events, Pages, Discussions, Surveys)

ITEMS (Files, Items, contacts, images)

 

CONFIG DB: Servers, Web Apps (VServers), Solutions, Global Config at the Farm Level (Medium Demand)

CONTENT DBs: Site Collections, Sites, Lists, Pages, Docs, Web parts for each Web App (Low Demand)

SEARCH/SSP DB: Search, My Site, Profiles, BDC Config, Excel Calculation Services (Most Demand)

Top Performance killers:

  1. Indexing / Crawling
  2. Backup (SQL & Tape)
  3. Profile Import
  4. Misc Timer Jobs
  5. Poor Storage Configuration
  6. STSADM Backup/Restore
  7. Large List Operations
  8. Heavy user operation list Import/Write
  9. Network latency
  10. Inefficient Queries
Scale Out Scale Up
Add Servers Add hard drive disks
More Servers, More Money, More Management Complicates Design
Better Performance, Better Flexibility Easier to manage, cheaper
more expensive, harder to manage Design is critical, single point of failure
More flexible more cost effective

 

Highly Available/Disaster Recovery Scenarios

Mirroring Within Farm Mirroring/Log Shipping between Farms
Great combo HA/DR allows long distance seperation
cheaper to implement can protect against logical corruption
easier to manage very flexible
   
requires closely located datacenter more expensive
requires excellent network conditions harder to setup and manage
not flexible failover ???
content corruptions is immediately replicated  

 

for best performance, do not exceed the following SharePoint/DB limits:

  • DO NOT EXCEED 100GB – backup/restore maintenance
  • use differential backup
  • isolate large sites
  • use multiple data files
  • defrag regularly
  • DO NOT EXCEED 2000 items per folder or view
  • define limits on views
  • use indexed columns
  • SQL Memory RAM
    • number and size of content dbs
    • number of concurrent requests to SQL
    • size and width of commonly used lists
    • recommended 16GB and above

 

SharePoint 2010 databases – atleast 25 NEW dbs

FARM

    • Config
    • Admin Content
    • Application Registry Service
    • State Service
    • Web Analytics Web Service
    • WSS Usage
    • ReportingDB
    • Staging DB

SERVICES

    • Search Service Application
    • Crawlstore
    • Search DB
    • PropertyStore
    • WSS Search
    • SocialDB
    • ProfileDB (SSP DB)
    • SyncDB
    • BDC_Service_DB
    • Word Conversion Service Application
    • Performance Point
    • ManageMetadata
    • Secure_Store_Service

CONTENT

    • WSS_Content_GUID.

Thanks to Joel Oleston presentation on large scale deployments – performance review of SQL in SharePoint

Posted in SharePoint | Leave a comment

SharePoint 2007: Set Default values for form fields when uploading documents

Situation: customer would like to have the ability to set default values for any metadata site columns (lookup or choice) automatically. If Department 1 is uploading documents and they have to select their department name from the metadata columns (content types –> site columns) every time they upload a document then its few more clicks for every document. Instead if you can default the department name during the check-in process, it would reduce number of clicks.

add the following code to Documents/Forms/EditForm.aspx (better create a copy of this and set the list form to be this new edit form). add the following jcvascript code to PlaceHolderMain web part zone. Notice in the code mode=[“Upload”] is used to make sure we are default values only during upload. If the user has already selected a value, it should not be overwritten when editing it.

 

You can extend this functionality where you can read the values from either sharepoint list or config file.

 

<script type="text/javascript">

// This javascript sets the default value of a lookup field identified

// by <<FIELD DISPLAY NAME>> to the value stored in the querysting variable

// identified by <<QUERYSTRING VARIABLE NAME>>

// Customize this javascript by replacing <<FIELD DISPLAY NAME>> and

// <<QUERYSTRING VARIABLE NAME>> with appropriate values.

// Then just paste it into NewForm.aspx inside PlaceHolderMain

_spBodyOnLoadFunctionNames.push("fillDefaultValues");

function fillDefaultValues()

  var qs = location.search.substring(1, location.search.length);

  var args = qs.split("&");

  var vals = new Object();

  for (var i=0; i < args.length; i++) {

    var nameVal = args[i].split("=");

    var temp = unescape(nameVal[1]).split(‘+’);

    nameVal[1] = temp.join(‘ ‘);

    vals[nameVal[0]] = nameVal[1];

  } 

  var mode = vals["Mode"];

  if(mode == "Upload")

  {

           var source = vals["Source"];

          if(source.indexOf("CareerAndBenefits") != -1)

          {

                 setBusinessGroup("Business Group", "Corporate Services Group");

                 setDivision("Division", "Human Resources");

          }

          if(source.indexOf("CorporateCommunications") != -1)

          {

                 setBusinessGroup("Business Group", "Agribusiness Banking Group");

                 setDivision("Division", "Corporate Communications");

          }

  }

}

function setBusinessGroup(fieldName, value) {

  if (value == undefined) return;

  var theSelect = getTagFromIdentifierAndTitle("select","Lookup",fieldName);

// if theSelect is null, it means that the target list has more than

// 20 items, and the Lookup is being rendered with an input element

  if (theSelect == null) {

    var theInput = getTagFromIdentifierAndTitle("input","",fieldName);

    ShowDropdown(theInput.id); //this function is provided by SharePoint

    var opt=document.getElementById(theInput.opt);

    setBusinessGroupOption(opt, value);

    OptLoseFocus(opt); //this function is provided by SharePoint

  } else {

    setBusinessGroupOption(theSelect, value);

  }

}

function setBusinessGroupOption(select, value) {

  var opts = select.options;

  var l = opts.length;

  if (select == null) return;

  for (var i=0; i < l; i++) {

    if (opts[i].text == value) {

      select.selectedIndex = i;

      return true;

    }

  }

  return false;

}

function setDivision(fieldName, value) {

  if (value == undefined) return;

  var theSelect = getTagFromIdentifierAndTitle("select","Lookup",fieldName);

// if theSelect is null, it means that the target list has more than

// 20 items, and the Lookup is being rendered with an input element

  if (theSelect == null) {

    var theInput = getTagFromIdentifierAndTitle("input","",fieldName);

    ShowDropdown(theInput.id); //this function is provided by SharePoint

    var opt=document.getElementById(theInput.opt);

    setDivisionOption(opt, value);

    OptLoseFocus(opt); //this function is provided by SharePoint

  } else {

    setDivisionOption(theSelect, value);

  }

}

function setDivisionOption(select, value) {

  var opts = select.options;

  var l = opts.length;

  if (select == null) return;

  for (var i=0; i < l; i++) {

     if (opts[i].text == value) {

      select.selectedIndex = i;

      return true;

    }

  }

  return false;

}

function getTagFromIdentifierAndTitle(tagName, identifier, title) {

  var len = identifier.length;

  var tags = document.getElementsByTagName(tagName);

  for (var i=0; i < tags.length; i++) {

    var tempString = tags[i].id;

    if (tags[i].title == title) {

      return tags[i];

    }

  }

  return null;

}

</script>

Posted in SharePoint | Leave a comment