Dataconnections in InfoPath and SharePoint

Dataconnections in InfoPath and SharePoint

Introduction

This walkthrough is based on screenshots of a dutch environment. This however should not be a problem. These screens in any other language would have the same options on the exact same spot. You even might learn a little Dutch while you’re at it.

What we are going to do here is create a dataconnection and eventually save it to a connectionslibrary in SharePoint as a .udcx file.

Create dataconnection

Create a dataconnection in infopath.

Select Database (Microsoft SQL Server only)

And click Next

Click op Database Selecteren

Select New SQL serverconnection.odc

And Click open

Enter the servername and select the type of credentials you would like to use. Click Next.

When you choose to use username and password it recommended to save these credentials in the file.

Select a table and Click Next.

Select the fields that need to be read.
and Click Next, Next and  Finish.

Convert the dataconnection

Select the connection we’ve just created and Click convert.

Select the dataconnectionslibrary in SharePoint and name the file. Make sure to add the .udcx extension.

And Click OK.

Delete the original dataconnection and Click Add.

Select search the Microsoft Office SharePoint Server for connections.

And Click Next.

By clicking the Manage Sites button add the site that holds the dataconnectionslibrary.

Open the dataconnections folder and select the newly created dataconnection.

Click Next.

Name the new connection and click Finish.



The new dataconnection is ready for use.

Security settings in SharePoint

Make sure the user has all the required permissions on SQL Server.

If you have hardcoded the credentials (in connection string, UDCX file, etc), “Allow embedded SQL Authentication” must be enabled under Central Admin -> Application Management -> Configure InfoPath Forms Services.

Make sure to have cross-domain access enabled for Infopath Forms Services under Central Admin -> Application Management -> Configure InfoPath Forms Services and also have this setting enabled in Internet Explorer for the zone InfoPath form loads.

Have both SQL and Windows authentication enabled on SQL server

If your browser enabled form is not working with Windows credentials, try using SQL credentials.

SharePoint 2010 certification

As of June certification for SharePoint 2010 will be available. Two new certifications and related courseware will be introduced for IT Pros:

TECHNOLOGY SPECIALIST: CONFIGURING SHAREPOINT 2010 (70-667)
With the training courses of this MCTS certification, IT Professionals can learn configuration skills for SharePoint, including deployment, upgrade, management and operation on a server farm.

IT PROFESSIONAL: ADMINISTRATING SHAREPOINT 2010 (70-668)
The training courses of this MCITP certification cover advanced SharePoint 2010 topics like capacity
planning, topology designing and performance tuning.

But before that you wil be able to learn a lot by reading content and watching videos on the new features of SharePoint 2010.

Visit this link to read more.

Nintex workflow 2007 web services

You can find these webservices using the folowing syntax:

http://site/ListOrLibrary/_vti_bin/nintexworkflow/workflow.asmx

NintexWorkflowWS

The following operations are supported. For a formal definition, please review the Service Description.

Inline Functions in Nintex

Function reference

fn-Abs

Returns the absolute value of a number.

Example

fn-Abs({WorkflowVariable:Number})

Arguments

  • Number The number to return the absolute value of.

fn-Currency

Represents a numeric value as a currency formatted text.

Example

fn-Currency({WorkflowVariable:Cost})

Arguments

  • Number A variable containing a numeric value.

fn-DateDiffDays

Determines the number of days between two dates. The result can be a decimal value including partial days.

Example

fn-DateDiffDays({WorkflowVariable:StartDate}, {WorkflowVariable:EndDate})

Arguments

  • Start date The starting date and time to calculate the difference between.
  • End date The end date and time to calculate the difference between.

fn-DateDiffHours

Determines the number of hours between two dates. The result can be a decimal value including partial hours.

Example

fn-DateDiffHours({WorkflowVariable:StartDate}, {WorkflowVariable:EndDate})

Arguments

  • Start date The starting date and time to calculate the difference between.
  • End date The end and time date to calculate the difference between.

fn-DateDiffMinutes

Determines the number of minutes between two dates. The result can be a decimal value including partial minutes.

Example

fn-DateDiffMinutes({WorkflowVariable:StartDate}, {WorkflowVariable:EndDate})

Arguments

  • Start date The starting date and time to calculate the difference between.
  • End date The end and time date to calculate the difference between.

fn-DateDiffSeconds

Determines the number of seconds between two dates. The result can be a decimal value including partial seconds.

Example

fn-DateDiffSeconds({WorkflowVariable:StartDate}, {WorkflowVariable:EndDate})

Arguments

  • Start date The starting date and time to calculate the difference between.
  • End date The end and time date to calculate the difference between.

fn-FormatDate

Represents a date time value in text of a specific format.

Example

fn-FormatDate({WorkflowVariable:MyDate}, d)

Arguments

fn-Insert

Adds text in to a larger string.

Example

fn-Insert({WorkflowVariable:Text}, 4, {ItemProperty:Title})

Arguments

  • Text The text to modify.
  • Start position The character position to insert the new text at. The first character in the string is at position 0.
  • New text The additional text that will be added at the start position.

fn-Length

Returns the number of characters in a string.

Example

fn-Length({WorkflowVariable:Text})

Arguments

  • Text The string to count the characters of.

fn-Max

Returns the greater of two numbers.

Example

fn-Max({WorkflowVariable:Number1}, {WorkflowVariable:Number2})

Arguments

  • Number 1 The first number to compare.
  • Number 2 The second number to compare.

fn-Min

Returns the lesser of two numbers.

Example

fn-Min({WorkflowVariable:Number1}, {WorkflowVariable:Number2})

Arguments

  • Number 1 The first number to compare.
  • Number 2 The second number to compare.

fn-NewGuid

Generate a globally unique identifier.

Example

fn-NewGuid()

fn-PadLeft

Returns the provided string right aligned and padded to the total length with a specific character.

Example

fn-PadLeft({WorkflowVariable:Text}, 6)

fn-PadLeft({WorkflowVariable:Text}, 6,-)

Arguments

  • Text The string to pad.
  • Length The target total length of the padded result.
  • Character Optional. The character to pad the original string with. A space character is used by default.

fn-PadRight

Returns the provided string left aligned and padded to the total length with a specific character.

Example

fn-PadRight({WorkflowVariable:Text}, 6)

fn-PadRight({WorkflowVariable:Text}, 6,-)

Arguments

  • Text The string to pad.
  • Length The target total length of the padded result.
  • Character Optional. The character to pad the original string with. A space character is used by default.

fn-Power

Raises a number to the specified power.

Example

fn-Power({WorkflowVariable:Number}, {WorkflowVariable:Power})

Arguments

  • Number The number to raise to the power.
  • Number The power to raise number to.

fn-Remove

Removes a section of text in a larger string.

Example

fn-Remove({WorkflowVariable:Text},xxx,{ItemProperty:Title})

Arguments

  • Text The text to modify.
  • Start position The character position from which to remove the following characters. The first character in the string is at position 0.
  • Length Optional. The number of characters from the start position to remove. All remaining characters will be removed by default.

fn-Replace

Replaces a section of text in a larger string.

Example

fn-Replace({WorkflowVariable:Text},xxx,{ItemProperty:Title})

Arguments

  • Text The text to modify.
  • Old value The text to search for and replace.
  • New value The text to replace Old value with.

fn-Round

Rounds a decimal value to the nearest integer.

Example

fn-Round({WorkflowVariable:Number})

Arguments

  • Number The decimal number to round.

fn-SubString

Extracts a portion of text from a string.

Example

fn-SubString({WorkflowVariable:Text},5,10)

Arguments

  • Text The text to extract a value from
  • Start index The position in the text of the first character to retrieve. The first character in the string is at position 0.
  • Number of characters The number of characters to retrieve from the start index.

fn-ToLower

Formats text in a string to all lower case.

Example

fn-ToLower({WorkflowVariable:Text})

Arguments

  • Text The string to convert to all lower case.

fn-ToTitleCase

Formats text in a string to title case.

Example

fn-ToTitleCase({WorkflowVariable:Text})

Arguments

  • Text The string to convert to title case.

fn-ToUpper

Formats text in a string to all upper case.

Example

fn-ToUpper({WorkflowVariable:Text})

Arguments

  • Text The string to convert to all upper case.

fn-Trim

Removes leading and trailing whitespace from a string.

Example

fn-Trim({WorkflowVariable:Text})

Arguments

  • Text The text to remove leading and trailing whitespace characters from.

fn-XmlEncode

Encodes a string to make it safe for viewing in html.

Example

fn-XmlEncode({WorkflowVariable:Text})

Arguments

  • Text The text to encode.

fn-XmlDecode

Decodes a html safe string to regular text.

Example

fn-XmlDecode({WorkflowVariable:Text})

Arguments

Wrong approve / reject page is shown in Nintex

In some cases you are presented the wrong page when trying to approve a task that was created by a Nintex workflow. The one you see is the original SharePoint page. While instead you should see the one with the option “Approve” and “Reject”

The problem here seems to be a mismatch in the connection between the taskform and a contenttype.

There is solution to this problem. You need to set the right taskform to be shown with the NintexWorkflowTask content type.
Use the nwadmin command line tool with the SetTaskForm operation

NWAdmin.exe -o SetTaskForm -siteUrl teamsiteurl -contentType contenttypename
  -taskformUrl taskformurl [-formType Edit|View|All] [-updatechildren Yes|No]

For example:
NWAdmin.exe -o SetTaskForm -siteUrl "http://portal/mynintexsite"
   -contentType "Nintex Workflow Task" -taskformUrl
   "_layouts/nintexworkflow/ApproveReject.aspx" -updatechildren Yes

Tip! This option also gives you the possibility to attach a custom approval page.

Note that when you installed Nintex Workflow 2007 in a different language you may need to translate the name of the contenttype.

Navigation options missing in site settings

In some situations you will notice that the navigation option is missing from the site settings screen.

Modifying the global or the current navigation is not possible.
Or is it?

Yes, in fact there are two solutions.

The reason that the navigation option is missing is due to the fact that your site does not have the publishing functionality enabled.

Option 1

So enabling this feature will give you back the navigation option.

Go to Site Actions->Site Settings then under “site collection adminstration” section click on “site collection features”. Now Activate the “Office Sharepoint Server Publishing Infrastructure” feature. You need to be a site collection administrator to be able to activate this feature. Now for each site you can activate feature “Office SharePoint Server Publishing”. You are done. Now you should be able to see the navigation option.

Option 2

If you don’t want to enable the publishing feature you can use the quick link /_layouts/AreaNavigationSettings.aspx
Append this directly after the url for your site and you’ll be directed to the navigation modification screen.

See more quick links in this post.

SharePoint MOSS 2007 URL quicklinks

Function Add to the URL Notes
Save as site template /_layouts/savetmpl.aspx
Site usage details /_layouts/UsageDetails.aspx
Add Web Parts Pane ?ToolPaneView=2 Add to the end of the page URL; WILL ONLY WORK IF THE PAGE IS ALREADY CHECKED OUT
Create New Site Content /_layouts/create.aspx
List Template Gallery /_catalogs/lt
Manage Site Collection Administrators /_layouts/mngsiteadmin.aspx
Manage Sites and Workspaces /_layouts/mngsubwebs.aspx
Manage People /_layouts/people.aspx
Manage User Permissions /_layouts/user.aspx
Master Page Gallery /_catalogs/masterpage Also includes Page Layouts
Modify Navigation /_layouts/AreaNavigationSettings.aspx
Recycle Bin /_layouts/AdminRecycleBin.aspx
Site Column Gallery /_layouts/mngfield.aspx
Site Content Types /_layouts/mngctype.aspx
Site Content and Structure Manager /_layouts/sitemanager.aspx
Site Settings /_layouts/settings.aspx
Site Template Gallery /_catalogs/wt
Site Usage Summary /_layouts/SpUsageWeb.aspx
User Alerts /_layouts/sitesubs.aspx
View All Site Content /_layouts/viewlsts.aspx
Web Part Gallery /_catalogs/wp
Web Part Page Maintenance ?contents=1 Add to the end of the page URL
Workflows /_layouts/wrkmng.aspx

Determine the SharePoint version

Description WSS KB MOSS KB Version
Aug 09 CU KB973400 12.0.0.6514
June 09 CU 12.0.0.6510
April 09 CU 12.0.0.6504
SP2 KB953338 KB953334 12.0.0.6421
February CU KB961755 KB961756 12.0.0.6341
December CU KB960010 KB960011 12.0.0.6335
October Cumulative update KB957691 KB957693 12.0.0.6332
August Cumulative update KB956056 KB951297 12.0.0.6327
Infrastructure Update KB951695 KB951297 12.0.0.6318
Post SP1 Hotfix KB948945 12.0.0.6303
Post SP1 Hotfix KB941274 12.0.0.6301
Post SP1 Hotfix KB941422 12.0.0.6300
SP1 12.0.0.6219
October 2007 public update 12.0.0.6039
August 2007 hotfix 12.0.0.6036
RTM 12.0.0.4518
Beta 2 TR 12.0.0.4407
Beta 2 12.0.0.4017

How to change the status of the Infopath logo

How to change the status of the logo

By default, the logo is turned on after you install the hotfix. To change the status that the logo has when you view a form in a browser window, do one of the following on the server that is running Forms Server 2007:

  • To turn off the logo, run the following SQL script.
    stsadm -o setformsserviceproperty -pn AllowBranding -pv false

  • To turn on the logo, run the following SQL script.
    stsadm -o setformsserviceproperty -pn AllowBranding -pv true

  • To determine whether the logo is turned on or whether the logo is turned off, run the following SQL script.
  • stsadm -o getformsserviceproperty -pn AllowBranding