Dataconnections in InfoPath and SharePoint

Dataconnections in InfoPath and SharePoint

Introduction

This walk­through is based on screen­shots of a dutch envi­ron­ment. This how­ev­er should not be a prob­lem. These screens in any oth­er lan­guage would have the same options on the exact same spot. You even might learn a lit­tle Dutch while you’re at it.

What we are going to do here is cre­ate a dat­a­con­nec­tion and even­tu­al­ly save it to a con­nec­tion­sli­brary in Share­Point as a .udcx file.

Create dataconnection

Cre­ate a dat­a­con­nec­tion in infopath.

Select Data­base (Microsoft SQL Serv­er only)

And click Next

Click op Data­base Selecteren

Select New SQL serverconnection.odc

And Click open

Enter the server­name and select the type of cre­den­tials you would like to use. Click Next.

When you choose to use user­name and pass­word it rec­om­mend­ed to save these cre­den­tials in the file.

Select a table and Click Next.

Select the fields that need to be read.
and Click Next, Next and  Fin­ish.

Convert the dataconnection

Select the con­nec­tion we’ve just cre­at­ed and Click con­vert.

Select the dat­a­con­nec­tion­sli­brary in Share­Point and name the file. Make sure to add the .udcx exten­sion.

And Click OK.

Delete the orig­i­nal dat­a­con­nec­tion and Click Add.

Select search the Microsoft Office Share­Point Serv­er for con­nec­tions.

And Click Next.

By click­ing the Man­age Sites but­ton add the site that holds the dat­a­con­nec­tion­sli­brary.

Open the dat­a­con­nec­tions fold­er and select the new­ly cre­at­ed dat­a­con­nec­tion.

Click Next.

Name the new con­nec­tion and click Fin­ish.



The new dat­a­con­nec­tion is ready for use.

Security settings in SharePoint

Make sure the user has all the required per­mis­sions on SQL Serv­er.

If you have hard­cod­ed the cre­den­tials (in con­nec­tion string, UDCX file, etc), “Allow embed­ded SQL Authen­ti­ca­tion” must be enabled under Cen­tral Admin -> Appli­ca­tion Man­age­ment -> Con­fig­ure InfoPath Forms Ser­vices.

Make sure to have cross-domain access enabled for Infopath Forms Ser­vices under Cen­tral Admin -> Appli­ca­tion Man­age­ment -> Con­fig­ure InfoPath Forms Ser­vices and also have this set­ting enabled in Inter­net Explor­er for the zone InfoPath form loads.

Have both SQL and Win­dows authen­ti­ca­tion enabled on SQL serv­er

If your brows­er enabled form is not work­ing with Win­dows cre­den­tials, try using SQL cre­den­tials.

SharePoint 2010 certification

As of June cer­ti­fi­ca­tion for Share­Point 2010 will be avail­able. Two new cer­ti­fi­ca­tions and relat­ed course­ware will be intro­duced for IT Pros:

TECHNOLOGY SPECIALIST: CONFIGURING SHAREPOINT 2010 (70–667)
With the train­ing cours­es of this MCTS cer­ti­fi­ca­tion, IT Pro­fes­sion­als can learn con­fig­u­ra­tion skills for Share­Point, includ­ing deploy­ment, upgrade, man­age­ment and oper­a­tion on a serv­er farm.

IT PROFESSIONAL: ADMINISTRATING SHAREPOINT 2010 (70–668)
The train­ing cours­es of this MCITP cer­ti­fi­ca­tion cov­er advanced Share­Point 2010 top­ics like capac­i­ty
plan­ning, topol­o­gy design­ing and per­for­mance tun­ing.

But before that you wil be able to learn a lot by read­ing con­tent and watch­ing videos on the new fea­tures of Share­Point 2010.

Vis­it this link to read more.

Nintex workflow 2007 web services

You can find these web­ser­vices using the folow­ing syn­tax:

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

Nin­tex­Work­flowWS

The fol­low­ing oper­a­tions are sup­port­ed. For a for­mal def­i­n­i­tion, please review the Ser­vice Descrip­tion.

Inline Functions in Nintex

Function reference

fn-Abs

Returns the absolute val­ue of a num­ber.

Exam­ple

fn-Abs({WorkflowVariable:Number})

Argu­ments

  • Num­ber The num­ber to return the absolute val­ue of.

fn-Currency

Rep­re­sents a numer­ic val­ue as a cur­ren­cy for­mat­ted text.

Exam­ple

fn-Currency({WorkflowVariable:Cost})

Argu­ments

  • Num­ber A vari­able con­tain­ing a numer­ic val­ue.

fn-DateDiffDays

Deter­mines the num­ber of days between two dates. The result can be a dec­i­mal val­ue includ­ing par­tial days.

Exam­ple

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

Argu­ments

  • Start date The start­ing date and time to cal­cu­late the dif­fer­ence between.
  • End date The end date and time to cal­cu­late the dif­fer­ence between.

fn-DateDiffHours

Deter­mines the num­ber of hours between two dates. The result can be a dec­i­mal val­ue includ­ing par­tial hours.

Exam­ple

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

Argu­ments

  • Start date The start­ing date and time to cal­cu­late the dif­fer­ence between.
  • End date The end and time date to cal­cu­late the dif­fer­ence between.

fn-DateDiffMinutes

Deter­mines the num­ber of min­utes between two dates. The result can be a dec­i­mal val­ue includ­ing par­tial min­utes.

Exam­ple

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

Argu­ments

  • Start date The start­ing date and time to cal­cu­late the dif­fer­ence between.
  • End date The end and time date to cal­cu­late the dif­fer­ence between.

fn-DateDiffSeconds

Deter­mines the num­ber of sec­onds between two dates. The result can be a dec­i­mal val­ue includ­ing par­tial sec­onds.

Exam­ple

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

Argu­ments

  • Start date The start­ing date and time to cal­cu­late the dif­fer­ence between.
  • End date The end and time date to cal­cu­late the dif­fer­ence between.

fn-FormatDate

Rep­re­sents a date time val­ue in text of a spe­cif­ic for­mat.

Exam­ple

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

Argu­ments

fn-Insert

Adds text in to a larg­er string.

Exam­ple

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

Argu­ments

  • Text The text to mod­i­fy.
  • Start posi­tion The char­ac­ter posi­tion to insert the new text at. The first char­ac­ter in the string is at posi­tion 0.
  • New text The addi­tion­al text that will be added at the start posi­tion.

fn-Length

Returns the num­ber of char­ac­ters in a string.

Exam­ple

fn-Length({WorkflowVariable:Text})

Argu­ments

  • Text The string to count the char­ac­ters of.

fn-Max

Returns the greater of two num­bers.

Exam­ple

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

Argu­ments

  • Num­ber 1 The first num­ber to com­pare.
  • Num­ber 2 The sec­ond num­ber to com­pare.

fn-Min

Returns the less­er of two num­bers.

Exam­ple

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

Argu­ments

  • Num­ber 1 The first num­ber to com­pare.
  • Num­ber 2 The sec­ond num­ber to com­pare.

fn-NewGuid

Gen­er­ate a glob­al­ly unique iden­ti­fi­er.

Exam­ple

fn-NewGuid()

fn-PadLeft

Returns the pro­vid­ed string right aligned and padded to the total length with a spe­cif­ic char­ac­ter.

Exam­ple

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

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

Argu­ments

  • Text The string to pad.
  • Length The tar­get total length of the padded result.
  • Char­ac­ter Option­al. The char­ac­ter to pad the orig­i­nal string with. A space char­ac­ter is used by default.

fn-PadRight

Returns the pro­vid­ed string left aligned and padded to the total length with a spe­cif­ic char­ac­ter.

Exam­ple

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

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

Argu­ments

  • Text The string to pad.
  • Length The tar­get total length of the padded result.
  • Char­ac­ter Option­al. The char­ac­ter to pad the orig­i­nal string with. A space char­ac­ter is used by default.

fn-Power

Rais­es a num­ber to the spec­i­fied pow­er.

Exam­ple

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

Argu­ments

  • Num­ber The num­ber to raise to the pow­er.
  • Num­ber The pow­er to raise num­ber to.

fn-Remove

Removes a sec­tion of text in a larg­er string.

Exam­ple

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

Argu­ments

  • Text The text to mod­i­fy.
  • Start posi­tion The char­ac­ter posi­tion from which to remove the fol­low­ing char­ac­ters. The first char­ac­ter in the string is at posi­tion 0.
  • Length Option­al. The num­ber of char­ac­ters from the start posi­tion to remove. All remain­ing char­ac­ters will be removed by default.

fn-Replace

Replaces a sec­tion of text in a larg­er string.

Exam­ple

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

Argu­ments

  • Text The text to mod­i­fy.
  • Old val­ue The text to search for and replace.
  • New val­ue The text to replace Old val­ue with.

fn-Round

Rounds a dec­i­mal val­ue to the near­est inte­ger.

Exam­ple

fn-Round({WorkflowVariable:Number})

Argu­ments

  • Num­ber The dec­i­mal num­ber to round.

fn-SubString

Extracts a por­tion of text from a string.

Exam­ple

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

Argu­ments

  • Text The text to extract a val­ue from
  • Start index The posi­tion in the text of the first char­ac­ter to retrieve. The first char­ac­ter in the string is at posi­tion 0.
  • Num­ber of char­ac­ters The num­ber of char­ac­ters to retrieve from the start index.

fn-ToLower

For­mats text in a string to all low­er case.

Exam­ple

fn-ToLower({WorkflowVariable:Text})

Argu­ments

  • Text The string to con­vert to all low­er case.

fn-ToTitleCase

For­mats text in a string to title case.

Exam­ple

fn-ToTitleCase({WorkflowVariable:Text})

Argu­ments

  • Text The string to con­vert to title case.

fn-ToUpper

For­mats text in a string to all upper case.

Exam­ple

fn-ToUpper({WorkflowVariable:Text})

Argu­ments

  • Text The string to con­vert to all upper case.

fn-Trim

Removes lead­ing and trail­ing white­space from a string.

Exam­ple

fn-Trim({WorkflowVariable:Text})

Argu­ments

  • Text The text to remove lead­ing and trail­ing white­space char­ac­ters from.

fn-XmlEncode

Encodes a string to make it safe for view­ing in html.

Exam­ple

fn-XmlEncode({WorkflowVariable:Text})

Argu­ments

  • Text The text to encode.

fn-XmlDecode

Decodes a html safe string to reg­u­lar text.

Exam­ple

fn-XmlDecode({WorkflowVariable:Text})

Argu­ments

Wrong approve / reject page is shown in Nintex

In some cas­es you are pre­sent­ed the wrong page when try­ing to approve a task that was cre­at­ed by a Nin­tex work­flow. The one you see is the orig­i­nal Share­Point page. While instead you should see the one with the option “Approve” and “Reject”

The prob­lem here seems to be a mis­match in the con­nec­tion between the task­form and a con­tent­type.

There is solu­tion to this prob­lem. You need to set the right task­form to be shown with the Nin­tex­Work­flow­Task con­tent type.
Use the nwad­min com­mand line tool with the Set­Task­Form oper­a­tion

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

For exam­ple:
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 pos­si­bil­i­ty to attach a cus­tom approval page.

Note that when you installed Nin­tex Work­flow 2007 in a dif­fer­ent lan­guage you may need to trans­late the name of the con­tent­type.

Navigation options missing in site settings

In some sit­u­a­tions you will notice that the nav­i­ga­tion option is miss­ing from the site set­tings screen.

Mod­i­fy­ing the glob­al or the cur­rent nav­i­ga­tion is not pos­si­ble.
Or is it?

Yes, in fact there are two solu­tions.

The rea­son that the nav­i­ga­tion option is miss­ing is due to the fact that your site does not have the pub­lish­ing func­tion­al­i­ty enabled.

Option 1

So enabling this fea­ture will give you back the nav­i­ga­tion option.

Go to Site Actions->Site Set­tings then under “site col­lec­tion admin­stra­tion” sec­tion click on “site col­lec­tion fea­tures”. Now Acti­vate the “Office Share­point Serv­er Pub­lish­ing Infra­struc­ture” fea­ture. You need to be a site col­lec­tion admin­is­tra­tor to be able to acti­vate this fea­ture. Now for each site you can acti­vate fea­ture “Office Share­Point Serv­er Pub­lish­ing”. You are done. Now you should be able to see the nav­i­ga­tion option.

Option 2

If you don’t want to enable the pub­lish­ing fea­ture you can use the quick link /_layouts/AreaNavigationSettings.aspx
Append this direct­ly after the url for your site and you’ll be direct­ed to the nav­i­ga­tion mod­i­fi­ca­tion screen.

See more quick links in this post.

SharePoint MOSS 2007 URL quicklinks

Func­tion Add to the URL Notes
Save as site tem­plate /_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
Cre­ate New Site Con­tent /_layouts/create.aspx
List Tem­plate Gallery /_catalogs/lt
Man­age Site Col­lec­tion Admin­is­tra­tors /_layouts/mngsiteadmin.aspx
Man­age Sites and Work­spaces /_layouts/mngsubwebs.aspx
Man­age Peo­ple /_layouts/people.aspx
Man­age User Per­mis­sions /_layouts/user.aspx
Mas­ter Page Gallery /_catalogs/masterpage Also includes Page Lay­outs
Mod­i­fy Nav­i­ga­tion /_layouts/AreaNavigationSettings.aspx
Recy­cle Bin /_layouts/AdminRecycleBin.aspx
Site Col­umn Gallery /_layouts/mngfield.aspx
Site Con­tent Types /_layouts/mngctype.aspx
Site Con­tent and Struc­ture Man­ag­er /_layouts/sitemanager.aspx
Site Set­tings /_layouts/settings.aspx
Site Tem­plate Gallery /_catalogs/wt
Site Usage Sum­ma­ry /_layouts/SpUsageWeb.aspx
User Alerts /_layouts/sitesubs.aspx
View All Site Con­tent /_layouts/viewlsts.aspx
Web Part Gallery /_catalogs/wp
Web Part Page Main­te­nance ?contents=1 Add to the end of the page URL
Work­flows /_layouts/wrkmng.aspx

Determine the SharePoint version

Descrip­tion WSS KB MOSS KB Ver­sion
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
Feb­ru­ary CU KB961755 KB961756 12.0.0.6341
Decem­ber CU KB960010 KB960011 12.0.0.6335
Octo­ber Cumu­la­tive update KB957691 KB957693 12.0.0.6332
August Cumu­la­tive update KB956056 KB951297 12.0.0.6327
Infra­struc­ture Update KB951695 KB951297 12.0.0.6318
Post SP1 Hot­fix KB948945 12.0.0.6303
Post SP1 Hot­fix KB941274 12.0.0.6301
Post SP1 Hot­fix KB941422 12.0.0.6300
SP1 12.0.0.6219
Octo­ber 2007 pub­lic update 12.0.0.6039
August 2007 hot­fix 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 hot­fix. To change the sta­tus that the logo has when you view a form in a brows­er win­dow, do one of the fol­low­ing on the serv­er that is run­ning Forms Serv­er 2007:

  • To turn off the logo, run the fol­low­ing SQL script.
    stsadm -o setformsserviceproperty -pn AllowBranding -pv false

  • To turn on the logo, run the fol­low­ing SQL script.
    stsadm -o setformsserviceproperty -pn AllowBranding -pv true

  • To deter­mine whether the logo is turned on or whether the logo is turned off, run the fol­low­ing SQL script.
  • stsadm -o getformsserviceproperty -pn AllowBranding