InfoPath Field Limit – Form Fail to Publish

Run into this error, and there wasn’t much info about this issue…  If anyone know anything about this one, please post a solution

– created a InfoPath form

– attempt to promote various field to the Content Type.

– InfoPath fail to publish more than 30 field.  (works perfectly find if I keep the # below 30)

– I read some where there was a hot-fix for it (forgot where), applied it, but still didn’t fix it…

I end up just publishing the form with less than 30 fields

Infopath auto number, substring usage

Was working on infopath the other day, here are some sample function I used (just in case you are too lazy to write them):

–          Infopath does not support auto numbering, so I used concat and substring to resolve this problem:

  • Example:  today() = 2007-02-08 and now() = 2007-02-08T14:20:39
  • To string using date:  concat(substring(today(), 1, 4), substring(today(), 6, 2), substring(today(), 9, 2)) = 20070208
  • To string using time: concat(substring(now(),12,2),substring(now(),15,2),substring(now(),18,2)) = 142039

–          Here is a string which you will ALWAYS GET A UNIQUE auto number:

  • concat(substring(today(), 1, 4), substring(today(), 6, 2), substring(today(), 9, 2),substring(now(),12,2),substring(now(),15,2),substring(now(),18,2))

Sharepoint workflow infinite loop workflow and fixes

As I notice a lot of people are reading my infinite loop post, hope I can share more info with everyone.

Here is some creative way to avoid infinite loop when working with SharePoint Designer. Every workflow is different, so the solution is really depends on what you are trying to do.

Other example and ideas are welcome!!!

Lets say this is what you want to do:

  • You have a object (a list object or infopath form)
    • For now lets call it a server build form which people submit to request for a server build and the server admin is suppose to use to form to track the progress of the server build as the build move between different stages.
  • You want the system to automatically time stamp the object every time someone makes a change to it (a change would means someone has completed a certain stage).
  • And let’s say you don’t want to use the version function as some end user doesn’t have the permission to do so, so you want the data to be store in a field (also for reporting and Business Intelligence purpose)
    • Using versioning requires custom coding and you want to stick with SharePoint Designer workflow

So a wrong way which result in infinite loop would be as follow:

  • Update time stamp field X every time someone change the object/content/list
  • This is a problem (and this will result in infinite loop and doesn’t work) if you try to build your workflow this way:
    • The workflow’s start conduction is every time the object change
    • The workflow action is to change the field when this occur
    • When a object change, the workflow starts again because the conduction is “every time the object change
    • Because the workflow change the object, a new workflow will start again and make another change again… creating a infinite loo

A sample workaround (again… it depends on what you want your workflow to do):

  • If you are trying to move object from stage to stage, instead of having the workflow monitor and starts every time the exact “changes” occur. Try setup the workflow to monitor each stages. Here is one sample:
    • IF Field X even became “Stage 3”, then instead current date into Field Y.

Of course, depends on what you want to do you have a lot of possibility than the above. The key here is be “creative” and normally you should be able to find your answer. Have FUN!  If you change the monitoring conduction, you normally will be able to find a workaround.

Tabs view using Infopath and Form Services

A lot of people ask me this question: how can I create tabs in Infopath forms (or Form Services):

Infopath and Form Services doesn’t support “tabs”, so you have to be a little creative.

– Give the form a background color (ex: blue)

– Using a table, using one of the cell, create tabs at the top of the table, merge the rest fo the area below the table as one large content area.

– The main area of the form should be all white (or what ever color you want)

– Insert a “button” into the cell area listed above (if you have two tab, then instead 2 button)

– Create 2 views in infopath (or as many views as you want base on the number of tabs you want)

– Then setup the button to switch between different views when click on it…

– Now, make the button invisible.

– Make the active tab (the cell since this is a table and your button is invisible) the same color as your form

– Make all the in-active tab match the color of your background color…

– Repeat the same thing to all your views.

With the above, you should be able to create a form with tabs and publishable to Form Services.

Sharepoint (MOSS) Licensing – MOSS, Search Server, and Forms Server

Sharepoint (MOSS) Licensing – MOSS, Search Server, and Forms Server.

Here is the Sharepoint (MOSS)’s licensing model in simplified term and all everything you need to know related MOSS licensing (SQL, Windows, WSS, etc).
Microsoft Office Sharepoint Server 2007, Server License (MOSS)
  • Basic MOSS server license.
  • One license for each MOSS server.  One server license for each installation of the MOSS software.
  • If you have this type of license, you will need to purchase CAL for each user/device connecting to the server.
Microsoft Office Sharepoint Server 2007 Client Access License (CAL), Standard Edition
  • Client license to access the MOSS server.
  • One license for each devices or name user (will explain the differences between “device” and “name user”later in this post)
Microsoft Office Sharepoint Server 2007 Client Access License (CAL), Enterprise Edition
  • Client license to enable the MOSS server enterprise feature.
  • One license for each devices or name user which will be accessing the enterprise features (will explain the differences between “device” and “name user” later)
  • This is an add-on license to the Standard Edition, if you want to enable Enterprise function; you need to purchase one Standard plus one Enterprise CAL for each user!
  • Example if you want to have a MOSS with enterprise function for a user:
    • 1x MOSS 2007, Server License
    • 1x MOSS 2007 CAL, Standard Edition
    • 1x MOSS 2007 CAL, Enterprise Edition
  • As you can see from the above example, there isn’t really an MOSS Enterprise Server (unlike other Microsoft product such as SQL and Exchange which have a official version of Enterprise edition); however the term MOSS Enterprise Server are widely use on the Internet, which is a bit misleading from a licensing prospective. MOSS Enterprise Server is basically a MOSS Server with Enterprise CAL. With Enterprise CAL you can then “legally” enable the Enterprise function on the MOSS Server (when you enable the enterprise function it does not ask for proof of Enterprise CAL… so check your licensing before enabling it!)
Microsoft Office SharePoint Server 2007 for Internet sites (this is the replacement license for External Connector license available in 2003)
  • MOSS server license design for use as an Internet site. It is licensed per server. With this license, you can have unlimited Internet user connected to the server (unlimited number of authenticated or anonymous user). This is the license to use if you plan to build a extranet using MOSS communcation between your clients, vendors, or contractors (Microsoft define this as “non-employees”).
  • Comes with all Enterprise features.
  • Note:  All internal users will still need to puchase CAL for and the MOSS Server
  • Example if you want to have a MOSS extranet which you use to mange invoices with your clients.  You have two accountatns uploads and manges invoices on the same extranet site.
    • 1x MOSS 2007, Server License
    • 2x MOSS 2007 CAL, Standard Edition
    • 2x MOSS 2007 CAL, Enterprise Edition
    • 1x MOSS 2007, Internet Site License
Microsoft Office SharePoint Server 2007 for Search (Enterprise Edition), Server License
  • This is a subset of the functionality that is offered in the full MOSS product. All the function in Search Enterprise is already included in MOSS Enterprise (therefore, do not purchase both)
  • If you only plan to use MOSS for Search, then purchase this licensing. It is licensed per server.
Microsoft Office SharePoint Server 2007 for Search (Standard Edition), Server License
  • Same as Search Enterprise but does not allow for load balancing, search is limited to indexing 500,000 items.
Microsoft Forms Server 2007, Server License
  • This is a subset of the functionality that is offered in the full MOSS product. All the function in Forms Server is already included in MOSS Enterprise (therefore, do not purchase both).
  • If you only plan to use MOSS for Forms (anything have to do with InfoPath), then purchase this licensing.
  • You can also mix the Forms Server with Standard Edition. Example: you want to have Sharepoint Form services, but don’t  need the entire Enterprise Suite, then you will purchase: MOSS Standard + Forms Server.
Microsoft Office Forms Server 2007 Client Access License (CAL)
  • Client license to access the MOSS Forms server.
  • One license for each devices or name user (will explain the differences between definition of “device” and “name user” later)
Microsoft Forms Server 2007 for Internet sites
  • Forms Server license design for use as an Internet site. It is licensed per server. With this license, you can have unlimited Internet user connected to the server (unlimited number of authenticated or anonymous user). This is the license to use if you plan to build a extranet using Forms server for your clients, vendors, or contractors (Microsoft define this as “non-employees”).
  • All rules listed in MOSS 2007 Internet Site license also applies to Forms Server 2007 Internet Site license
Windows Server External Connector
  • Windows SharePoint Services (WSS) is included with Windows Server. If you plan to use WSS to build extranet, this is the license you need to allow a unlimited number of clients, vendors, or contractors to access your site.
  • Note: your internal users still need additional CAL to access the site.
Device CAL (Per Device)
  • You purchase CAL for each device that accesses your server, regardless of the number of users who use that device to access the server.
  • This is ideal if you have a environments which multiple users share a single terminals (shifts, call center, etc)
User CAL (Per Name User or Per User)
  • You purchase the CAL each name user that accesses your server, regardless of the number of devices used by the user.
  • This is ideal if you have a environments which a single users access the servers from multiple devices (PDA, laptop, desktop, etc). You only need one CAL regretless of how many devices he/she have.
Mix of Licenses
  • You can mix both an Internet Site license and a Server license within the same farm.
  • Example: You can have a single farm operates both the corporate public web site, the intranet, and the extranet,
    • If you configure the two site to runs on its own individual servers within the farm, you can purchase one the Internet license and one server license for each server (If this makes more economy sense for your farm and design)
    • If you configure the two site to load balance on all the web front end servers within the farm, you need to purchase Internet site license and Server licenses for all the server in your farm (as the two site are shareing resources on the entire farm).
      • If you have 3 web front end server and 1 app server you will need the following:
        • 4x Internet Site license
        • 4x Server license
        • Plus CAL for all internal user
  • Note: Microsoft Office Forms Server and Microsoft Office Forms Server for Internet Sites cannot be mixed with Microsoft Office SharePoint Server and Microsoft Office SharePoint Server for Internet Sites. (as Sharepoint Server already have Forms server included)
Enable MOSS Enterprise Features
  • Once a Server’s enterprise function is enable you must acquire enterprise CAL for all user on using the server.   (this is a farm level central administration setting, so you can’t disable it per site)
Microsoft SQL Server CAL licensing model
  • Same as MOSS’s CAL model.
  • One license for each devices or name user.
  • You need a SQL CAL for each MOSS user if you plan to use this licensing model for the SQL server in your MOSS Farm.
  • Example for a MOSS Farm: 
    • 1x MOSS 2007, Server License
    • 1x MOSS 2007 CAL, Standard Edition
    • 1x SQL 2007 Server, (either Standard or Enterprise)
    • 1x SQL 2007 CAL, (either Standard or Enterprise depending on your SQL edition)
Microsoft SQL Server Internet Connector
  • Same as MOSS 2007 for Internet Site.
Microsoft SQL Server Processor licensing model
  • Licenses are purchase base on the number of processors you have on the server.
  • Licensed per processor.
SQL Server Active and Passive Model
  • If you have two SQL server and one of your SQL server is configure in passive model, then you are not require need to purchase SQL licenses for both servers. You only need licenses for one.
  • Unless the passive server has more processors than the active server, and the active server is licensed under the per processor model.
Virtual Machine and Microsoft Windows Server 2003 Enterprise Edition
  • With Enterprise Edition, you are license up to four virtual machines under one physical license. That means with one copy of Windows Server 2003 Enterprise, you can have up to 4 virtual servers running.
Windows Server 2003 Web Edition
  • Licensed per server. Allow unlimited number of user (both internal and external user)
Per Server CAL Licensing Mode for Windows Server
  • With this mode, each CAL is associated to an individual server.
  • Ex: if you have two Windows Server and 20 users access both server, you need 40 CAL (20 for each server)
Per Seat CAL Licensing Mode for Windows Server (or Per Device or Per Users)
  • With this mode, each CAL is associated to the individual devices/user. A user with a single CAL will have access to unlimited number of servers.
  • Ex: if you have five Windows Server and 20 users access all five of the server you only need 20 CAL.
Here is a sample configuration for a MOSS Server farm licensing:
  • MOSS Internet, Intranet, and Extranet Sites. 5 servers farm configuration running MOSS 2007 and SQL 2005 (1 SQL with two process on the server, 2 MOSS front-end, and 1 MOSS backend Index). You have 20 employees which will utilize Enterprise features. Here is what you need
  • 5x Windows Server 2003
  • 2x Microsoft SQL Server 2005 Standard Edition – Processor Licenses (no CALs required)
  • 2x Windows Server 2003 External Connector Licenses
    • You have two MOSS front-end server running on Windows Server 2003, therefore, you need to purchase External Connector license for each server!
  • 3x Microsoft Office SharePoint Server 2007 for Internet Sites
    • All three servers are used by extranet, in this case. The three sites are sharing resource across all three servers so you will need an Internet Sites licenses for all three servers.
  • Three (3) Microsoft Office SharePoint Server 2007 (MOSS)
  • 20x MOSS CALs, Standard Edition
  • 20x MOSS CALs, Enterprise Edition

InfoPath Forms Services best practices

InfoPath Forms Services best practices

http://technet.microsoft.com/en-us/library/cc261832.aspx

Updated: 2006-12-01

We recommend that you follow these best practices when managing your InfoPath Forms Services environment.

Document limit of 2,000 in Windows SharePoint Services document libraries

If a form template will be filled out and submitted more than 2,000 times in total, you should either write code in the form template to submit to a database by using a Web service, or create a custom submit function that places forms into multiple libraries. This is due to a limitation in the capacity of Windows SharePoint Services 3.0 document libraries, which may experience performance degradation if more than 2,000 documents exist in the library.

If you think a form template may be submitted more than 2,000 times, it is easier to begin by programming the form to use an alternative submit method than to correct this issue once it becomes a problem, particularly if the form template is available to a publicly accessible Web site.

Use Form View when configuring session state for InfoPath Forms Services

You can configure InfoPath Forms Services to use the Session State Service (the default option) or Form View to control how user sessions are managed. When you configure InfoPath Forms Services to use the Session State Service, all browser sessions are maintained on the SQL Server database corresponding with the Shared Services Provider (SSP) associated with the Web application on which the form template is hosted. This scenario uses little network bandwidth, but has a cumulative performance impact on the computer running SQL Server. When you are using Form View, sessions are maintained on the client browser, and all session data is included in each postback to the server, up to 40 kilobytes of session data. This uses more bandwidth than using session state, but does not affect the computer running SQL Server. Once session data reaches 40 KB in size, the session automatically transitions to session-state management.

We recommend the use of Form View in environments that have smaller groups of users, because it reduces the impact on SQL Server. If your InfoPath Forms Services deployment will have many users, particularly if session data is below 40 KB for many high-usage form templates, session state is likely a better choice. If Form View is used, the bandwidth used by browser sessions of 40 KB or fewer can be monitored if there is a concern that network performance might be adversely affected.

Running SQL Server on a front-end Web server is not recommended

If you run SQL Server on an Office SharePoint Server front-end Web server (for example, in a single-server evaluation deployment), the ASP.NET cache will release system memory at a lower threshold than SQL Server, which could result in InfoPath Forms Services memory starvation.

ASP.NET employs a strategy of targeting maximum Internet Information Services (IIS) memory use of the lesser of either 800 megabytes or 60% of available physical RAM. These settings are configurable in IIS manager. ASP.NET also monitors physical RAM use, not just for the w3wp.exe process, but for the entire system. When 80% of the physical memory on the server is committed, ASP.NET begins periodically dropping the oldest and lowest priority 5% of the cache. When 85% of physical memory is committed, ASP.NET drops 50% of the cache periodically. At 90% or more, ASP.NET aggressively trims the cache and sets a low limit on the maximum number of entries, which remains in effect until ASP.NET reassesses memory pressure on the server and raises the threshold.

The memory usage threshold for SQL Server is higher by default than the ASP.NET cache. In this scenario, SQL Server never releases memory, because the ASP.NET cache will already have released memory before the SQL Server threshold is reached. This situation can lead to a condition in which the throughput of InfoPath Forms Services is reduced with a subsequent impact on performance.

To mitigate this issue, you should configure SQL Server memory limits manually when SQL Server is installed on the same computer as Office SharePoint Server. For more information on adjusting SQL Server memory settings, see the article Server Memory Options (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_9zfy.asp) on the Microsoft Web site.

Best practices for anonymously accessible forms

When you deploy a form to a location where it is exposed to anonymous users, such as a public SharePoint document library or an embedded form in a Web page on the Internet, ensure the integrity of your form. There are several additional steps you should take to mitigate the risk of improper form usage, Denial of Service (DoS) exploits, and potential performance issues.

  • Ensure that form templates cannot be accessed by scripts or other automated processes. One way to achieve this is to force users who are submitting a form template to enter an identification code such as a short alphanumeric string displayed in an image, which cannot be “read” by a script or automated process.
  • Form templates that contain sensitive information such as authentication information, server or database names, or proprietary code should never be exposed to anonymous users.
  • Form templates that contain an e-mail submit data connection should not be deployed to servers that are anonymously accessible, as e-mail messages generated when the form is submitted will show “sent by anonymous user” in the Subject line.
  • Form templates that contain code or functionality that can invoke processes on a server should be carefully evaluated and tested to ensure that security cannot be compromised by making the form template accessible to anonymous users.
  • In order to prevent users from submitting multiple copies of a form, you might consider including code that tracks the IP address of each user who submits a form and prevents duplicate submissions from the same IP address.
  • Protect the integrity of form templates by enabling protection to prevent the form template from being changed.