Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to...

Post on 27-Jul-2020

3 views 0 download

Transcript of Microsoft Office InfoPath 2003 Developer's ReferenceSchema.xsd The XML Schema files that are used to...

ShowAll

AbouttheInfoPathDeveloper'sReference

TheInfoPathDeveloper'sReferencecontainsHelpinthefollowingareas:

ProgrammingConceptsContainsconceptualinformationaboutMicrosoftOfficeInfoPath2003formdevelopment.Subjectareasincludeformarchitecture,theformdefinition(.xsf)file,theprogrammingenvironment,andusingtheInfoPathobjectmodel.

DeveloperSampleFormsContainsdocumentationforasetofformsdesignedtodemonstratevariousdevelopmenttechniquesforcustomizingandimplementingInfoPathfeatures.

InfoPathObjectModelReferenceContainsdocumentationfortheInfoPathobjectmodel,includingallofitscollections,objects,properties,methods,events,andenumerations.

InfoPathXSFReferenceContainsdocumentationfortheInfoPath.xsffile,includingallofitsnamespaces,types,groups,elements,andattributes.

ShowAll

AboutActiveXcontrols

YoucanhostActiveXcontrolsinforms.Thesecontrolscanbepreexisting(withsomeconstraints)orcanbewrittenspecificallyforInfoPath.

WriteanActiveXcontrol

AddanActiveXcontroltotheInfoPathdesignenvironment

DeployanActiveXcontrol

ShowAll

AboutADO.NETdatasetintegration

YoucaneasilyconnectformstoWebservicesthatreceivedatafromandsubmitdatatoADO.NETdatasets.

ConnectingformstoWebservicestoreceivedata

ConnectingformstoWebservicestoreceiveandsubmitdata

ConnectingformstoWebservicestosubmitdata

Thereareafewlimitationsondatasets:

Onlyonedatasetisallowedwhenaformisedited.

Copyingandpastingofnesteddatasetsupdatestheforeignkeytopointtotheparentvalues.

DeleteRuleandUpdateRulepropertiesarenotsupported.

Constraintsorrelationshipscannotbedisabled.

ShowAll

Aboutbackwardcompatibility

InMicrosoftOffice2003EditionsServicePack1,existingformsfunctionthesamewaytheydidinMicrosoftOfficeInfoPath2003,whiletakingadvantageoftheimprovementsandnewfeaturesincludedintheservicepack.ToensurecompatibilityforusersofMicrosoftOfficeInfoPath2003withoutServicePack1orlaterinstalled,however,certainfeaturesarenotavailabletoexistingforms.

ThefollowingsectionsdescribeareasoffunctionalitythatmaybeaffectedwhenyouareworkingwithmorethanoneversionofInfoPath.

Upgradingexistingforms

Creatingnewformtemplates

Removingnewfeaturesfromaformtemplate

Disablingnewfeatures

Openingformtemplatesthatcontainformcodewithupdatedobjectmodelmembers

LaunchingandautomatingInfoPathfromanotherapplication

ShowAll

Aboutchangingaform'smaindatasource

Attimes,youmayneedtomodifyaformtouseadifferentXMLSchema,databaseserver,orWebservicebeforeorafterdeployment.Youdonothavetomodifytheformdefinitionfile(.xsf)toaccomplishthistask,however,becausewithMicrosoftOfficeInfoPath2003ServicePack1orlater,youcanchangethemaindatasourceofyourformthroughtheInfoPathdesigner.

Thestepsyouneedtotaketodothisdiffer,dependingonwhetheryourform'smaindatasourceisanXMLSchema,anXMLdocument,oradataconnection.

ChangethemaindatasourceofaformbasedonanXMLSchemaorXMLdocument.

Changethemaindatasourceofaformbasedonadataconnection.

Aboutdigitalsignatures

Takeadvantageofthefollowingnewfunctionsthathavebeenaddedtothedigitalsignaturesfeature:

Enablesignaturesfortheentireform,orforspecificsetsofdataintheformthatcanbesignedseparately.

Foreachsetofdatathatcanbesigned,specifywhetherasingleormultiplesignaturesareallowedandwhattheirrelationshipwillbe.Forexample,youcanspecifywhethertheyareparallelcosignaturesorwhethereachnewsignaturecountersignsalltheearlierones.

Specifyamessagetobeshowntoformusersastheysigntheform.

Insertandseeasignatureinthedocument,andviewtheformasitwaspresentedtoeachsigner.

Viewverifiablenonrepudiationinformationthathasbeenaddedtoeachsignatureforincreasedsecurity.Thisadditionalinformationispartofthesignatureandcannotberemovedwithoutinvalidatingthesignature.Atanytime,youcanrecallthisdatabyclickingonthesignatureintheform.

Addcustominformationtothesignatureblockinfullytrustedformsthroughanextensivedigitalsignatureobjectmodel.

Accessasignaturethroughasnapshot.Thesnapshotisafilein.pngformat.Itcontainsaviewofthesignaturewithintheformandhasallitsnonrepudiationinformation.

ShowAll

Aboutenablingformstosubmitdata

MicrosoftOfficeInfoPath2003allowsyoutosubmitdataenteredintoaformtoaWebserviceoraWindowsSharePointServicesformlibrary,orasanattachmenttoane-mailmessage.

SetupaconnectiontoaSharePointServicesformlibrarythatisenabledforformsubmission.

Setupane-mailmessagethatisenabledforformsubmission.

SetupaconnectiontoaWebservicethatisenabledfordatasubmission.

ShowAll

Aboutformarchitecture

MicrosoftOfficeInfoPath2003formsarecomposedofseveralfilesandcomponentsthatarecombinedtoprovidespecificfunctionalityforaparticularenduserscenarioorbusinessneed.InfoPathformscanvaryincomplexitydependingonthetypeofneedthattheyaddress.

AnInfoPathformisessentiallyatypeofapplicationthatcreatesaspecifiedclassofXMLdocuments,definestheirlayoutandeditingbehavior,enforcestheirdataconsistency,andprovidestheroutinginformationthatindicateswheretheyshouldbestored.

ItisimportanttounderstandthatInfoPathformsarecomposedofseveraldifferentfilesofmanydifferenttypes;thesefilesarecollectivelyknownastheformfiles.Usually,anInfoPathformiscomposedofthefollowingtypesoffiles.

Name Extension DescriptionFormdefinition

.xsf AnInfoPath-generatedfilethatcontainsinformationaboutalloftheotherfilesandcomponentsusedinaform.Thisfileservesasthemanifestfortheform.

XMLSchema

.xsd TheXMLSchemafilesthatareusedtoconstrainandvalidateaform'sunderlyingXMLdocumentfiles.

View .xsl Thepresentationlogicfilesthatareusedtopresent,view,andtransformthedatacontainedinaform'sunderlyingXMLdocumentfiles.

XMLtemplate

.xml The.xmlfilethatcontainsthedefaultdatathatisdisplayedinaviewwhenanewformiscreated.

XMLcomponenttemplate

.xct The.xmlfilerepresentationsoftheeditingcontrolsthatareusedwhencreatingandfillingoutaform.

Presentation .htm,.gif,.bmp,andothers

Thefilesusedinconjunctionwiththeviewfilestocreateacustomuserinterface.

Businesslogic

.js,.vbs Thescriptfiles(MicrosoftJScriptandMicrosoftVBScript)thatcontainprogrammingcodeusedtoimplementspecificeditingbehavior,datavalidation,eventhandlers,controlofdataflow,andothercustombusinesslogic.

Binary .dll,.exe ThecustomComponentObjectModel(COM)componentsthatprovideadditionalbusinesslogic.

Formtemplate

.xsn Thecompressedfileformat(.cab)thatpackagesalltheformfilesintoonefile.

ShowAll

AboutHumanWorkflowServicessupport

HumanWorkflowServices(HWS)isaserviceprovidedbyMicrosoftBizTalkServer2004thatenablesclientapplicationstobuildandmanagehuman-orientedworkflow.MicrosoftOfficeInfoPath2003providesaccesstothisservicebywayoftheWorkflowtaskpane.Inthistaskpane,userscanstartandtrackHWSactionsandrespondtoHWStasks.InfoPathdoesnotprovideadesignerinterfacetoenabletheWorkflowtaskpane;allHWSfunctionalityisenabledbymodifyingtheformdefinitionfile(.xsf).

UsingtheWorkflowTaskPaneTheWorkflowtaskpaneallowstheusertostartorextendaworkfloworrespondtoatask.

ThethreesectionsoftheWorkflowtaskpaneare:

StartWorkflowConsistsoftheactionbuttonsthatcanbeusedtostartaworkflow.ThissectionisonlyvisibleforformsthatareHWSenabledandthatdonothaveanexistingworkflowassociatedwiththem.

ActionTracksthestatusofactionsandtheirassociatedtasks.Onceauserstartsanaction,theactionrunsandistrackedbytheHWSservice.InfoPathdisplaysthestatusoftheactionandwhoisassignedthetask.

TaskAllowstheusertoworkwithtasks.Whenataskisassignedtoauser,InfoPathdisplaysthestatusofthetask,abuttontoresponddirectlytothetask,andoneormorebuttonstostartnewactions.

EnablingtheWorkflowtaskpane

Addingallowedactionstoforms

Addingallowedtaskstoforms

UsingtheOnClickeventtoaddactionandtaskbuttons

CreatinganHWSAdapterBecausetheWorkflowtaskpanedoesnotsubmitdatatotheHWSserviceautomatically,youmustcreateanHWSadaptertosubmittheform.

Thereisnodesignerinterfaceassociatedtothesubmitadapters.Toenabletheseadapters,modifytheformdefinitionfile(.xsf)toincludethehwsAdapterelementwithinthedataAdapterselement.

LikeotherInfoPathWebserviceadapters,theelementmustincludeanamefortheadapterandthelocationoftheWebServicesDescriptionLanguage(WSDL),andmustspecifywhethertheadapterallowssubmittingandquerying.BecausetheseadaptersareonlyusedtosubmitdatatoanHWSservice,thesubmitAllowedattributemustbesetto"yes".ThequeryAllowedattributecanbeomitted,whichcorrespondstoadefaultvalueof"no",oritcanbeincludedandsetto"no".

Aspartofthedesignofactionsandtasks,youcanspecifyadditionalparametersthatarespecifictoeachactionortask.BelowisanexampleofanadapterthatstartsaworkflowwithanApprovalaction.ThevaluetouseforthehwsOperationelementtypeis"addActionToNewActivityFlow".ThetypeIDattributeusestheactionTypeIDattributevalue,whichisaGUID.

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://.../HWSService.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID=”{guid}”serviceUrl="http://.../HWSService.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:foo/b:bar"dataObject=”Aux1”/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

ThehwsAdapterelementhasthesamedefaultinterfaceastheothersubmitadapterssupportedbyInfoPath,buttheHWSsubmitadaptersdonotappearintheinterface.Instead,toinvokeasubmitaction,youmust

addittoyourcode,asshowninthefollowingexample:

XDocument.DataAdapters.Item("StartApproval").Submit();

Atruntime,whenthesubmitoperationisinvoked,abuttonwiththecaption,GetStatus,appearsontheWorkflowtaskpane.Thisbuttonallowstheusertorefreshthetaskpanesothatitshowsthecurrentworkflowinformation.

DefiningHWSsubmitoperationsforactions

DefiningHWSreceiveoperations

ShowAll

AboutprogrammingInfoPath

MicrosoftOfficeInfoPath2003providesdeveloperswitharichdevelopmentenvironmentforcustomizingforms.Formscanbecustomizedbywritingprogrammingcodetorespondtoformanddatavalidationevents,toaccessandmanipulateaform'sunderlyingXMLdocument,toimplementcustomdatasubmissionandmerges,andtoimplementaccesstoexternaldatasources.Customizingaformcanalsoinvolvealteringoneoftheformfilestosuitaspecificrequirement.

ItisimportanttounderstandafewkeyconceptsthatareinvolvedinprogramminganInfoPathform.TheseconceptsincludetheInfoPathprogrammingcomponents,programmaticanddeclarativeprogramming,theInfoPathprogramminglanguages,andtheInfoPathprogrammingenvironment.

InfoPathprogrammingcomponents

Programmaticanddeclarativedevelopment

InfoPathprogramminglanguagesandtheprogrammingenvironment

ShowAll

Aboutsecondarydatasources

MicrosoftOfficeInfoPath2003ServicePack1addstheabilitytoconnectmultipledatasourcestoaformsimultaneously.Usingmultipledatasourcesinyourformsallowsyoutobuildcomplexfunctionalitysuchaslookuplistsorofflinedatastores.

MainandsecondarydatasourcesThemaindatasourcecorrespondstothegroupsandfieldscontainingthedatathatunderliestheformandissavedastheformfile.

Asecondarydatasourceisusedtostoredatafromadditionaldatasources.Wheneveranewdataconnectioniscreatedforretrievingdata—forexample,byusingtheAddbuttonoftheDataConnectionsdialogbox—theretrieveddataisnotstoredinthemaindatasourcebutinasecondarydatasource.Thesecondarydatasourcereceivesthedatafromanydataconnectionusedforquerying,whetheritisanXMLdocument,adatabase,aWebservice,oraSharePointlibraryorlist.

TheDataSourcetaskpanedisplaysthestructure(groupsandfields)ofeachdatasource,bothmainandsecondary,andisusedforbindinggroupsorfieldsinthedatasourcetocontrolsintheform.Whenauserfillsouttheform,thecontrolsdisplaythedatafromthedatasourceandallowittobeupdatedduringediting.

NewfeaturesforworkingwithsecondarydatasourcesThefollowingsectionsdescribethechangesmadetoworkingwithsecondarydatasourcesinInfoPathServicePack1.

TheDataConnectionsdialogbox

DataSourcetaskpane

Fieldsandgroups

Controlsavailableforbindingtosecondarydatasources

ShowAll

Aboutsecurityanddeployment

AdditionalsecurityfeaturesanddeploymentfunctionalityhavebeenaddedtoMicrosoftOfficeInfoPath2003inServicePack1.Supporthasbeenaddedtoallowformtemplatestobemovedfromonelocationtoanotherorsentasanattachmenttoane-mailmessage.Inaddition,supporthasbeenaddedtotheInfoPathdesignmodetofacilitatethecreationanddeploymentoffullytrustedforms.

Securitylevels

Formtemplatescanhaveoneofthreedifferentsecuritylevels,dependingonwheretheformislocated.Thesesecuritylevelsareasfollows:

Restricted

Domain

FullTrust

NoteAllformsgeneratedintheInfoPathdesignerhaveasecuritylevelassociatedwiththem.InfoPathwillattempttoopenformsattheirassociatedsecuritylevel.Ifthesecuritylevelassociatedwiththeformishigherthanthesecuritylevelthatcanbegrantedtoit,theformwillnotopen.

Formsaregrantedsecuritylevelsbasedonthelocationfromwhichtheformwasopened.Formoreinformation,seetheTrustlevelssection.

TrustlevelsThehighestleveloftrustgrantedtoaformtemplateisdeterminedbythe"cachedfrom"location(thatis,wheretheformiscachedfrom)andotherverificationcode,asdescribedinthefollowingtable.Theattributeslistedinthetable(forexample,HTTP,UNC,requireFullTrust)arecache-basedentriesthatareusedtodeterminetheleveloftrustgrantedtoaform.

TrustLevelGranted

TrustLevelGranted

TrustLevelGranted

HighestLevelofTrustGrantedFullTrust

ClientComputer(Sandboxed)

Intranet(Sandboxed)

file:LocationId=CachedFromLocation

X

file:LocationId<>CachedFromLocationornoLocationId(regardlessofwheretheformcamefrom)

CachedFromLocation:IntranetHTTPorHTTPS

X

CachedFromLocation:InternetHTTPorHTTPS

CachedFromLocation:UNC XInstalledTemplate(requireFullTrust="yes")

X

InstalledTemplate(requireFullTrust="no")

X

Templatewithtrustedpublishercertificate

X

ExtractedFormFiles X

AllformfilesopenedintheInfoPatheditorareboundbyasetofconditionsthatdeterminethesecuritylevelinwhichtheformwillopen

andwhetheritwillopen.WhenanInfoPathformisopenedintheeditor,itwilleitherbeopenedwithanappropriatesecuritylevel,oritwillfailtoload.Ifaformrequestsahighersecuritylevelthanitcanbegranted(aformcanrequestaspecificsecuritylevelusingthetrustLevelorrequireFullTrustattribute),itwillnotbepermittedtoload.Otherwise,itwillbeloadedwiththesecuritylevelitrequests.Iftheformtemplateisnotpermittedtoopenwiththerequestedsecuritylevel,theuserwillnotbeabletoopentheformandwillreceivethe"InsufficientSecurityPrivilegeWarning"errormessage.

Thefollowingtabledescribestheconditionsrequiredforopeningaformateachsecuritylevelandtheresultantbehaviorwhentheuserattemptstoopentheform:

Formasksfor: Formasksfor:

EditorOpens/Fails

FullTrust(requireFullTrust="yes")

DomainTrust(trustLevel="Domain"orblank)

HighesttrustlevelInfoPathcangrantbasedonevidence

Trusted(installedortrustedcertificate)

EditoropensatFullTrustlevel

N/A

HighesttrustlevelInfoPathcangrantbasedonevidence

DomainTrust:ClientComputer

Failstoopen EditoropensatDomainlevel

Highesttrust

Failstoopen EditoropensatDomainlevel

levelInfoPathcangrantbasedonevidence

DomainTrust:Intranet

HighesttrustlevelInfoPathcangrantbasedonevidence

DomainTrust:Internet

Failstoopen EditoropensatDomainlevel

HighesttrustlevelInfoPathcangrantbasedonevidence Restricted

Failstoopen Failstoopen

Specifyingasecuritylevel

Maildeploymentandmobileformtemplates

MicrosoftOfficeInfoPath2003ServicePack1allowsyoutosendyourformtemplatesasanattachmenttoane-mailmessageandtomovethemfromonelocationtoanother.Maildeploymentisaneasyandeffectivewaytodistributeformsforinterofficeuseaswellastodeployformstoremoteusers.

Understandingformidentity

Designingaformtosendasanattachmenttoane-mailmessage

Sharingformsbye-mailmessageorfromacommonsharedlocation

Compatibility

ShowAll

Abouttheformdefinitionfile

TheMicrosoftOfficeInfoPath2003formdefinition(.xsf)file,commonlyreferredtoasthe.xsffile,servesasthemanifestofanInfoPathform.The.xsffileisautomaticallycreatedbyInfoPathwhenanewformtemplateiscreatedandsavedindesignmode.Asformdesignersanddeveloperschangetheformtemplateoraddnewfeaturestoit,InfoPathupdatesthe.xsffiletoreflectthosechanges.

NoteThe.xsffilecanalsobemodifieddirectlybyusinganytextorXMLeditor,suchasMicrosoftNotepad.However,careshouldbetakenwhenmakingmodificationstothe.xsffile:ifaninvalidentryismade,theformthatthefileisassociatedwithmaybeleftinanunusablestate.However,somecustomizationscanbemadetothe.xsffilethatcannotbegeneratedindesignmode.

The.xsffileisthecorefileofanInfoPathformbecauseitcontainsinformationabouttheformasawhole.Someofthedataitcontainsincludesprocessingmetadata,userinterfacecustomizations,schemadefinitions,views,businesslogicdeclarations,eventhandlers,anddeploymentinformation.

Thefollowingaresomeoftheitemsthatthe.xsffilecontains:

Auniqueidentifierfortheform

Globalmetadatainformationabouttheform,includingdeploymentandpublishinginformation

TheXMLSchemadefinitionsfortheXMLdocumentthattheformproduces

Definitionofviewsandtheirassociateduserinterfacecomponents(menus,toolbars,andbuttons)

Definitionofeditingactionsthataremadeavailableusinguserinterfacecomponents,andhowtheiravailabilitywillbedeterminedcontextually

Workflowandroutinginformation

Eventhandlers,datavalidation,andbusinesslogicthatisassociatedwithindividualXMLnodesoftheform'sunderlyingXMLdocument,orwiththe

XMLdocumentitself

Eventhandlersassociatedwiththeformasawhole

Packaginginformationaboutallofthefilescontainedwithintheformtemplate

The.xsffileisbasedonthexsfnamespace.ItsrootelementisthexDocumentClasselement.

NoteAcompletereferencetothe.xsffile,includingallofitselements,attributes,andotherentities,canbefoundintheInfoPathXSFReferencethatispartoftheInfoPathDeveloper'sReference,availableintheInfoPathHelpsystemandtheMicrosoftScriptEditor(MSE)Helpsystem.

ShowAll

Abouttheprogrammingenvironment

MicrosoftOfficeInfoPath2003usestheMicrosoftScriptEditor(MSE)asitsprimaryintegrateddevelopmentenvironment.MicrosoftJScriptandMicrosoftVBScriptaretheprogramminglanguagesthatareusedinMSEtocreatecustombusinesslogicforaform.

MSEcanbeopenedwhenworkingwithaformindesignmodebypointingtoScriptontheToolsmenuandclickingMicrosoftScriptEditor,orbypressingALT+SHIFT+F11.WhenyouopenMSEfromInfoPath,theMSEcodeeditorappearsandtheform'sdefaultscriptingfile(witheithera.jsor.vbsextension,dependingonthescriptinglanguagesetfortheform)opensinthecodeeditingwindow.

WorkingwithMSEinanInfoPathforminvolvesseveraltasks,includingsettingthedefaultscriptinglanguage,creatinganeventhandler,anddebuggingscriptingcode.

Settingthedefaultscriptinglanguage

Creatinganeventhandler

Debuggingscriptingcode

NoteFormoreinformationaboutusingMSE,clickMicrosoftScriptEditorHelpontheHelpmenuwhenworkinginMSE.

AboutVisualStudio.NETintegration

MicrosoftOfficeInfoPath2003ServicePack1orlaterallowsyoutouseMicrosoftVisualStudio.NETtowritemanagedcodeinsteadofscriptforformcodeinnewInfoPathformtemplatesortoaddmanagedcodetoexistingformtemplates.TouseVisualStudio.NETtocreate,debug,andbuildInfoPathprojectsthatuseMicrosoftVisualC#orVisualBasic.NETmanagedcode,youmustdownloadtheMicrosoft®OfficeInfoPath™2003ToolkitforVisualStudio®.NETfromtheInfoPathDeveloperCenterontheMicrosoftDeveloperNetwork(MSDN)WebsiteandinstallitwithVisualStudio.NET2003.TheintegrationfeaturesprovidedbythetoolkitallowyoutouseacombinationofInfoPathforformdesignandVisualStudio.NETforwritinganddebuggingformcode.TheseintegrationfeaturesallowyoutotakeadvantageofsuchfeaturesoftheVisualStudio.NETdevelopmentenvironmentas:

Buildingyourprojectindebugorreleaseconfigurations.

UsingIntelliSensesupportintheCodeEditorsuchasstatementcompletion,memberslists,andinlineparameterinformation.

PressingF1intheCodeEditortodisplaycontext-sensitivehelpinformationabouttypes,members,andothercodekeywords.

UsingVisualStudio.NETdebuggingfeatures.

Additionally,usingmanagedcodeinInfoPathprojectsallowsyoutotakeadvantageofthefeaturesofthe.NETFrameworkcommonlanguageruntime(CLR)andtomakecallsintothecomprehensive,object-orientedcollectionofreusabletypesprovidedbythe.NETFrameworkclasslibrary.

FormoreinformationonusingVisualStudio.NETtocreateInfoPathprojects,seethedocumentationinstalledwiththeMicrosoftOfficeInfoPath2003ToolkitforVisualStudio.NET.

ShowAll

AboutXMLSchemaimprovements

ManyimprovementshavebeenmadeforXMLSchema(.xsd)supportinMicrosoftOfficeInfoPath2003ServicePack1.

NativesupportforthefollowingXMLSchemaconstructshavebeenaddedtoInfoPath:

Abstracttypes

Abstractelementsandsubstitutiongroups

Requiredwildcard(<any>)

Repeatingoroptionalmodelgroupsintheschema(sequence,choice,group,andallwithminOccursormaxOccursdifferentfrom1)

Inlineschemas

InteractiveincrementalcreationofthedatasourceTosupportabstracttypesorelementsandrequiredwildcards,creationofthedatasourceisnowinteractive.Forexample,schemacreationisnotpossibleiftheschemadelegatespartofitssyntaxtootherschemas.Thiscanhappenwhenatypeoranelementisdefinedasabstractorwhenthecontentmodelofanelementcontainsan<any>.Whenoneoftheseconditionsoccurs,InfoPathwillprompttheusertospecifyaschemasourcethatcontainstheneededdatabeforeproceeding.Thisprocessisrepeateduntiltheschemacollectionthatisloadedcontainsenoughinformationtogenerateacompletedatasource.

BettermodelgroupsupportModelgroupsspecifiedas"choice"or"sequence"andwithminOccursormaxOccursnotequalto1arenowshownintheDataSourcetaskpane.Theycanbeboundtocontrols,andtheycanbetreatedasagroupinthedatasource.

NoteModelgroupsdesignatedas"group"or"all"arenotdisplayedintheDataSourcetaskpane.

NativesupportforinlineschemasInlineschemasarenativelysupportedduringdesign.ThisfeatureallowsyoutouseanXMLdocumentthatcontainsitsownschemaasadatasource.

SupportfordatasourcechangeTheunderlyingdatastructureofaformcannowbechangedduringformcreation.ClickingConvertMainDataSourceontheToolsmenuallowsyoutoconvertthecurrentdatasourcewhileretainingtheinformationthatdependsonit.

Changingadatasourceisrestrictedtothefollowingpaths:

Convertingfromablankform,XMLSchema,orXMLfiletoanotherXMLSchemaorXMLfile.

ConvertingfromaWebserviceorotherdataconnectiontoanotherWebserviceordataconnection.

Onceyouspecifythenewdatasource,alldependentdatawillbemappedtothenewdatasource.Ifthedatacannotbemapped,controlswillappearunboundintheview.

NoteChangingthedatasourcedoesnotupdatethecodeassociatedwiththeform.Also,afterusingtheConvertMainDataSourcecommand,youcannotusetheUndocommandontheEditmenutoreverttotheoriginaldatasource.

RecursivetemplatesupportTheRepeatingRecursiveSectioncontroladdsrecursivestructuresofarbitrarydepthtoaform.

ThiscontrolisnowthedefaultcontrolwhenyoudragarecursivestructurefromtheDataSourcetaskpane.

Thepropertiesoftherecursivesectioncorrespondtothepropertiesofanordinarysection,withtheexceptionthatdigitalsignaturesarenotallowed.TheonlypropertythatcanbesetintheinternalrecursiveblockisthedefaultvalueoftheXMLfragmentforadditionalrecursivesectionsinsertedwithintheoutermostinstance.

ShowAll

AbouttheInfoPathobjectmodel

TheMicrosoftOfficeInfoPath2003objectmodelisaCOM-basedobjectmodelthatcanbeusedtointeractwithInfoPathformsandtheirunderlyingXMLdocuments.ItissimilartootherMicrosoftOfficeapplicationobjectmodelsinthatitimplementsinterfacesforcollections,objects,properties,methods,andevents.However,theInfoPathobjectmodelisprimarilyusedinscriptingcode,usingtheMicrosoftScriptEditor(MSE)thatisbuiltintoInfoPath.

NoteUnlikeotherOfficeapplicationsthatsupportcompleteapplicationautomation,theInfoPathobjectmodelsupportsautomationofonlycertainfeaturesoftherun-timeeditingenvironment.

ThefollowingsectionsdiscusstheInfoPathfunctionalareasthattheobjectmodelrepresents,thelocationsfromwhichtheobjectmodelcanbeaccessed,andthelevelsofobjectmodelsecurity.

Objectmodelfunctionalareas

Objectmodelaccess

Objectmodelsecurity

ViewingServicePack1objectmodelchangesfromtheObjectBrowser

ShowAll

Accessingapplicationdata

TheMicrosoftOfficeInfoPath2003objectmodelprovidesobjectsandcollectionsthatcanbeusedtogainaccesstoinformationabouttheInfoPathapplication,includinginformationrelatedtoaform'sunderlyingXMLdocumentandtheformdefinition(.xsf)file.Thisdataisaccessedthroughthetop-levelobjectintheInfoPathobjectmodelhierarchy—theApplicationobject.

UsingtheApplicationobject,InfoPathformdeveloperscanaccessinformationaboutthecurrentlyinstalledinstanceofInfoPath,includingitsnameandversionnumber.Inthefollowingexample,theNameandVersionpropertiesoftheApplicationobjectreturndatainamessageboxtotheuser:

Application.XDocuments(0).UI.Alert("Applicationname:"+Application.Name+"\nApplicationversion:"+Application.Version);

NotethattheAlertmethodoftheUIobject,whichisaccessedthroughtheXDocumentobject,isusedtodisplayamessageboxtotheuser.BecausetheXDocumentobjectthatrepresentsthecurrentlyopenform'sunderlyingXMLdocumentisembeddedintheInfoPathscriptengine,thepreviousexamplecanalsobewrittenasfollows:

XDocument.UI.Alert("Applicationname:"+Application.Name+"\nApplicationversion:"+Application.Version);

NoteThe\ncharacterreferencesinthetextforthealertmessageisastandardnewlinefeedthatcausesthetexttobreakandbeplacedonanewlineinthemessagebox.

Accessingdataaboutaform'sXMLdocument

Accessingdataaboutaform's.xsffile

ShowAll

Accessingexternaldatasources

WhenworkingwithaMicrosoftOfficeInfoPath2003form,youcanwritescriptingcodetoaccesstheform'ssecondarydatasources,whicharetypicallyexternaltotheprimarydatasourceofaform,andthenmanipulatethedatathattheycontain.TheInfoPathobjectmodelsupportsaccesstoaform'sexternaldatasourcesthroughtheuseoftheDataObjectobjectinassociationwiththeDataObjectscollection.

TheInfoPathobjectmodelalsoprovidesasetofdataadapterobjects,containinginformationaboutthesecondarydatasources,andaccesstothedatathattheycontain.ThetypeofdataadapterthatisreturnedbytheDataObjectobjectdependsonthetypeofdatasourcethatwasselectedwhenthesecondarydatasourcewascreatedindesignmode.

OverviewoftheDataObjectscollection

OverviewoftheDataObjectobject

Overviewofthedataadapterobjects

UsingtheDataObjectscollectionandtheDataObjectobject

ShowAll

Accessingformdata

WhenyouwanttoextendthefunctionalityofaMicrosoftOfficeInfoPath2003form,itisoftennecessarytoprogrammaticallyaccessinformationabouttheform'sunderlyingXMLdocument,accessthedatathattheXMLdocumentcontains,orperformsomeactionontheXMLdocument.TheInfoPathobjectmodelsupportsaccessandmanipulationofaform'sunderlyingXMLdocumentthroughtheuseoftheXDocumentobjectinassociationwiththeXDocumentscollection.

TheXDocumentobjectisoneofthemostusefulobjectswithintheInfoPathobjectmodelbecauseitprovidesavarietyofproperties,methods,andeventsthatnotonlyinteractwithaform'sunderlyingXMLdocument,butalsoperformmanyoftheactionsthatarewithintheInfoPathuserinterface.

OverviewoftheXDocumentscollection

OverviewoftheXDocumentobject

UsingtheXDocumentscollectionandtheXDocumentobject

ShowAll

AutomatingInfoPath

MicrosoftOfficeInfoPath2003ServicePack1offersexpandedapplicationautomationintheformofmethodsoftheApplicationobjectandtheXDocumentscollection.

OverviewoftheApplicationandXDocumentobjects

Forbackwardcompatibility,theautomationofInfoPathisaccomplishedbyusingtheExternalApplicationobjectfromaprogramminglanguageorenvironmentthatsupportstheComponentObjectModel(COM).

OverviewoftheExternalApplicationobject

UsingtheExternalApplicationobject

ShowAll

Displayingalertsanddialogboxes

WhenwritingprogrammingcodetoextendthefunctionalityofaMicrosoftOfficeInfoPath2003form,itisoftenusefultoprovidetheuserwithinformationinadialogbox.ProgrammaticallydisplayingadialogboxisaccomplishedinInfoPathbyusingtheUIobject.

OverviewoftheUIobject

UsingtheUIobject

ShowAll

Handlingerrors

Whencreatingcustomapplications,developersmustoftenperformerrorhandlingthatinvolveswritingprogrammingcodetocheckforerrorsraisedbytheapplicationortocreateandraisecustomerrors.TheMicrosoftOfficeInfoPath2003objectmodelsupportserrorhandlingthroughtheuseoftheErrorobjectinassociationwiththeErrorscollection.

InInfoPath,errorscanoccurwhenaform'sXMLSchemaisvalidated,whenacustomvalidationconstraintfails,whenanerrorisgeneratedbytheReportErrormethodoftheDataDOMEventobject,orwhenanerroriscreatedusingtheAddmethodoftheErrorscollection.

OverviewoftheErrorscollection

OverviewoftheErrorobject

UsingtheErrorscollectionandtheErrorobject

ShowAll

Respondingtoformevents

YoucanwritescriptingcodetorespondtovariouseventsthatcanoccurinMicrosoftOfficeInfoPath2003asauserfillsoutaform.InInfoPath,eventstaketheformofeventhandlersthatarecreatedwhenworkingwithaformindesignmode.

InfoPatheventhandlersmustbeinitiallycreatedindesignmodebecause,inadditiontothescriptingdeclarationsthatarecreatedinaform'sprimaryscriptingfile,entriesarealsomadeintheformdefinition(.xsf)file.Afteryouhavecreatedaneventhandler,youshouldnotalteritsdeclarationintheprimaryscriptingfile.

ForinformationaboutcreatingtheInfoPatheventhandlers,seeAbouttheprogrammingenvironment.

Overviewoftheeventobjects

Usingtheeventobjects

ShowAll

Workingwithformwindows

WhenworkingprogrammaticallywithaMicrosoftOfficeInfoPath2003form,youcanwritescriptingcodetoaccesstheform'swindows,andthencustomizesomeoftheitemsthattheycontain.TheInfoPathobjectmodelsupportsaccesstoaform'swindowsthroughtheuseoftheWindowobjectinassociationwiththeWindowscollection.

TherearetwotypesofwindowsinanInfoPathform:theeditingwindowthatisusedastheformareawhenauserfillsoutaform,andthedesigningwindowthatisusedasthedesignmodewhenauserdesignsaform.Whenwritingscriptingcodeinaform,itistheeditingwindowthatprovidesthemostusefulfunctionality,becauseyoucanusetheWindowobjectassociatedwithittoaccessavarietyofpropertiesandmethodsthatcanbeusedtocustomizeaform.

OverviewoftheWindowscollection

OverviewoftheWindowobject

UsingtheWindowscollectionandtheWindowobject

ShowAll

Workingwithviews

WhenworkingwithaMicrosoftOfficeInfoPath2003form,youcanwritescriptingcodetoaccesstheform'sviews,andthenperformavarietyofactionsonthedatathattheviewscontain.TheInfoPathobjectmodelsupportsaccesstoaform'sviewsthroughtheuseoftheViewobject.

OverviewoftheViewobject

UsingtheViewobject

ShowAll

Aboutthedevelopersampleforms

TheMicrosoftOfficeInfoPath2003developersampleformsareasetofformsdesignedtodemonstratevariousdevelopmenttechniquesforcustomizingandimplementingInfoPathfeatures.Thefollowingtablelistseachofthedevelopersampleformsandthefeaturesthattheyillustrate.

Name Filename DescriptionDataValidation

D_VALID.XSN Demonstratesthewaysinwhichdatacanbevalidatedinaform.Methodscoveredincludeschema-based,custom,andscript-basedvalidation.

Events EVENTS.XSN Demonstratestheeventsthatcanbeusedinaform.Eventscoveredincludeformevents,datavalidationevents,andcontrolevents.

StructuralEditing

CD_EDIT.XSN DemonstratesthewaysinwhichthesourceXMLdocumentofaformmaybeedited,andhowtheeditingactionsthatareavailabletoauserarebasedoncontext.Methodscoveredincludefieldandstructuralediting,withexamplesofeditingusingcontrolsandscriptingcode.

UserInterface

UIBASICS.XSNDemonstratesthewaysinwhichtheInfoPathuserinterfacecanbecustomizedinaform.Methodscoveredincludemenuitems,toolbars,customtaskpanes,andcustomdialogboxes.

Usingthedevelopersampleforms

ShowAll

AbouttheDataValidationdevelopersampleform

TheDataValidationdevelopersampleformdemonstratesthevarietyofwaysinwhichdatacanbevalidatedinMicrosoftOfficeInfoPath2003.Thissampleformisdividedintothreesections,eachdemonstratingoneofthethreemethodsofdatavalidation:schema-basedvalidation,customvalidation,andscript-basedvalidation.

Totestthefeaturesofthesampleform,simplychooseanyfieldandenterdatathatdoesnotcomplywiththevalidationconstraintthatisassociatedwithit.Thevalidationconstraintscanbeviewedbyrestingthemousepointeroverthequestionmarkiconnexttoeachfield.Whenyoumovethecursoroutofthefield,youreceiveoneoftwopossibleerrorindications:aninlinealertoradialogboxalert.

NoteToseeallofthefilesthatmakeuptheDataValidationdevelopersampleform,opentheformandclickExtractFormFilesontheFilemenuwhileindesignmode.Thisextractsalloftheformfilesfromtheformtemplatefileandsavesthemtoaspecifiedfolderonyourharddisk.

TolearnhoweachofthedatavalidationmethodsisimplementedintheDataValidationdevelopersampleform,seethefollowingtopics:

Schema-basedvalidationintheDataValidationdevelopersampleform

CustomvalidationintheDataValidationdevelopersampleform

Script-basedvalidationintheDataValidationdevelopersampleform

ShowAll

Schema-basedvalidationintheDataValidationdevelopersampleform

Schema-baseddatavalidationinMicrosoftOfficeInfoPath2003isdeterminedbytheXMLSchemaassociatedwithaform.Schema-basedvalidationoccursbydefaultwheneverauserfillsoutaform.Aftertheuserentersdataintoafieldandmovesoutofthatfield,thedataisimmediatelycheckedagainsttheXMLSchema.

IntheDataValidationdevelopersampleform,schema-basedvalidationisusedtoverifythatanumberfallswithinacertainrange,verifythetypeofdatainafield,verifythatafieldcontainsdata,andlimitthenumberofrowsthatcanbeaddedtoatable.

NoteInfoPathsupportsthecreationofonlydatatypeandrequiredfieldconstraintsinXMLSchemasindesignmode.However,theuseofotherkindsofconstraintsintheschemaissupported.Tocreateotherkindsofschema-basedvalidation,youmustedityourXMLSchemafilesusingMicrosoftNotepadorsomeothertexteditor.

Rangecheckinganddata-typevalidationintheschema

Requiredfieldsintheschema

Structuralvalidationintheschema

ShowAll

CustomvalidationintheDataValidationdevelopersampleform

Custom(ordeclarative)validationinMicrosoftOfficeInfoPath2003isusedtocheckforrequiredfields,verifyarangeofvalues,andensuretheaccuracyofafield.YoucanusetheDataValidationdialogboxtocreatecomplexvalidationconstraintsthatperformcalculationsandvalidatethedatainotherfields.Validationerrorscanbedisplayedasinlinealertsordialogboxalerts.Ineithercase,youcanwriteerrormessagesthattelltheuserhowtofixtheinvalidentry.Aswithschema-basedvalidation,customvalidationconstraintsareattachedtofieldsintheform,andthevalidationisinvokedwhenauserchangesthedatainafield.

NoteTheDataValidationdialogboxisavailableviathePropertiesdialogboxforeachoftheOfficeInfoPath2003controls.

WhenyoucreateacustomdatavalidationconstraintintheDataValidationdialogbox,OfficeInfoPath2003createsanerrorConditionelementwithinthecustomValidationsectionoftheformdefinition(.xsf)file.Thefollowingisanexampleofthevalidationconstraintscreatedinthe.xsffileforthecostfieldintheDataValidationdevelopersampleform:

<xsf:customValidation><xsf:errorConditionmatch="/sampleData/travelExpenses/expense/cost"expressionContext="."expression=".&lt;0or.&gt;500"><xsf:errorMessagetype="modeless"shortMessage="Thecostoftheitemmustbemorethan$0.00andcannotgoover$500.00.">Thecostoftheitemmustbemorethan$0.00andcannotgoover$500.00.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

ThematchattributeoftheerrorConditionelementspecifiestheXPathexpressionthatisusedtobindthecustomdatavalidationconstrainttothefield,andtheexpressionattributeisusedtospecifytheconstraint.

TheerrorMessageelementisnestedwithintheerrorConditionelementandisusedtospecifytheerrormessagethatappearswhenthevalueoftheassociatedfieldviolatestheconstraint.TheshortMessageattributeequatestotheScreenTipfieldintheDataValidationdialogbox,andthevalueoftheerrorMessageelementequatestotheMessagefieldintheDataValidationdialogbox.Thetypeattributeisusedtospecifyerrortype.

ShowAll

Script-basedvalidationintheDataValidationdevelopersampleform

Script-basedvalidationisspecifiedinthebusinesslogicscriptfileassociatedwithaMicrosoftOfficeInfoPath2003form,anditprovidesmoreflexibilitythancustomvalidationorschema-basedvalidation.Usingscript-basedvalidation,youcanspecifywhenafieldshouldbevalidated(forexample,whentheuserfirsttypesdataintoafield,aftertheuserleavesafield,orafterdataisvalidatedbytheschema).Youcanalsowritescriptthatrunswhenaformisopenedorwhentheuserswitchesviews.Thescriptyouwritecanperformavarietyoffunctions,includingcomparingfields,calculatingvalues,showingerrormessages,updatingvalues,andrevisingotherfields.

NoteInfoPathsupportswritingscriptinMicrosoftVBScriptandMicrosoftJScript.However,youcannotmixthescriptinglanguagesusedwithinasingleform.

Tocreatescript-baseddatavalidation,youuseInfoPathdesignmodetocreateaneventhandler(alsocalledaneventfunction),andthenyouwritescriptingcodefortheeventhandlerusingtheMicrosoftScriptEditor(MSE).Foreacheventhandlerthatyoucreate,InfoPathplacesanentryintheformdefinition(.xsf)filethatcontainsthenameoftheeventhandlerandtheXMLDocumentObjectModel(DOM)nodethattheeventhandlerisassociatedwith.

Becausetheeventhandlerisreferencedinthe.xsffile,youcannotcreateaneweventhandlerentirelyfromwithinMSE—youmustinitiallycreatetheeventhandlerinInfoPathdesignmode.SinceInfoPathisusedtocreatethedeclarationoftheeventhandler,youcannotmodifytheeventhandlernameoritsargumentsonceithasbeencreated.

Eventhandlersintheformdefinitionfile

Script-basedeventhandlersandfunctions

UsingtheDataDOMEventobject

ShowAll

AbouttheEventsdevelopersampleform

TheEventsdevelopersampleformdemonstratessomeoftheeventsthatmaybeusedinaMicrosoftOfficeInfoPath2003form.InInfoPath,eventsareusedtoimplementclient-sidebusinesslogic,whichmayincludedatavalidation,controllingthebehaviorofaform,respondingtotheactionsofcontrolsonaform,orsubmittingaform.

TheEventsdevelopersampleformisbasedonthescenarioofacustomercontactsystem.Itcontainsthreeviewsthatareusedtomanagecustomerinformation:

NewCustomerViewUsedtoenternewcustomerinformation.Customerinformationmustbeenteredinthisviewbeforetheotherviewscanbeused.

ContactCustomerViewUsedtosetthedatesonwhichthecustomershouldbecontactedandtorecordthatthecustomerhasbeencontacted.

ArchiveCustomerViewUsedtoshowcustomerinformation,recordnotesaboutthecustomer,andrecordthatthecustomerrecordhasbeenarchived.

Totestthefeaturesofthesampleform,entercustomerinformationinNewCustomerview,andthenclickSwitchToContactCustomerViewtoswitchviews.AfterenteringcustomercontactinformationinContactCustomerview,youcanclickSwitchToArchiveCustomerViewtoswitchtothelistofarchivedcustomercontactinformation.

NoteToseeallofthefilesthatmakeuptheEventsdevelopersampleform,opentheformandclickExtractFormFilesontheFilemenuwhileindesignmode.Thisextractsalloftheformfilesfromtheformtemplatefileandsavesthemtoaspecifiedfolderonyourharddisk.

TolearnhoweacheventisimplementedintheEventsdevelopersampleform,seethefollowingtopics:

FormeventsintheEventsdevelopersampleform

DatavalidationeventsintheEventsdevelopersampleform

ControleventsintheEventsdevelopersampleform

ShowAll

FormeventsintheEventsdevelopersampleform

TheEventsdevelopersampleformimplementsavarietyofMicrosoftOfficeInfoPath2003formeventsthatcanbeusedtorespondtospecificactivitiesthatoccurwhenaformisopenedandwhileitisbeingfilledout.Formeventscanoccurwhenaform'sversionnumberisvalidated,whenaformisopened,whenaformviewischanged,andafteraformhasbeenmergedwithanotherform.

ThefollowingtablelistseachoftheformeventsimplementedintheEventsdevelopersampleform,alongwithadescriptionofhowtheyareused.

Event DescriptionOnVersionUpgradeUsedtoverifythattheversionnumberoftheform

beingopenedmatchestheversionnumberoftheformwhenitwasoriginallydesigned.Iftheversionnumbersdonotmatch,thiseventoccursandscriptingcodecanbeusedtoupdatetheformordisplayanerrormessage.

OnLoad Usedtoinitializetheformasitisbeingopened.Whenthiseventoccurs,scriptingcodecanbeusedtosettheappropriateviewbasedondatacontainedintheform.

OnSwitchView Usedwhenchangingfromoneviewtoanother.Thiseventoccurswhenauserchangesviews,andscriptingcodecanbeusedtoinsertdataintotheform.

OnAfterImport Usedtoprovideadditionalprocessingafteraformhasbeenmergedwithanotherform.Thiseventoccursafterdataisimportedfromanotherform,andscriptingcodecanbeusedtosettheappropriateviewbasedonthemergeddatacontainedintheform.

NoteTheOnSubmitRequesteventisalsoaformevent,butitwasnotusedintheEventsdevelopersampleform.

UsingtheOnVersionUpgradeevent

UsingtheOnLoadevent

UsingtheOnSwitchViewevent

UsingtheOnAfterImportevent

ShowAll

DatavalidationeventsintheEventsdevelopersampleform

TheEventsdevelopersampleformimplementsavarietyofMicrosoftOfficeInfoPath2003datavalidationeventsthatcanbeusedtovalidatedatathatisenteredintoaform.Datavalidationeventscanoccurafterachangehasbeenmadetoafieldorgroup,afterachangehasbeenmadetoafieldorgroupbutbeforethedataiscommitted,andafterachangehasbeenmadetoafieldorgroupandafterthedataiscommitted.

Touseoneofthedatavalidationevents,youmustfirstcreatetheeventintheFieldorGroupPropertiesdialogboxthatisavailablefromtheDataSourcetaskpane.Toaccessthisdialogbox,right-clickoneofthefieldsorgroupsinthetaskpane,andthenclickProperties.OntheValidationandScripttab,selecttheeventyouwishtocreate,andthenclickEdit;thisopensMicrosoftScriptEditor(MSE)anddisplaystheInfoPath-generatedeventhandler.

NoteEventhandlersinInfoPathmustbecreatedindesignmode.

ThefollowingtablelistseachofthedatavalidationeventsimplementedintheEventsdevelopersampleform,alongwithadescriptionofhowtheyareused.

Event DescriptionOnValidate Usedtovalidatethedatacontainedinthe

ContactDatesgroup.Whenthiseventoccurs,scriptingcodeisusedtoverifythatthedatesusedarewithinaspecifiedrange.

OnBeforeChange UsedtovalidatethedatacontainedintheEmailCampaignStart,PhoneContactStart,andRepresentativeVisitdatefields.Whenthiseventoccurs,scriptingcodeisusedtoimplementbusinesslogicthatchecksfortheexistenceofcertaindatesbeforeotherscanbeenteredorremoved.

OnAfterChange UsedtocallafunctionthatcalculatesthetotalcampaigncostsandupdatestheCampaignCost

field.

UsingtheOnValidateevent

UsingtheOnBeforeChangeevent

UsingtheOnAfterChangeevent

ShowAll

ControleventsintheEventsdevelopersampleform

TheEventsdevelopersampleformimplementsasingleMicrosoftOfficeInfoPath2003controleventthatcanrespondtoabuttonclick;thisistheOnClickevent.TheOnClickeventoccursafterauserclicksabuttononaform.

NoteTheOnClickeventistheonlycontroleventsupportedbyInfoPath.

TousetheOnClickevent,youmustfirstcreatetheeventintheButtonPropertiesdialogboxthatisavailableontheshortcutmenuforthebuttoncontrol.OntheGeneraltab,setScriptastheAction,andthenclickMicrosoftScriptEditor.ThiswillopenMicrosoftScriptEditor(MSE)anddisplaytheInfoPath-generatedeventhandler.

NoteEventhandlersinInfoPathmustbecreatedindesignmode.

IntheEventsdevelopersampleform,theOnClickeventisimplementedforthethreebuttonsthatareusedtoswitchbetweenviews.ThefollowingexamplefromtheEventsdevelopersampleformshowstheOnClickeventhandlerfortheSwitchtoNewCustomerViewbutton:

functionbtnSwitchNew::OnClick(eventObj){XDocument.View.SwitchView("NewCustomer")}

NoteThenameofthebuttonusedintheeventhandlerdeclarationisdeterminedbythevaluesetfortheScriptIDboxintheButtonPropertiesdialogbox.

ShowAll

AbouttheStructuralEditingdevelopersampleform

TheStructuralEditingdevelopersampleformdemonstratessomeofthewaysinwhichtheunderlyingXMLdocumentofaMicrosoftOfficeInfoPath2003formmaybeeditedusingacombinationofcontrols,menuitems,toolbarbuttons,andscript.WhenfillingoutaforminInfoPath,usersareessentiallyeditinganXMLdocumentinaneasy-to-use,graphicalformat.AlthoughtheStructuralEditingdevelopersampleformisprimarilyintendedtodemonstratestructuralediting,itisusedtoillustratetwotypesofeditingthatcanoccurinaform:

FieldeditingEditingthatmodifiesthetextinafield(anelementorattributeintheform'sunderlyingXMLdocument).Forexample,enteringdatadirectlyintoatextboxcontrolchangestheunderlyingdataintheelementorattributethatthecontrolisboundto.

StructuraleditingEditingthatchangesthestructureoftheform'sunderlyingXMLdocument.StructuraleditingallowsfragmentsofXML(elementsandtheirassociatedchildelements,attributes,andcontent)tobeinserted,removed,orreplacedinasingleoperation.Forexample,addingitemstoarepeatingsection,repeatingtable,orlistcontrolcreatesnewelementsandattributeswithinthepartoftheXMLdocumentthatthecontrolisboundto.

BothfieldeditingandstructuraleditingareusuallyimplementedbyusingcontrolsthatconnectaformtoanunderlyingXMLdocument,allowinguserstoenterormodifythedatathattheXMLdocumentcontains.However,youmayalsoimplementfieldorstructuraleditingbyusingscriptingcodeinconjunctionwiththeInfoPathobjectmodel.

Inadditiontofieldandstructuralediting,InfoPathprovidestheconceptofeditingcontext,whichmeansthateditingactionscanbedependentonthecurrentselectionorinsertionpoint.Forexample,theAddPartBeforeCurrentbuttononthePartToolbarcustomtoolbaroftheStructuralEditingdevelopersampleforminsertsanewrowinthePartstableatapositionbasedonthecurrentcontext.Thebuttonisenabledonlyifthecurrentselectionisonorwithinoneoftherowsinthetable.

Totestthefeaturesofthesampleform,simplytypedatadirectlyintothefieldsontheform,orusetheInsertmenu,thePartCatalogcustomtask

pane,theshortcutmenu,orthePartToolbarcustomtoolbartoinsertorremoverowsinthePartstable.

NoteToseeallofthefilesthatmakeuptheStructuralEditingdevelopersampleform,opentheformandclickExtractFormFilesontheFilemenuwhileindesignmode.Thisextractsalloftheformfilesfromtheformtemplatefileandsavesthemtoaspecifiedfolderonyourharddisk.

TolearnhoweditingfeaturesareimplementedintheStructuralEditingdevelopersampleform,seethefollowingtopics:

FieldeditingintheStructuralEditingdevelopersampleform

StructuraleditingintheStructuralEditingdevelopersampleform

EditingcontextintheStructuralEditingdevelopersampleform

ShowAll

FieldeditingintheStructuralEditingdevelopersampleform

FieldeditinginaMicrosoftOfficeInfoPath2003formoccurswhendataisentereddirectlyintoaformfield(usuallyatextboxcontrol)asauserfillsoutaform.ThedatathatisenteredisstoredasavalueoftheelementorattributeoftheXMLfield(elementorattribute)intheunderlyingXMLdocumentthatthecontrolisboundto.Forexample,intheStructuralEditingdevelopersampleform,textboxesareusedforeditingthedatacontainedinthePartNumber,Description,Quantity,andUnitPricefields.

Fieldeditingusuallyoccurswhenauserentersdatawithinacontrolonaform;thedatathattheuserentersisstoredintheform'sunderlyingXMLdocument.However,youcanalsousescriptingcodetomanipulatethedatacontainedintheform'sunderlyingXMLdocumentbymodifyingtheXMLdocumentitself.Iftheformincludesacontrolsuchasatextboxthatisboundtothemodifieddata,thedatadisplayedintheformwillbeupdatedautomatically.

Usingcontrolsforfieldediting

Usingscriptforfieldediting

ShowAll

StructuraleditingintheStructuralEditingdevelopersampleform

StructuraleditinginaMicrosoftOfficeInfoPath2003formoccurswhenauserisfillingoutaform,andthetypeofeditingactionsthattheuserperformsresultsinastructuralchangetotheform'sunderlyingXMLdocument.StructuralchangesinvolveinsertingorremovingelementsandattributesintheunderlyingXMLdocumentthattheformisboundto.Forexample,intheStructuralEditingdevelopersampleform,structuralchangesaremadewhenauserinsertsorremovesitemsfromthePartstableortheNotesbulletedlist.

StructuraleditingcontrolshavepredeterminededitingactionsthatcanbeassociatedwithtoolbarbuttonsandmenuitemsinInfoPathuserinterfaceareas.TheCommandsdialogboxthatisavailablefromastructuraleditingcontrol'sPropertiesdialogboxallowsyoutochoosewhicheditingactionsofthecontrolareavailabletousers,whichuserinterfaceareatheyappearin,andthelabelsthatareusedfortheassociatedbuttonormenuitems.Thestructuraleditingcontrolsusedinthissampleformincludearepeatingtableandabulletedlist.

StructuraleditingcanbeimplementedbyusinganInfoPathstructuraleditingcontrol,orbyusingscriptingcodetodirectlymanipulatethedatacontainedintheform'sunderlyingXMLdocument.Iftheformincludesacontrolsuchasarepeatingsectionthatisboundtothemodified(insertedordeleted)data,thedatadisplayedintheformwillbeupdatedautomatically.

Usingcontrolsforstructuralediting

Usingscriptforstructuralediting

ShowAll

EditingcontextintheStructuralEditingdevelopersampleform

EditingcontextinaMicrosoftOfficeInfoPath2003formisthedependenceofeditingactionsonthecurrentselectionorinsertionpoint.Forexample,ifarowintheStructuralEditingdevelopersampleformPartstableisselected,thebuttonsforaddingorremovingpartsonthePartToolbarcustomtoolbarareenabledandwillinsertorremoverowsinthePartstableatapositionbasedonthecurrentcontext.Ifcurrentselectionisnotonorwithinoneoftherowsinthetable,thebuttonsaredisabled.

NoteThePartToolbarcustomtoolbarwascreatedbymodifyingthedefaultFormtoolbar.

ThefollowingaresomeoftheareasintheInfoPathuserinterfaceinwhicheditingcontextisapplicable:

InsertmenuMenuitemsavailableontheInsertmenu.Thesetypicallyincludemenuitemsforinsertingitemsinatableorsection.

ShortcutmenuMenuitemsavailableontheshortcutmenu.Thesetypicallyincludemenuitemsforinsertingorremovingitemsinatable,section,orlist.

TablemenuMenuitemsavailableontheTablemenu.Thesetypicallyincludemenuitemsforinsertingorremovingitemsinatable.

CustomtoolbarButtonsandmenuitemsavailableonacustomtoolbar.Thesetypicallyincludebuttonsormenuitemsforinsertingorremovingitemsinatableorsection,orbuttonsthatcallscriptingcode.

IntheStructuralEditingdevelopersampleform,arepeatingtablecontrolisusedtoimplementatablethatallowsuserstoeditalistofpartsinaninvoice.WhenauserchoosestoeditthetableusingtheInsertmenu,thePartToolbarcustomtoolbar,ortheshortcutmenu,InfoPathdeterminesthecontrolbeingused,andbasedontheeditingactionssetindesignmodeforthatcontrol,performstheappropriateeditingofthesourceXMLdocument.

Thestructuraleditingcontrolshavepredeterminededitingactionsthat

canbeassociatedwithtoolbarbuttonsandmenuitemsinInfoPathuserinterfaceareas.TheCommandsdialogboxthatisavailablefromastructuraleditingcontrol'sPropertiesdialogboxallowsyoutochoosewhicheditingactionsofthecontrolareavailabletousers,whichuserinterfaceareatheyappearin,andthelabelsthatareusedfortheassociatedbuttonsormenuitems.InthePartstableoftheStructuralEditingdevelopersampleform,thefollowingeditingactionsareenabled:

InsertEnabledontheInsertmenu.AllowsausertoinsertanewrowinthePartstable.

InsertAboveEnabledontheshortcutmenuandthePartToolbarcustomtoolbar.AllowsausertoinsertanewrowinthePartstablethatisabovethecurrentlyselectedrow.

InsertBelowEnabledontheshortcutmenuandthePartToolbarcustomtoolbar.AllowsausertoinsertanewrowinthePartstablethatisbelowthecurrentlyselectedrow.

RemoveEnabledontheshortcutmenuandthePartToolbarcustomtoolbar.Allowsausertoremovethecurrentlyselectedrow.

NoteOthereditingactionscanbeusedinarepeatingtablecontrolthatarenotimplementedintheStructuralEditingdevelopersampleform.

ShowAll

AbouttheUserInterfacedevelopersampleform

TheUserInterfacedevelopersampleformdemonstratesthevarietyofwaysinwhichtheuserinterfacecanbecustomizedinaMicrosoftOfficeInfoPath2003form.Theuserinterfacefeaturescustomizedinthissampleformincludemenuitemsonthemenubar,shortcutmenus,toolbarbuttonsontheFormtoolbar,andacustomtaskpane.

Totestthefeaturesofthesampleform,simplyadd,modify,orremoveCDsbyusingtheInsertmenu,theCDCollectionToolbar,ortheshortcutmenubuttonswhilefillingouttheform.YoucanswitchbetweenCDCollectionandAllTracksviewsbyusingtheViewmenuorthecustomtaskpane.

NoteToseeallofthefilesthatmakeuptheUserInterfacedevelopersampleform,opentheformandclickExtractFormFilesontheFilemenuwhileindesignmode.Thisextractsalloftheformfilesfromtheformtemplatefileandsavesthemtoaspecifiedfolderonyourharddisk.

TolearnhoweachoftheuserinterfacefeaturesisimplementedintheUserInterfacedevelopersampleform,seethefollowingtopics:

CustommenusintheUserInterfacedevelopersampleform

CustomtoolbarsintheUserInterfacedevelopersampleform

CustomtaskpanesintheUserInterfacedevelopersampleform

ShowAll

CustommenusintheUserInterfacedevelopersampleform

MicrosoftOfficeInfoPath2003providestheabilitytocontrolwhereandhowyouwantmenuitemstoappearwithintheuserinterface,primarilybyenablingordisablingthemonvariousbuilt-inmenususedwithaform.SomeofthemenusthatyoucancustomizeincludeView,Insert,andTable,aswellasshortcutmenusthataredisplayedwhenauserclickstheshortcutmenubuttonassociatedwithacertainrepeatingtable,repeatingsection,oroptionalsection.Menuscanbecustomizedforrepeatingtables,repeatingsections,optionalsections,andviews.

NoteManyoftheotherstandardInfoPathmenuscanalsobecustomized;theUserInterfacedevelopersampleformdemonstrateshowtocustomizeaselectfew.

SeveralcustommenusareimplementedintheUserInterfacedevelopersampleform.Thefollowingtableliststheviews,tables,andsectionsoftheUserInterfacedevelopersampleform,alongwiththecustommenuitemsthatwereimplementedforeachofthem.

Name Type CustommenuitemsCDCollection

View CDCollectionmenuitemontheViewmenu.

AllTracks View AllTracksmenuitemontheViewmenu.CD Repeating

sectionCDmenuitemontheSectionsubmenuoftheInsertmenu.

InsertCDabove,InsertCDbelow,andRemoveCDmenuitemsontheshortcutmenufortheCDtable.

Track Repeatingtable

TrackmenuitemontheSectionsubmenuoftheInsertmenu.

InsertTrackmenuitemontheshortcutmenufortheCDtable.

InsertTracksandRemoveTracksmenuitemson

theTablemenu.

InsertTrackabove,InsertTrackbelow,andRemoveTrackmenuitemsontheshortcutmenufortheTracktable.

Label Optionalsection

LabelmenuitemontheSectionsubmenuoftheInsertmenu.

InsertLabelmenuitemontheshortcutmenufortheCDtable.

RemoveLabelmenuitemontheshortcutmenufortheLabelcontrol.

NoteWhenyoucustomizemenusinInfoPath,thosecustomizationsareappliedattheviewlevel.Thismeansthatthecustomizationsyoumakearenotgloballyappliedtoallviews.Toapplythesamecustommenustomorethanoneview,youmustmakethemenucustomizationsineachview.

CustomizingtheViewmenu

CustomizingtheInsertmenu

CustomizingtheTablemenu

Customizingshortcutmenus

ShowAll

CustomtoolbarsintheUserInterfacedevelopersampleform

TheUserInterfacedevelopersampleformimplementsasinglecustomtoolbar,theCDCollectionToolbar,thatallowsuserstoaddorremoveaCD,Track,orLabel.Bydefault,MicrosoftOfficeInfoPath2003hasonebuilt-incustomtoolbar,theFormtoolbar,thatcanbeusedtocreatecustommenuitemsthatuserscanclicktoperformvariousactionsonaform.

TocustomizetheFormtoolbarindesignmode,youusethePropertiesdialogboxfortheparticularrepeatingsection,repeatingtable,oroptionalsectionthatyouareworkingwith.ThePropertiesdialogboxisaccessedbyright-clickingthesectionortableandclickingthePropertiesmenuitemontheshortcutmenu.InthePropertiesdialogboxforrepeatingtablesandoptionalsections,youclickCustomizeCommandstoopentheCommandsdialogbox.Forrepeatingsections,theCustomizeCommandbuttonisavailableintheSectionPropertiesdialogboxthatopenswhenyouchoosetomodifythedefaultsettingsofasection.TheCommandsdialogboxallowsyoutoassociatecertaineditingactionswithvariouscommandlocationsavailableonthemenusandtoolbarsinanInfoPathform.Tocreateacustomtoolbar,youselecttheFormToolbarlocation.

NoteIntheUserInterfacedevelopersampleform,thecommandlocationistheCDCollectionToolbar,sincethedefaultnameoftheFormtoolbarwasmodified.Modificationstothedefaultnameofatoolbarcanbemademanuallyintheformdefinition(.xsf)filebychangingthevalueofthecaptionattributeofthetoolbarelement.

Whenyoucustomizeatoolbar,InfoPathcreatesentriesinthe.xsffileusingbuttonelementswithinthetoolbarelement.Thecaptionthatappearsasthenameofthetoolbarisdeterminedbythecaptionattributeofthetoolbarelement,andthecaptionthatappearsasthenameofabuttononthetoolbarisdeterminedbythecaptionattributeofabuttonelement.

AsyouassociateeditingactionswiththecustomtoolbarusingtheCommandsdialogbox,menuitemsareplaceddirectlyonthetoolbar.

However,itispossibletocreatemenusonthetoolbarandthenaddmenuitemstothosemenus.Thisisaccomplishedbynestingthebuttonelementsofthetoolbarwithinamenuelementinthe.xsffile.

Thefollowingisasectionfromthe.xsffileoftheUserInterfacedevelopersampleformthatcontainsthetoolbarelement.Notetheuseofthemenuelementtocreateamenuonthetoolbar.

<xsf:toolbarcaption="CDCollectionToolbar"name="CDCollectionToolbar"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="NewCD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="NewTrack"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="NewLabel"showIf="always"></xsf:button><xsf:menucaption="Remove"><xsf:buttonaction="xCollection::remove"xmlToEdit="CD_10"caption="CD"

showIf="always"></xsf:button><xsf:buttonaction="xCollection::remove"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::remove"xmlToEdit="Label_16"caption="Label"showIf="always"></xsf:button></xsf:menu></xsf:toolbar>

Notes

Addingmenustoatoolbarisafeatureofthe.xsffileandisnotavailablewhenusingtheCommandsdialogboxindesignmode.

WhileInfoPathimplementsasinglecustomtoolbar,youcanaddmultipletoolbarstoaformbycreatingadditionaltoolbarelementswithinthe.xsffile.Onceyouhavecreatedtheadditionaltoolbarsbymanuallyeditingthe.xsffile,thosetoolbarsareavailableintheCommandsdialogbox,andyoucanthenassociateeditingactionswiththem.

ShowAll

CustomtaskpanesintheUserInterfacedevelopersampleform

TheUserInterfacedevelopersampleformimplementsacustomtaskpanethatisusedtoswitchviewsandperformothergeneral-purposeoperations,suchassortingthelistofCDs.Customtaskpanesare.htmlfilesthataredisplayedintheMicrosoftOfficeInfoPath2003taskpaneasauserfillsoutaform.Therecanbeonlyonecustomtaskpaneassociatedwithaform.

Tocreateacustomtaskpane,youmustfirstcreatean.htmlfilebyusinganHTMLeditorsuchasMicrosoftFrontPage.Youassociatethis.htmlfilewithaformbyusingtheAdvancedtabintheFormOptionsdialogboxthatisavailableontheToolsmenuindesignmode.TheAdvancedtaballowsyoutoaddthe.htmlfileandanyothersupportingfiles,suchasacascadingstylesheet(.cssfile),usingtheResourceManager.(TheResourceManagercanalsobeaccessedbyclickingResourceManagerontheToolsmenuindesignmode.)Afterthe.htmlfilehasbeenaddedasaresource,youcanselecttheEnablecustomtaskpanecheckboxandsetthenameandlocationofyourcustomtaskpane.

NoteYoumustaddthe.htmlfiletotheformusingtheResourceManagerbeforeyoucanmakethefileacustomtaskpane.

Whenyouaddacustomtaskpanetoaform,InfoPathcreatesentriesintheformdefinition(.xsf)fileusingthetaskpaneelement.Thecaptionattributeofthetaskpaneelementisusedtostorethenameofthecustomtaskpane,whilethehrefattributeisusedtostorethe.htmlfilename.Thefollowingisasectionfromthe.xsffileoftheUserInterfacedevelopersampleformthatcontainsthetaskpaneelement:

<xsf:taskpanecaption="CustomTaskPane"href="taskpane.htm"></xsf:taskpane>

InadditiontousingstandardHTMLmarkup,youcanalsousescriptingcodewithinthetaskpanethatcallstheInfoPathobjectmodel.Inthe

UserInterfacedevelopersampleform,theExtensionpropertyoftheXDocumentobjectisusedtogainaccesstothebusinesslogicfunctionscontainedintheform'sprimaryscriptfile.

Thefollowingisasectionfromthe.htmlfileusedasthecustomtaskpaneintheUserInterfacedevelopersampleform.ThecalltotheInfoPathobjectmodel'sExtensionpropertyisusedintheonClickeventfortheSortCDshyperlink.Whentheuserclicksthislink,theSortfunctionwithintheform'sprimaryscriptfileiscalled.TheSortfunctionthentakesthesourceXMLdocumentfortheformandsortsthecollectionofCDsalphabeticallyaccordingtoartistandtrack.

<divclass="action"><ahref=""onClick="gobjXDocument.Extension.Sort();returnfalse;">SortCDsbyartist/title</a></div>

NoteToviewthebusinesslogicfunctionsfortheUserInterfacedevelopersampleform,youcanopenMicrosoftScriptEditor(MSE)inInfoPathdesignmodebyclickingtheToolsmenu,pointingtoScript,andclickingMicrosoftScriptEditor,orbypressingALT+SHIFT+F11.

InfoPathObjectModelDiagram

Application ActiveWindowWindowsWindowCommandBarsMailEnvelopeTaskPanesTaskPaneHTMLDocumentHTMLWindowWindowXDocument

XDocumentUserXDocumentsXDocumentDataObjectsDataObjectDOMQueryAdapterADOAdapterWebServiceAdapterXMLFileAdapter

DataAdaptersDAVAdapterEmailAdapterHWSAdapterSharePointListAdapter

Legend

Automationobject

ExternalApplication

Eventobjects

DataDOMEvent

DocActionEvent

DocContextChangeEvent

DocEvent

DocReturnEvent

MergeEvent

SaveEvent

SignEvent

VersionUpgradeEvent

General-purposecollection

XMLNodes

WebServiceAdapterDOMErrorsError

ExtensionQueryAdapter

ADOAdapterWebServiceAdapterXMLFileAdapter

SignedDataBlocksSignedDataBlockSignaturesSignatureCertificate

SolutionDOM

UIUtil

DateMath

ViewWindow

ViewInfosViewInfo

DataAdaptersCollection

ContainsadataadapterobjectcorrespondingtoeachdataconnectionusedwithinaMicrosoftOfficeInfoPath2003form.

RemarksEachdataconnectionisusedtoretrievedata(insertedintothemaindatasourceorintoasecondarydatasource)ortosubmitdata.

Adataconnectionusedtoretrievedataforthemaindatasourcewillcorrespondtooneofthefollowingdataadapterobjecttypes:

WebServiceAdapter

ADOAdapter

NoteAnAdoAdapterobjectusedtoretrievedataforthemaindatasourcecanalsosubmitdata.

Adataconnectionusedtoretrievedataforasecondarydatasourcewillcorrespondtooneofthefollowingdataadapterobjecttypes:

ADOAdapter

SharepointListAdapter

WebServiceAdapter

XMLFileAdapter

Adataconnectionusedonlyforsubmittingdatawillcorrespondtooneofthefollowingdataadapterobjecttypes:

EmailAdapter

DAVAdapter

HWSAdapter

WebServiceAdapter

TheDataAdapterscollectioncanbeaccessedusingtheDataAdapterspropertyoftheXDocumentobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003Service

Pack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

DataObjectsCollection

DataObjects DataObject

ContainsaDataObjectobjectforeachsecondarydatasourceusedwithinaMicrosoftOfficeInfoPath2003form.EachDataObjectobjectprovidesaccesstotheparticulardataadapterobjectthatwasusedtoconnecttotheexternaldatasource.

RemarksTheDataObjectscollectionimplementspropertiesthatcanbeusedtoaccessaform'sassociatedDataObjectobjects,anditisaccessiblethroughtheDataObjectspropertyoftheXDocumentobject.

NoteTheDataObjectscollectioncanbeusedonlytogetthecountofDataObjectobjectsthatitcontainsortoreturnareferencetoaspecifiedDataObjectobject.Itcannotbeusedtocreate,add,orremoveDataObjectobjects.

UsingtheDataObjectscollectionInthefollowingexample,implementedasanOnClickeventhandlerforabuttononaform,theDataObjectspropertyoftheXDocumentobjectisusedtosetareferencetotheDataObjectscollection.ThecodethenloopsthroughthecollectionanddisplaysthepositionalindexandnameofeachDataObjectobjectthatitcontains:

functionShowDataObjectNames::OnClick(eventObj){//SetareferencetotheDataObjectscollection.varobjDataObjects=XDocument.DataObjects;

//Loopthroughthecollectionanddisplaythename//ofeachDataObjectobjectthatitcontains.for(i=0;i<objDataObjects.Count;i++){XDocument.UI.Alert("Dataobject"+i+":"+objDataObjects(i).Name);}objDataObjects=null;}

FormoreinformationaboutusingtheDataObjectscollection,seeAccessingexternaldatasources.

ErrorsCollection

Errors Error

ContainsanErrorobjectforeacherrorwithinaMicrosoftOfficeInfoPath2003form.AnErrorobjectcontainsinformationaboutanInfoPatherror,includingitsdetailedmessage,shortmessage,code,type,andtheXMLnodethatisassociatedwithit.

RemarksTheErrorscollectionisafull-featuredcollection—itprovidespropertiesandmethodsforadding,deleting,andgainingaccesstotheErrorobjectsthatitcontains.

InadditiontomanagingtheerrorsgeneratedbyInfoPath,theErrorscollectioncanalsobeusedtocreatecustomerrorsusingtheAddmethod.

NoteCustomerrorscanalsobecreatedusingtheReportErrormethodoftheDataDOMEventobject.

UsingtheErrorscollectionTheErrorscollectionisaccessedthroughtheErrorspropertyoftheXDocumentobject.TheErrorscollectionisassociatedwithaform'sunderlyingXMLdocumentsothatwhenanerroroccurs,itoccurswithintheXMLdocument.

Inthefollowingexample,theCountpropertyoftheErrorscollectionisusedgetthecountoferrorscurrentlycontainedinthecollection:

XDocument.UI.Alert("Countoferrors:"+XDocument.Errors.Count);

TodeleteaspecificerrorfromtheErrorscollection,usetheDeletemethod,passingtheXMLcodeandconditionnameasarguments:

XDocument.Errors.Delete(myXMLNode,"MyErrorName");

TodeletealloftheerrorsintheErrorscollection,usetheDeleteAllmethod:

XDocument.Errors.DeleteAll();

TosetareferencetoanerrorwithintheErrorscollection,usetheItemproperty:

varobjError;

objError=XDocument.Errors.Item(0);//Or...objError=XDocument.Errors(0);

FormoreinformationaboutusingtheErrorscollection,seeHandlingerrors.

SignaturesCollection

ContainsacollectionofSignatureobjectsforeachsignatureintheMicrosoftOfficeInfoPath2003formorSignedDataBlockobject.

RemarksTheSignaturescollectionimplementspropertiesandamethodthatcanbeusedtoaccessaform'sassociatedSignatureobjectsandtocreateasignature.ItisaccessiblethroughtheSignedDataBlockobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheSignaturescollectionWhenusingtheCreatemethod,thesignatureisnotwrittenuntiltheSignmethodiscalledontheSignatureobject.ThesemethodscanbecalledonlyfromtheOnSigneventhandler.

ShowAll

SignedDataBlocksCollection

ThecollectionoftheSignedDataBlockobjectsintheformtemplateasdefinedintheformdefinitionfile(.xsf).

RemarksTheSignedDataBlockscollectionimplementspropertiesthatcanbeusedtoaccesstheSignedDataBlockobjectsassociatedwithaform.TheSignedDataBlockscollectionisaccessiblethroughtheSignedDataBlockspropertyoftheXDocumentobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

TaskPanesCollection

TaskPanes TaskPane

ContainsacollectionofTaskPaneobjectsthatrepresentthetaskpanesassociatedwithawindowinMicrosoftOfficeInfoPath2003.

RemarksTheTaskPanescollectionprovidespropertiesthatcanbeusedtoaccessacollectionoftaskpaneobjects,anditisaccessedthroughtheTaskPanespropertyoftheWindowobject.

NoteTheTaskPanescollectioncanbeusedonlytogetthecountofTaskPaneobjectsthatitcontainsandtoreturnareferencetoaspecifiedTaskPaneobject.ItcannotbeusedtoaddorremoveTaskPaneobjects.

UsingtheTaskPanescollectionInthefollowingexample,theTaskPanespropertyoftheWindowobjectisusedtosetareferencetotheTaskPanescollection:

varobjTaskPanes;

objTaskPanes=XDocument.View.Window.TaskPanes;

Inthefollowingexample,theItempropertyoftheTaskPanescollectionisusedtosetareferencetoaspecifiedTaskPaneobject.ThenthecodeusestheVisiblepropertyoftheTaskPaneobjecttomakethetaskpanevisible.

varobjTaskPane;

//Showthebuilt-inHelptaskpane.objTaskPane=XDocument.View.Window.TaskPanes(4);objTaskPane.Visible=true;

NoteTheItempropertyargumentisthetypeoftaskpanetoreturn,basedontheTypepropertyoftheTaskPaneobject,notthepositionoftheTaskPaneobjectintheTaskPanescollection.

ShowAll

ViewInfosCollection

ViewInfos ViewInfo

ContainsaViewInfoobjectforeachviewwithinaMicrosoftOfficeInfoPath2003form.ViewInfoobjectscontaindescriptiveinformationabouttheviewsthattheyareassociatedwith.

RemarksTheViewInfoscollectionimplementspropertiesthatcanbeusedtoaccessaform'sassociatedViewInfoobjects,anditisaccessiblethroughtheViewInfospropertyoftheXDocumentobject.

NoteTheViewInfoscollectioncanbeusedonlytogetthecountofViewInfoobjectsthatitcontainsortoreturnareferencetoaspecifiedViewInfoobject.Itcannotbeusedtocreate,add,orremoveViewInfoobjects.

UsingtheViewInfoscollectionInthefollowingexample,implementedasanOnClickeventhandlerforabuttononaform,theViewInfospropertyoftheXDocumentobjectisusedtosetareferencetotheViewInfoscollection.ThecodethenloopsthroughthecollectionanddisplaysthepositionalindexandnameofeachViewInfoobjectthatitcontains.

functionShowViewNames::OnClick(eventObj){//SetareferencetotheViewInfoscollection.varobjViewInfos=XDocument.ViewInfos;

//Loopthroughthecollectionanddisplaythename//ofeachViewInfoobjectthatitcontains.for(i=0;i<objViewInfos.Count;i++){XDocument.UI.Alert("Viewname"+i+":"+objViewInfos(i).Name);}objViewInfos=null;}

ShowAll

WindowsCollection

Windows Window

ContainsaWindowobjectforeachwindowwithinaMicrosoftOfficeInfoPath2003form.WindowobjectsrepresentthetwotypesofwindowsthatareusedintheInfoPathapplication:theeditingwindowthatisusedastheformareawhenauserfillsoutaform,andthedesigningwindowthatisusedasthedesignmodewhenauserdesignsaform.

RemarksTheWindowscollectionimplementspropertiesthatcanbeusedtoaccessaform'sassociatedWindowobjects,anditisaccessiblethroughtheWindowspropertyoftheXDocumentobject.

NoteTheWindowscollectioncanbeusedonlytogetthecountofWindowobjectsthatitcontainsortoreturnareferencetoaspecifiedWindowobject.Itcannotbeusedtocreate,add,orremoveWindowobjects.

UsingtheWindowscollectionInthefollowingexample,implementedasanOnClickeventhandlerforabuttononaform,theWindowspropertyoftheApplicationobjectisusedtosetareferencetotheWindowscollection.ThecodethenloopsthroughthecollectionanddisplaysthetypeofeachWindowobjectthatitcontains.

functionShowWindowTypes::OnClick(eventObj){//SetareferencetotheWindowscollection.varobjWindows=Application.Windows;varstrWindowType;

//Loopthroughthecollectionanddisplaythetype//ofeachWindowobjectthatitcontains.for(i=0;i<objWindows.Count;i++){switch(objWindows(i).Type){case0:strWindowType="Editingwindow";break;case1:strWindowType="Designingwindow";break;}

XDocument.UI.Alert("Windowtype"+i+":"+strWindowType);}objWindows=null;strWindowType=null;}

FormoreinformationaboutusingtheWindowscollection,seeWorkingwithformwindows.

XDocumentsCollection

XDocuments XDocument

ContainsanXDocumentobjectforeachMicrosoftOfficeInfoPath2003formthatiscurrentlyopen.TheXDocumentobjectrepresentsaform'sunderlyingXMLdocumentandcanbeusedtointeractwiththeXMLdatathataformcontains.

RemarksTheXDocumentscollectionimplementsanumberofpropertiesandmethodsthatcanbeusedtoaccessaform'sassociatedXDocumentobject,ortocreateandopentheformsthemselves.TheXDocumentscollectionisaccessedthroughtheXDocumentspropertyoftheApplicationobject.

UsingtheXDocumentscollectionInthefollowingexample,theOpenmethodoftheXDocumentscollectionisusedtoopenanexistingform:

Application.XDocuments.Open("C:\\MyForm.xml");

YoucanalsocreateanewformbasedonanexistingformusingtheNewmethod:

Application.XDocuments.New("C:\\MyForm.xml");

ToaccessanXDocumentobjectcontainedintheXDocumentscollection,youcanpassthepositionalindexorthelocationpathtotheItemmethod:

varobjXDoc;

objXDoc=Application.XDocuments(0);//or...objXDoc=Application.XDocuments("C:\\MyForm.xml");

FormoreinformationaboutusingtheXDocumentscollection,seeAccessingformdata.

ShowAll

XMLNodesCollection

XMLNodes

ContainsacollectionofXMLDocumentObjectModel(DOM)nodes.TheXMLNodescollectionisageneral-purposecollectionthatisusedbyanumberofMicrosoftOfficeInfoPath2003methods.

RemarksTheXMLNodescollectionprovidespropertiesthatcanbeusedtoaccessacollectionofXMLDOMnodes,anditisreturnedbyboththeGetSelectedNodesandGetContextNodesmethodsoftheViewobject.

AfteryouhavesetareferencetooneoftheXMLDOMnodeobjectsthattheXMLNodescollectioncontains,youcanuseanyofthepropertiesandmethodsthattheXMLDOMprovidesforinteractingwithanXMLnodeobject.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

UsingtheXMLNodescollectionInthefollowingexample,areferenceissettoacollectionofXMLDOMnodesreturnedbytheGetSelectedNodesmethodoftheViewobject.ThenthecodedisplaysthenameandsourceXMLofthefirstnodefoundinthecollectionusingamessagebox:

varobjXMLNodes;

objXMLNodes=XDocument.View.GetSelectedNodes();

if(objXMLNodes.Count>0){XDocument.UI.Alert(objXMLNodes(0).nodeName+"\n\n"+objXMLNodes(0).text);}

ShowAll

ADOAdapterObject

ADOAdapter

RepresentsaconnectiontoaMicrosoftActiveXDataObjects/OLEDBdatasource.TheADOAdapterobjectisatypeofMicrosoftOfficeInfoPath2003dataadapterthatcontainsalltheinformationnecessaryforretrievingandsubmittingdatatoanexternaldatasource.

RemarksForsecondarydatasources,theADOAdapterobjectprovidespropertiesthatcanbeusedtogetandsetinformationaboutthedataadapter'sconnectionstring,SQLcommandtext,andtimeoutvalue.ItalsoprovidesamethodforcreatinganSQLcommandtextfragmentbasedonaspecifiedXMLnode.

IfanADO/OLEDBdatasourceisusedastheprimarydatasourceforaform,theADOAdapterobjectisaccessiblethroughtheQueryAdapterpropertyoftheXDocumentobject.

NoteTheADOAdapterobjectislimitedtoworkonlywithMicrosoftSQLServerandMicrosoftAccessdatabases.

UsingtheADOAdapterobjectTheADOAdapterobjectisaccessiblethroughtheQueryAdapterpropertyoftheDataObjectobject,andDataObjectobjectsareaccessiblethroughtheDataObjectspropertyoftheXDocumentobject.

Inthefollowingexample,theTimeoutpropertyoftheADOAdapterobjectisusedtosetthetimeoutforaparticularqueryoperation,returningthetimeouttoitsoriginalvalueafterthequeryoperationiscomplete:

functionRunLongQuery(){

varobjADOAdapter;varintTimeout;//SetareferencetotheADOAdapterobject.objADOAdapter=XDocument.DataObjects("CityDropDownList").QueryAdapter;

//Savetheoriginaltimeoutvalue.intTimeout=objADOAdapter.Timeout;

//Setalongertimeoutvalueandthenrunthequery.objADOAdapter.Timeout=60;XDocument.DataObjects("CityDropDownList").Query();

//Restoretheoriginaltimeoutvalue.objADOAdapter.Timeout=intTimeout;objADOAdapter=null;intTimeout=null;}

FormoreinformationaboutusingtheADOAdapterobject,see

Accessingexternaldatasources.

ShowAll

ApplicationObject

Application

RepresentstheMicrosoftOfficeInfoPath2003application.TheApplicationobjectincludespropertiesandmethodsthatreturnreferencestothehigh-levelobjectsoftheInfoPathobjectmodel.Forexample,theXDocumentspropertyreturnsareferencetoacollectionofXDocumentobjects.

RemarksTheApplicationobjectisthetop-levelobjectintheInfoPathobjectmodel,anditprovidesanumberofpropertiesandmethodsthatcanbeusedtoaccesslower-levelcollectionsandobjectsintheobjectmodel,andtoperformavarietyofgeneralpurposefunctions.

UsingtheApplicationobjectTheApplicationobjectcanbeuseddirectlyinscriptingcodeasinthefollowingMicrosoftJScriptexample,whichusestheAlertmethodoftheUIobject,accessedthroughtheXDocumentobject,todisplayamessageboxthatindicatestheversionnumberofthecurrentinstanceofInfoPath:

XDocument.UI.Alert("Applicationversion:"+Application.Version);

NotethattheXDocumentpropertywasnotqualifiedwiththenameoftheApplicationobject.ThisisbecauseboththeApplicationobjectandtheXDocumentobjectareembeddeddirectlyintheInfoPathscriptengine,andthereforetheydonothavetobeexplicitlydeclared.However,theydoneedtobedeclaredwhenusedinanexpressionorargument,astheexampleabovedemonstrates.

NoteTheApplicationobjectcontainsthefollowingmethodsthatcanbeusedwithinInfoPath:

Method DescriptionFormatString FormatsthespecifiedstringorXMLnode

accordingtothespecifiedcategoryandoptionsparameters.

IsDestinationReachable ReturnsaBooleanvalueindicatingwhetherthespecifiedUniformResourceLocator(URL),universalnamingconvention(UNC)path,orIPaddressofthedestinationcomputercanbeconnectedtofromtheclientcomputer.

NewADODBConnection CreatesandreturnsareferencetoanemptyActiveXDataObjects(ADO)Connectionobject.

NewADODBRecordset CreatesandreturnsareferencetoanemptyActiveXDataObjects(ADO)Recordsetobject.

NoteTheApplicationobjectcontainsthefollowingmethodsthatcanbe

usedforexternalautomation:

Method DescriptionCacheSolution Examinestheformtemplateinthecacheand,if

necessary,updatesitfromthepublishedlocationoftheformtemplate.

Quit QuitstheMicrosoftOfficeInfoPath2003application.

RegisterSolution InstallsthespecifiedMicrosoftOfficeInfoPathformtemplate.

UnregisterSolutionUninstallsthespecifiedMicrosoftOfficeInfoPath2003formtemplate.

TheXDocumentscollectioncontainsthefollowingadditionalmethodsthatcanbeusedforexternalautomation:

Method DescriptionClose ClosesthespecifiedMicrosoftOffice

InfoPath2003form.New CreatesanewMicrosoftOfficeInfoPath

2003formbasedonthespecifiedform.NewFromSolution CreatesanewMicrosoftOfficeInfoPath

2003formbasedonthespecifiedformtemplate.

NewFromSolutionWithData CreatesanewMicrosoftOfficeInfoPath2003formusingthespecifiedXMLdataandformtemplate.

Open OpensthespecifiedMicrosoftOfficeInfoPath2003form.

AlthoughtheExternalApplicationobjectisdeprecatedinMicrosoftOfficeInfoPath2003ServicePack1,replacedwiththemethodsintheabovetables,ExternalApplicationmethodsarestillavailableforbackwardcompatibility.

FormoreinformationaboutusingtheApplicationobject,seeAccessingapplicationdata.

ButtonObject

TheButtonobjectistheMicrosoftOfficeInfoPath2003objectthatisusedtoimplementtheOnClickeventthatisassociatedwithabuttononanInfoPathform.Thisobjectcannotbeuseddirectlyincode.

ShowAll

CertificateObject

RepresentstheX.509digitalcertificatethathasbeenusedtocreateasignature.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheCertificateobjectUsetheCertificatepropertyoftheSignatureobjecttoreturnaCertificateobject.

TheCertificateobjectcontainsthefollowingproperties,whichcanbeusedtoreturninformationaboutadigitalcertificate:

Property DescriptionIssuedTo Returnstowhomthedigitalcertificateisissued.IssuedBy Returnstheissuerofthedigitalcertificate.ExpirationDateReturnstheexpirationdateofthedigitalcertificate.Status Returnsthestatusofthedigitalcertificate.

ShowAll

DataDOMObject

DataDOM

TheDataDOMobjectistheMicrosoftOfficeInfoPath2003objectthatisusedtoimplementthedatavalidationeventsthatareassociatedwiththeXDocumentobject.Thisobjectcannotbeuseddirectlyinscriptingcode.

ShowAll

DataDOMEventObject

DataDOMEvent

AneventobjectthatisusedduringMicrosoftOfficeInfoPath2003datavalidationevents.TheDataDOMEventobjectprovidesanumberofpropertiesandamethodthatcanbeusedwithinadatavalidationeventtoprogrammaticallyinteractwiththedatathatisbeingvalidatedandtoprovidearesponseifthedataisnotvalid.

RemarksTheDataDOMEventobjectispassedasaparametertotheOnBeforeChange,OnValidate,andOnAfterChangeevents.

NoteTheOnValidateeventcanoccurwithoutachangeintheform'sunderlyingXMLdocument.

TheDataDOMEventobjectisusedtogetinformationabouttheXMLDocumentObjectModel(DOM)nodethatisbeingchanged,anditalsoprovidesapropertyforgettingareferencetoaform'sunderlyingXMLdocument.Inaddition,itprovidespropertiesforhandlingthechangeindata,includingrejectingthechangeandcreatinganerrormessage.

NoteTheDataDOMEventobjectispassedasanargumenttooneofthedatavalidationeventhandlers.Itspropertiesandmethodareonlyavailableduringtheeventthatitispassedto.

UsingtheDataDOMEventobjectInthefollowingexamplefromtheDataValidationdevelopersampleform,theDataDOMEventobjectisusedtocheckthevalueofthenodeusingtheSiteproperty.Ifthedatavalidationfails,theReportErrormethodisusedtocreateacustomerror.

functionmsoxd__itemB_quantityListB::OnValidate(eventObj){if(parseInt(eventObj.Site.nodeTypedValue,10)>50)eventObj.ReportError(eventObj.Site,"Invalidquantity."+"Thetotalnumberofeachtypeofblockcannotexceed50.",false);

if(parseInt(eventObj.Site.nodeTypedValue,10)<0)eventObj.ReportError(eventObj.Site,"Invalidquantity."+"Thetotalnumberofeachtypeofblockcannotbelessthan0.",false);}

FormoreinformationaboutusingtheDataDOMEventobject,seeRespondingtoformevents.

ShowAll

DataObjectObject

DataObjects DataObject

Representsalinktothedataadapterofasecondarydatasource.TheDataObjectobjectactsasanintermediarybetweenaMicrosoftOfficeInfoPath2003formandthedataadapterobjectthatisusedtoaccessdatathatiscontainedinanexternaldatasource.

TheDataObjectobjectprovidespropertiesandmethodsthatcanbeusedtoprogrammaticallyinteractwithdataadapterobjects,includingretrievinginformationaboutthedataadapterobjectsandaccessingthedatathattheyconnectto.TheDataObjectobjectisaccessiblethroughtheDataObjectspropertyoftheXDocumentobject.

RemarksAnexternaldatasourcecantaketheformofaMicrosoftAccessorMicrosoftSQLServerdatabase,an.xmlfile,oranXMLWebservice.Thetypeofdataadapterobjectusedtoaccesstheexternaldatasourcedependsonthetypeofdatasource.TheDataObjectobjectprovidesacommonsetofpropertiesandamethodthatcanbeusedforalltypesofdataadapterobjects,andeachofthedataadapterobjectsprovidesitsownsetofpropertiesandmethods.

MicrosoftOfficeInfoPath2003supportsthreetypesofdataadapters:

1. ActiveXDataObjectsRepresentedbytheADOAdapterobject.

2. WebservicesRepresentedbytheWebServiceAdapterobject.

3. XMLfileRepresentedbytheXMLFileAdapterobject.

UsingtheDataObjectobjectInthefollowingcodesample,thenameofthesecondarydatasourceispassedtotheItempropertyoftheDataObjectscollection,whichreturnsareferencetotheDataObjectobject,which,inthiscase,isassociatedwithanADOAdapterdataadapterobject.UsingtheQueryAdapterpropertyoftheDataObjectobject,theADOAdapterdataadapterobject'sConnectionpropertyisusedtodisplaytheADOconnectionstringinamessagebox.

functionTestDataObjects(){varobjDataObject;//Setareferencetothespecifieddataobject.objDataObject=XDocument.DataObjects("CityList");//DisplaytheconnectioninformationfortheADOAdapterobject.XDocument.UI.Alert("DataAdapter:"+objDataObject.QueryAdapter.Connection);objDataObject=null;}

FormoreinformationaboutusingtheDataObjectobject,seeAccessingexternaldatasources.

ShowAll

DateObject

Providesseveraldate-relatedmethodsthatcanbeusedinMicrosoftOfficeInfoPath2003forms.

RemarksUsetheDatepropertyoftheUtilobjecttoreturnaDateobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheDateobjectTheDateobjectcontainsthefollowingmethods:

Method DescriptionNow ReturnsaVariantthatrepresentsthecurrentsystemdateand

timeinISOformat.Today ReturnsaVariantcontainingthecurrentsystemdateinISO

format.

ShowAll

DAVAdapterObject

RepresentsaconnectiontosubmitforminformationtoaMicrosoftWindowsSharePointServicesserver,orotherserversthatsupportDAVconnections.

RemarksUsetheItempropertyoftheDataAdapterscollectiontoreturnaDAVAdapterobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheDAVAdapterobjectTheDAVAdapterobjectcontainsthefollowingproperties:

Property DescriptionFileName ReturnsorsetsthefilenameforthecurrentMicrosoft

OfficeInfoPath2003formwhenitissubmittedbytheDAVAdapterobject.

FolderURL ReturnsorsetsthetheUniformResourceLocator(URL)towhichtheformwillbesubmittedbytheDAVAdapterobject.

Name ReturnsthenameofaDAVAdapterobject.QueryAllowed CorrespondstothequeryAllowedattributeintheform

definitionfile(.xsf).AlwaysreturnsFalsefortheDAVAdapterobject.

SubmitAllowed CorrespondstothesubmitAllowedattributeintheformdefinitionfile(.xsf).AlwaysreturnsTruefortheDAVAdapterobject.

TheDAVAdapterobjectcontainsthefollowingmethods:

Method DescriptionQuery BecausetheDAVAdapterobjectisavailableforsubmitting

dataonly,thismethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

Submit Executesthesubmitoperationontheassociatedadapter.SubmitData SubmitsthespecifiedDOMelementorDOMdocumenttoa

dataadapter.

ShowAll

DocActionEventObject

DocActionEvent

AneventobjectthatisusedduringaMicrosoftOfficeInfoPath2003buttonclickevent.TheDocActionEventobjectprovidesanumberofpropertiesthatcanbeusedwithinabuttonclickeventtoprogrammaticallyinteractwiththedatainaform'sunderlyingXMLdocumentandtocontrolthesuccessorfailureoftheevent.

RemarksTheDocActionEventobjectispassedasaparametertotheOnClickeventbuttonthatiscontainedinaviewofanInfoPathform.ItspropertiesareavailableonlyduringtheOnClickevent.

UsingtheDocActionEventobjectInthefollowingexample,theSourcepropertyoftheDocActionEventobjectisusedtodisplaythesourceXMLdataoftheinner-mostXMLDocumentObjectModel(DOM)nodeoftheform'sunderlyingXMLdocument,whichcontainsthebutton:

functionShowDocActionEventSource::OnClick(eventObj){XDocument.UI.Alert("Source:"+eventObj.Source.xml);}

FormoreinformationaboutusingtheDocActionEventobject,seeRespondingtoformevents.

DocContextChangeEventObject

AneventobjectthatisusedduringaMicrosoftOfficeInfoPath2003contextchangeevent.TheDocContextChangeEventobjectprovidesanumberofpropertiesthatcanbeusedwithinacontextchangetoprogrammaticallyinteractwiththedatainaform'sunderlyingXMLdocument,toprovidecontextualfeedbacktotheuser,ortoperformactionsfortheuser.

RemarksTheDocContextChangeEventobjectispassedasaparametertotheOnContextChangeevent.

TheDocContextChangeEventobjectisusedtogetinformationabouttheXMLDocumentObjectModel(DOM)nodethatisthecurrentcontextoftheform'sunderlyingXMLdocument.Inaddition,itprovidesinformationaboutthetypeofcontextchangeandwhetherthechangehappenedinresponsetoanundoorredooperationperformedbytheuser.

AsdescribedintheOnContextChangeeventtopic,theTypepropertyreturnsonlythevalue"ContextNode"forcontextchangesinMicrosoftInfoPath2003ServicePack1.Nevertheless,ifcodeinaneventhandlerperformsactionsthatdependoncurrentfunctionality,thatcodeshouldstillbedesignedtocheckthevalueoftheTypeproperty,becausefutureversionsofInfoPathmayusedifferentvaluesfordifferentcontextchanges.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheDocContextChangeEventobjectWhentheIsUndoRedopropertyoftheDocContextChangeEventobjectisTrue,thecontextchangewascausedbyanundoorredooperationratherthananexplicitusercontextchange.OperationsperformedintheOnContextChangeeventhandlerthatmodifytheXMLDOMshouldbeavoidedinresponsetoundoorredoactions,becausetheymayinterferewiththeuser'sintentiontorevertdatatoapreviousstate.

ExampleInthefollowingexample,anodenamedlastChangedisupdatedinresponsetocontextchanges:

functionXDocument::OnContextChange(eventObj){if(eventObj.Type=="ContextNode"&&!eventObj.IsUndoRedo){varoContextNode=eventObj.Context;varoLastChangedNode=XDocument.DOM.selectSingleNode("my:lastChanged");oLastChangedNode.text=oContextNode.nodeName;}}

DocEventObject

DocEvent

AneventobjectthatisusedduringaMicrosoftOfficeInfoPath2003mergeorviewswitchingevent.TheDocEventobjectprovidestheXDocumentpropertythatcanbeusedwithinamergeorviewswitchingeventtoprogrammaticallyinteractwiththedatainaform'sunderlyingXMLdocument.

RemarksTheDocEventobjectispassedasaparametertotheOnSwitchViewandOnAfterChangeeventsofanInfoPathform.TheXDocumentpropertythatitprovidesisavailableonlyduringtheseevents.

UsingtheDocEventobjectInthefollowingexample,theXDocumentpropertyoftheDocEventobjectisusedtodisplaythesourceXMLofaform'sunderlyingXMLdocumentusingtheDOMpropertyoftheXDocumentobject:

functionXDocument::OnSwitchView(eventObj){XDocument.UI.Alert("ThesourceXML:"+eventObj.XDocument.DOM.xml);}

FormoreinformationaboutusingtheDocEventobject,seeRespondingtoformevents.

DocReturnEventObject

DocReturnEvent

AneventobjectthatisusedduringaMicrosoftOfficeInfoPath2003loadorsubmissionevent.TheDocReturnEventobjectprovidestheXDocumentpropertythatcanbeusedwithinaloadorsubmissioneventtoprogrammaticallyinteractwiththedatainaform'sunderlyingXMLdocument.ItalsoprovidestheReturnStatuspropertythatisusedtospecifywhethertheeventissuccessful.

RemarksTheDocReturnEventobjectispassedasaparametertotheOnLoadandOnSubmitRequesteventsofanInfoPathform.Thepropertiesthatitprovidesareavailableonlyduringtheseevents.

UsingtheDocReturnEventobjectInthefollowingexample,theXDocumentpropertyoftheDocReturnEventobjectisusedtodisplaythesourceXMLofaform'sunderlyingXMLdocumentusingtheDOMpropertyoftheXDocumentobject:

functionXDocument::OnLoad(eventObj){XDocument.UI.Alert("ThesourceXML:"+eventObj.XDocument.DOM.xml);eventObj.ReturnStatus=true;}

FormoreinformationaboutusingtheDocReturnEventobject,seeRespondingtoformevents.

ShowAll

EmailAdapterObject

Representsthedataadapterforsubmittingforminformationine-mailbyusingMicrosoftOfficeOutlook.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheEmailAdapterobjectUsetheItempropertyoftheDataAdapterscollectiontoreturnanEmailAdapterobject.

Inthefollowingexample,areferencetotheEmailAdapterobjectissetbypassingthenameoftheEmailAdapterobjecttotheItempropertyoftheDataAdapterscollection:

varobjEmailAdapter;objEmailAdapter=XDocument.DataAdapters("MainSubmit");

Afterthereferencehasbeenset,youcanusethepropertiesoftheEmailAdapterobjectasshowninthefollowingexample,whichsetstheTopropertiesandtheSubjectproperty,thensubmitstheform.

objEmailAdapter.To="list@example.com";objEmailAdapter.Subject="StatusReport";objEmailAdapter.Submit();

TheEmailAdapterobjectcontainsthefollowingproperties:

Property DescriptionAttachmentFileNameReturnsorsetsthefilenametobeusedforthe

currentformwhenattachedtothee-mailmessageforanEmailAdapterobject.

BCC ReturnsorsetstheBCCrecipientsforanEmailAdapterobject.

CC ReturnsorsetstheCCrecipientsforanEmailAdapterobject.

Intro Returnsorsetstheintroductioninthebodyofthee-mailmessageforanEmailAdapterobject.

Name ReturnsthenameofanEmailAdapterobject.QueryAllowed CorrespondstothequeryAllowedattributeinthe

formdefinitionfile(.xsf).AlwaysreturnsFalsefortheEmailAdapterobject.

Subject Returnsorsetsthesubjectofthee-mailmessageforthespecifiedEmailAdapterobject.

SubmitAllowed CorrespondstothesubmitAllowedattributeintheformdefinitionfile(.xsf).AlwaysreturnsTruefortheEmailAdapterobject.

To ReturnsorsetstheTorecipientsforthespecifiedEmailAdapterobject.

TheEmailAdapterobjectcontainsthefollowingmethods:

Method DescriptionQuery BecausetheEmailAdapterobjectisavailablefor

submittingdataonly,thismethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

Submit Executesthesubmitoperationontheassociateddataadapter.

SubmitData SubmitsthespecifiedDOMelementorDOMdocumenttoadataadapter.

ShowAll

ErrorObject

Errors Error

RepresentsanerrorinaMicrosoftOfficeInfoPath2003form.EachErrorobjectinInfoPathiseachassociatedwithanXMLDocumentObjectModel(DOM)nodefromaform'sunderlyingXMLdocument.WhendatavalidationfailsforaparticularXMLDOMnode,InfoPathcreatesanErrorobjectandplacesitintheErrorscollection.

RemarksThatarethreetypesofdatavalidationerrorsthatcanoccurinanInfoPathform:

SCHEMA_VALIDATIONDatavalidationfailedasaresultofanXMLSchema–definedconstraint.

SYSTEM_GENERATEDDatavalidationfailedasaresultofconstraintsdefinedintheformdefinition(.xsf)fileorasaresultofscriptingcodecallingtheReportErrormethodoftheDataDOMEventobject.

USER_SPECIFIEDDatavalidationfailedasaresultofacustomscriptingerrorusingtheAddmethodoftheErrorscollection.

NoteTheTypepropertyoftheErrorobjectcanbeusedtodeterminethetypeofdatavalidationerrorthathasoccurred.

UsingtheErrorObjectTheErrorobjectprovidesanumberofpropertiesthatcanbeusedtoprogrammaticallyinteractwithanInfoPathdatavalidationerror.TheErrorobjectisaccessedthroughtheErrorspropertyoftheXDocumentobject,whichreturnsareferencetotheErrorscollection.

Inthefollowingexample,theItempropertyoftheErrorscollectionisusedtosetareferencetoanErrorobject;thentheShortErrorMessagepropertyoftheErrorobjectisisusedtodisplaytheerrormessageinamessagebox:

varobjError;

objError=XDocument.Errors(0);XDocument.UI.Alert("Errormessage:"+objError.ShortErrorMessage);

FormoreinformationaboutusingtheErrorobject,seeHandlingerrors.

ShowAll

ExternalApplicationObject

ExternalApplication

RepresentstheMicrosoftOfficeInfoPath2003application.TheExternalApplicationobjectimplementsalimitedsetofmethodsthatcanbeusedforautomatingInfoPathbyanexternalComponentObjectModel(COM)–basedprogramminglanguage.

RemarksTheExternalApplicationobjectcanbeusedtoperformalimitedsetofInfoPathoperationssuchascreating,opening,orclosingaform;registeringorunregisteringaformtemplate;orsimplyquittingtheapplication.

UsingtheExternalApplicationobjectTousetheExternalApplicationobject,youmustfirstcreateareferencetoitusingtheProgIDoftheInfoPathobjectmodelalongwiththenameoftheExternalApplicationobject.ThefollowingexampledemonstratescreatingareferencetotheExternalApplicationobjectusingtheVisualBasicforApplications(VBA)programminglanguage:

DimobjIPAsObjectSetobjIP=CreateObject("InfoPath.ExternalApplication")

NoteThisexampleuseslate-bindingforcreatingthereferencetotheExternalApplicationobject;youcanalsouseearly-bindingbysettingareferencetotheInfoPathobjectmodelinyourprogrammingenvironment.

AfteryouhavecreatedareferencetotheExternalApplicationobject,youcanthenusethemethodsthatitprovidestointeractwithInfoPath.Inthefollowingexample,writteninVBA,theOpenmethodoftheExternalApplicationobjectisusedtoopenaformbasedonthespecifiedUniformResourceIdentifier(URI):

PublicSubOpenForm()

DimobjIPAsObject

'CreatetheExternalApplicationobjectandopenaspecifiedform.SetobjIP=CreateObject("InfoPath.ExternalApplication")objIP.Open("C:\MyForms\Form1.xml")

SetobjIP=Nothing

EndSub

FormoreinformationaboutusingtheExternalApplicationobject,seeAutomatingInfoPath.

ShowAll

HTMLTaskPaneObject

HTMLTaskPane

RepresentsacustomtaskpaneinaMicrosoftOfficeInfoPath2003formthatisassociatedwithawindow.TheHTMLTaskPaneobjectprovidesanumberofpropertiesandmethodsforworkingwiththeInfoPathcustomtaskpane,anditprovidespropertiesandmethodstotheTaskPaneobjectasaninheritedobject.

RemarksThepropertiesandmethodsthatareavailableforanInfoPathtaskpanearedeterminedbythetypeoftaskpanethatyouareworkingwith.IftheTypepropertyoftheTaskPaneobjectreturns0,thetaskpaneisacustomtaskpaneandthepropertiesandmethodsthatareavailableareprovidedbytheHTMLTaskPaneobject.IftheTypepropertyreturnsanyothervalue,thetaskpaneisabuilt-intaskpaneandthepropertiesareprovidedbytheTaskPaneobjectdirectly.

TheTypepropertyisbasedontheXdTaskPaneTypeenumeration.TheseenumeratedvaluesarealsousedasargumentstotheItempropertyoftheTaskPanescollectionforreturningareferencetoaspecifiedtypeoftaskpane.

NoteThepropertiesandmethodsoftheHTMLTaskPaneobjectcannotbecalledduringanOnLoadeventbecausetheviewisnotyetloadedwhenthiseventoccurs,andtaskpanesareassociatedwiththeview.

UsingtheHTMLTaskPaneobjectInthefollowingexamplefromtheUserInterfacedevelopersampleform,theItempropertyoftheTaskPanescollectionisusedtosetaglobalreferencetotheTaskPaneobjectthatrepresentsthecustomtaskpane.ThecodethencallsascriptingfunctiondefinedintheHTMLcodeofthecustomtaskpaneusingtheHTMLDocumentpropertyoftheHTMLTaskPaneobject,whichisinheritedbytheTaskPaneobject.

functionSetTaskPaneState(){

//EnsureViewhasloadedbeforetryingtoaccessthetaskpane.if(XDocument.View){//Getareferencetothecustomtaskpane.Itisalwaysthe0-th//taskpaneintheTaskPanescollection.if(gobjTaskPane==null)gobjTaskPane=XDocument.View.Window.TaskPanes.Item(0);

//Ensurethatthetaskpaneiscompletelyloaded.if(gobjTaskPane.HTMLDocument.readyState=="complete"){varstrTaskPaneViewId="TP_"+XDocument.View.Name.replace(/\W+/g,"");

//CallascriptfunctiondefinedinthetaskpaneHTMLpage.gobjTaskPane.HTMLDocument.parentWindow.SelectView(strTaskPaneViewId);}}}

ShowAll

HTMLTaskPaneExternalObject

HTMLTaskPaneExternal

RepresentsalinktotheMicrosoftOfficeInfoPath2003objectmodel.TheHTMLTaskPaneExternalobjectisusedtoexposetheInfoPathobjectmodeltotheDynamicHTML(DHTML)scriptingcodeinacustomtaskpane.

TheHTMLTaskPaneExternalobjectprovidesanumberofpropertiesforaccessingcertainpartsoftheInfoPathobjectmodel,includingtheXDocumentobjectandtheWindowobject.

RemarksTheHTMLTaskPaneExternalobjectfacilitatesusingtheInfoPathobjectmodelwithinthescriptingcodethatispartofacustomtaskpane.TheobjectisexposedthroughtheexternalpropertyoftheDHTMLwindowobject.

UsingtheHTMLTaskPaneExternalobjectInthefollowingexample,theHTMLTaskPaneExternalobjectisusedthroughtheexternalpropertyoftheDHTMLwindowobjecttosetareferencetotheXDocumentobjectthatispartoftheInfoPathobjectmodel:

varobjXDoc;

objXDoc=window.external.XDocument;objXDoc.View.SwitchView("View2");

ShowAll

HWSAdapterObject

RepresentsaconnectiontosubmitforminformationtoaMicrosoftBiztalk2004HWS(HumanWorkflowServices)server.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheHWSAdapterobjectTheHWSAdapterobjectcontainsthefollowingproperties:

Property DescriptionName ReturnsthenameofanHWSAdapterobject.QueryAllowed CorrespondstothequeryAllowedattributeintheform

definitionfile(.xsf).AlwaysreturnsFalsefortheHWSAdapterobject.

SubmitAllowed CorrespondstothesubmitAllowedattributeintheformdefinitionfile(.xsf).AlwaysreturnsTruefortheHWSAdapterobject.

TheHWSAdapterobjectcontainsthefollowingmethods:

Method DescriptionQuery BecausetheHWSAdapterobjectisavailableforsubmitting

dataonly,thismethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

Submit Executesthesubmitoperationontheassociatedadapter.

InfoPathControlObject

DefinesmethodsusedfromtheimplementationofanActiveXcontrolforinitializing,uninitializing,enabling,disabling,andsavingthestateofacontrol.

RemarksTheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheInfoPathControlObjectTheInfoPathControlobjectdefinesthefollowingmethodsthatmustbeimplementedbythedeveloperofanActiveXcontrolforuseonInfoPathforms.

Method DescriptionEnable DefinesamethodthatInfoPathcallswhenitneedstoenable

ordisableaninstanceofthecontrolinaview.Init Definesamethodthatperformsanyinitializationroutines

requiredwhenaninstanceofthecontrolisaddedtoanInfoPathform.

SaveState DefinesamethodthatInfoPathcallswhenitneedstosavethestateofaninstanceofthecontrolinaview.

Uninit Definesamethodthatperformsanycleanuproutinesrequiredbeforeaninstanceofthecontrolisremovedfromaview.

InfoPathControlSiteObject

RepresentstheobjectthatInfoPathpassestoanActiveXcontrolwhenitisinitializedinanInfoPathview.TheInfoPathControlSiteobjectdefinestheXDocumentpropertyforaccessingtheXDocumentobjectassociatedwithaform,andtheNodepropertyforaccessingtheXMLnodetowhichthecontrolisbound.

RemarksTheInfoPathControlSiteobjectshouldnotbeimplementedbythedeveloperofanActiveXcontrol.ItrepresentsaninterfacethatisimplementedbyInfoPathitself.

TheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

MailEnvelopeObject

MailEnvelope

Representsacustome-mailmessageinaMicrosoftOfficeInfoPath2003form.TheMailEnvelopeobjectprovidesanumberofpropertiesthatcanbeusedtoprogrammaticallycreateacustome-mailmessagewithinthedefaulte-maileditor,anditattachesthecurrentlyopenInfoPathformtothemessage.

RemarksAfterthee-mailmessageiscreated,thedefaulte-maileditorwilldisplaythee-mailmessage;userscantheninspectandeditthee-mailmessagebeforesendingit.

NoteTheMailEnvelopeobjectcannotbeusedtosendthee-mailmessagesitcreates;usersmustmanuallysendthee-mailmessages.

YoucanalsousetheShowMailItemmethodoftheUIobjecttoprogrammaticallycreatee-mailmessages.

UsingtheMailEnvelopeobjectTheMailEnvelopeobjectisaccessedthroughtheMailEnvelopepropertyoftheWindowobject.

InthefollowingexamplefromtheMeetingAgendasampleform,theMailEnvelopepropertyoftheWindowobjectisusedtosetareferencetotheMailEnvelopeobjectthatisassociatedwiththecurrentlyactivewindow.ThecodethenusestheMailEnvelopeobjecttocreateacustome-mailmessage.

functionSendMeetingAgendaBtn::OnClick(oEvent){varrgRecipients=newArray();varxmlRecipients=getNodeList("/mtg:meetingAgenda/mtg:attendees/mtg:attendee/mtg:emailAddressPrimary");varxmlRecipient;

while(xmlRecipient=xmlRecipients.nextNode())rgRecipients.push(xmlRecipient.text);

try{varoEnvelope=Application.ActiveWindow.MailEnvelope; oEnvelope.Subject=getNode("/mtg:meetingAgenda/mtg:subject").text;oEnvelope.To=rgRecipients.join(";");oEnvelope.Visible=true;}catch(ex){XDocument.UI.Alert(ex.description);}}

ShowAll

MathObject

Providesseveralmath-relatedmethodsthatcanbeusedinMicrosoftOfficeInfoPath2003forms.

RemarksUsetheMathpropertyoftheUtilobjecttoretunaMathobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheMathobjectTheMathobjectcontainsthefollowingmethods:

Function DescriptionAvg Returnstheaveragevalueofallthenumericalelementsina

nodeset.Eval Returnsthesetofresultscalculatedwhentheexpressionis

appliedtoeachsetofelementsinthecontext.Max Returnsthelargestvalueofallthenumericalelementsina

nodeset.Min Returnsthesmallestvalueofallthenumericalelementsina

nodeset.Nz Replacesemptyvaluesinthespecifiednodelistwith"0"

(zero).

MergeEventObject

AneventobjectthatisusedduringanOnMergeRequestevent.TheMergeEventobjectprovidespropertiesandmethodsthatcanbeusedduringanOnMergeRequesteventtoprogrammaticallyinteractwithaform'sunderlyingXMLdocumentandtodeterminemergepropertiessuchasthenumberoffilesbeingmerged.

RemarksDuringasinglemergeformsoperation,multipleOnMergeRequesteventswilloccur.OneOnMergeRequesteventwilloccurforeachfilebeingmerged.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheMergeEventobjectTheMergeEventobjectispassedasaparametertotheOnMergeRequesteventofanInfoPathform.Thepropertiesthatitprovidesareavailableonlyduringthisevent.

ExampleInthefollowingexample,theDOMpropertyandReturnStatuspropertyoftheMergeEventobjectandtheImportDOMmethodoftheXDocumentobjectareusedtoimport(merge)aformfromtheOnMergeRequesteventhandler:

functionXDocument::OnMergeRequest(eventObj){XDocument.ImportDOM(eventObj.DOM);

eventObj.ReturnStatus=true;}

SaveEventObject

AneventobjectthatisusedduringanOnSaveRequestevent.TheSaveEventobjectprovidesanumberofpropertiesandmethodsthatcanbeusedduringasaveoperationfromtheOnSaveRequesteventhandlertoprogrammaticallyinteractwithaform'sunderlyingXMLdocument,determinesaveproperties,andperformthesaveoperation.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheSaveEventsobjectTheSaveEventobjectispassedasaparametertotheOnSaveRequesteventofanInfoPathform.Thepropertiesthatitprovidesareavailableonlyduringthisevent.Thisobjectexpireswhenthesaveeventexpiressoitmaynotbestoredandusedoutsideofthescopeofthesaveevent.

ExampleInthefollowingexample,theReturnStatuspropertyandthePerformSaveOperationmethodoftheSaveEventobjectareusedtoperformastandardInfoPathsaveoperation:

functionXDocument::OnSaveRequest(eventObj){eventObj.PerformSaveOperation();eventObj.ReturnStatus=true;}

ShowAll

SharepointListAdapterObject

RepresentsaconnectiontoaSharePointlistordocumentlibrary.TheSharePointListAdapterobjectrepresentstheOfficeInfoPath2003dataadapterforretrievingdatafromaSharePointlistordocumentlibrary.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheSharepointListAdapterObjectForasecondarydatasource,theSharePointListAdapterobjectisaccessiblethroughtheQueryAdapterpropertyofadataadapterobject.DataadapterobjectsareaccessiblethroughtheDataAdapterspropertyoftheXDocumentobject.

TheSharepointListAdapterobjectcontainsthefollowingproperties:

Property DescriptionName ReturnsthenameoftheSharepointListAdapter

object.QueryAllowed Aread-onlypropertyoftypeBooleanthatcorresponds

tothequeryAllowedattributeintheformdefinitionfile(.xsf).AlwaysreturnsTruefortheSharepointListAdapterobject.

SiteUrl Aread-onlypropertyreturningtheUniformResourceLocator(URL)oftheSharePointsitethatthisadaptercanqueryfrom.

SubmitAllowed CorrespondstothesubmitAllowedattributeintheformdefinitionfile(.xsf).AlwaysreturnsFalsefortheSharepointListAdapterobject.

TheSharepointListAdapterobjectcontainsthefollowingmethods:

Method DescriptionQuery ReadsdatafromtheSharepointListAdapterobject.Submit BecausetheSharepointListAdapterobjectisavailablefor

receivingdataonly,thismethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

ExampleInthefollowingexample,areferencetotheSharePointListAdapterobjectisaccessedthroughtheQueryAdapterpropertyofadataadapterobjectbypassingthenameofthedataadapterobjecttotheItempropertyoftheDataAdapterscollection:

varobjSPLAdapter;objSPLAdapter=XDocument.DataAdapters("Announcements").QueryAdapter;

Afterthereferencehasbeenset,youcanusethemethodsoftheSharePointListAdapterobjectasshowninthefollowingexample,whichrequeriestheSharePointlistorlibrarytoupdatetheDOMpropertyofthedataadapterobject:

objSPLAdapter.Query();

ShowAll

SignatureObject

Representsadigitalsignaturethathasbeenaddedtoaformorsetofsigneddatainaform.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheSignatureobjectUsetheItempropertyoftheSignaturescollectiontoreturnaSignatureobject.

TheSignatureobjectcontainsthefollowingproperties,whichcanbeusedtoreturninformationaboutadigitalsignature:

Property DescriptionComment Returnsthetextcommentthatwasaddedto

thedigitalsignature.Status Returnsthestatusofthespecifieddigital

signatureSignatureBlockXmlNode ReturnstheXMLnodecorrespondingthe

digitalsignature.Certificate ReturnstheCertificateobjectfortheX.509

digitalcertificatethatwasusedwhensigningaformorasetofsigneddata.

TheSignatureobjectcontainsthefollowingmethod:

Method DescriptionSign WritestheXMLdigitalsignatureblockandcomputesthe

cryptographichashforthesigneddata.

ShowAll

SignedDataBlockObject

RepresentsasetofsigneddatainaMicrosoftOfficeInfoPath2003form.TheSignedDataBlockobjectprovidesanumberofpropertiesandonemethodthatcanbeusedtoprogrammaticallyinteractwithasetofsigneddata.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheSignedDataBlockobjectTheSignedDataBlockobjectcontainsthefollowingread-onlyproperties:

Property DescriptionXPath ReturnstheXPathexpressionofthe

setofsigneddatarepresentedbytheSignedDataBlockobject.

Name ReturnsthenameoftheSignedDataBlock.

Caption ReturnsthefriendlynameoftheSignedDataBlock.

SignatureRelation ReturnstherelationamongmultiplesignaturesontheSignedDataBlock.

Signatures ReturnsacollectionofthesignaturesofaSignedDataBlock.

XPathNamespaceDeclarations ReturnsthenamespacedefinitionsfortheSignedDataBlock.

SignatureContainer ReturnstherootXMLnodeofthesub-treethatcontainsthesignature(s).

TheSignedDataBlockobjectcontainsthefollowingmethod:

Method DescriptionSign InvokestheDigitalSignaturesdialogboxtoaddadigital

signaturetotheSignedDataBlocksectionoftheform.

ShowAll

SignEventObject

AneventobjectthatisusedduringtheOnSignevent.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheSignEventobjectUsetheSignedDataBlockpropertyoftheSignEventObjectobjecttodeterminewhichsigneddatablockistriggeringtheOnSignevent.TheOnSigneventisraisedforafullytrustedformtemplateonly.

ExampleInthefollowingexample,theSignEventobjectisusedtoaddasignatureandtimestamptoaSignedDataBlockobject:

[InfoPathEventHandler(EventType=InfoPathEventType.OnSign)]publicvoidOnSign(SignEvente){Signaturesignature=e.SignedDataBlock.Signatures.Create(); signature.Sign();

//Countersignthesignaturewithatrustedtimestamp.

//GettheXMLnodestoringthesignatureblock. IXMLDOMNodeoNodeSig=signature.SignatureBlockXmlNode; IXMLDOMNodeoNodeSigValue=oNodeSig.selectSingleNode(".//*[local-name(.)=’signatureValue’]"); //Gettimestampfromtimestampservice(fictitious). MyTrustedTimeStampingServices=newMyTrustedTimeStampingService(); stringstrVerifiedTimeStamp=s.AddTimeStamp(oNodeSigValue.text); //Addthevaluereturnedfromthetimestampingservicetothe //unsignedpartofthesignatureblock. IXMLDOMNodeoNodeObj=oNodeSig.selectSingleNode(".//*[local-name(.)=’Object’]"); IXMLDOMNodeoNode=oNodeObj.cloneNode(false); oNode.text=strVerifiedTimeStamp; oNodeObj.parentNode.appendChild(oNode);

e.ReturnStatus=true;}

ShowAll

SolutionObject

Solution

CorrespondstoaMicrosoftOfficeInfoPath2003formtemplate.TheSolutionobjectimplementspropertiesforgettinginformationaboutaformtemplate,includingitsversionnumber,theUniformResourceLocator(URL)ofitsextractedformfiles,theURLitwasloadedfrom,andanXMLDocumentObjectModel(DOM)containingitsformdefinition(.xsf)file.

RemarksTheSolutionobjectisaccessedthroughtheSolutionpropertyoftheXDocumentobject.

UsingtheSolutionobjectInthefollowingexample,areferenceissettotheSolutionobject,thenthecodegetsthenameofthepersonwhoauthoredtheformfromthe.xsfusingtheDOMpropertyoftheSolutionobject.Atestisthenmadetodetermineifthereisanauthorvalue,andtheresultsaredisplayedinamessagebox.

functionSolutionInfo::OnClick(eventObj){varobjSolution=XDocument.Solution;varstrSolutionVersion=objSolution.Version;varobjAuthorNode=objSolution.DOM.selectSingleNode("xsf:xDocumentClass/@author");varstrAuthorText;

if(objAuthorNode!=null)strAuthorText=objAuthorNode.text;elsestrAuthorText="Authornotavailable.";

XDocument.UI.Alert("Version:"+strSolutionVersion+"\nAuthor:"+strAuthorText);}

FormoreinformationaboutusingtheSolutionobject,seeAccessingapplicationdata.

ShowAll

TaskPaneObject

TaskPanes TaskPane

RepresentsataskpaneinaMicrosoftOfficeInfoPath2003formthatisassociatedwithawindow.TheTaskPaneobjectprovidesanumberofpropertiesforworkingwiththeInfoPathbuilt-intaskpanes,andtheHTMLTaskPaneobjectinheritsthosepropertiesandmethodsforworkingwithacustomtaskpane.

RemarksThepropertiesandmethodsthatareavailableforanInfoPathtaskpanearedeterminedbythetypeoftaskpanethatyouareworkingwith.IftheTypepropertyoftheTaskPaneobjectreturns0,thetaskpaneisacustomtaskpaneandthepropertiesandmethodsthatareavailableareprovidedbytheHTMLTaskPaneobject.IftheTypepropertyreturnsanyothervalue,thetaskpaneisabuilt-intaskpaneandthepropertiesareprovidedbytheTaskPaneobjectdirectly.

NoteTheTypepropertyisbasedontheXdTaskPaneTypeenumeration.TheseenumeratedvaluesarealsousedasargumentstotheItempropertyoftheTaskPanescollectionforreturningareferencetoaspecifiedtypeoftaskpane.

UsingtheTaskPaneobjectInthefollowingexamplefromtheUserInterfacedevelopersampleform,theItempropertyoftheTaskPanescollectionisusedtosetaglobalreferencetotheTaskPaneobjectthatrepresentsthecustomtaskpane.ThecodethencallsascriptingfunctiondefinedintheHTMLcodeofthecustomtaskpaneusingtheHTMLDocumentpropertyoftheHTMLTaskPaneobject,whichisinheritedbytheTaskPaneobject.

functionSetTaskPaneState(){

//EnsureViewhasloadedbeforetryingtoaccessthetaskpane.if(XDocument.View){//Getareferencetothecustomtaskpane.Itisalwaysthe0-th//taskpaneintheTaskPanescollection.if(gobjTaskPane==null)gobjTaskPane=XDocument.View.Window.TaskPanes.Item(0);

//Ensurethatthetaskpaneiscompletelyloaded.if(gobjTaskPane.HTMLDocument.readyState=="complete"){varstrTaskPaneViewId="TP_"+XDocument.View.Name.replace(/\W+/g,"");

//CallascriptfunctiondefinedinthetaskpaneHTMLpage.gobjTaskPane.HTMLDocument.parentWindow.SelectView(strTaskPaneViewId);}}}

UIObject

UI

RepresentsvarioususerinterfacecomponentsthatcanbeusedinaMicrosoftOfficeInfoPath2003form.TheUI(userinterface)objectprovidesanumberofmethodsfordisplayingcustomandbuilt-indialogboxes.

RemarksTheUIobjectisusedtoprogrammaticallydisplayvarioustypesofdialogboxestousersastheyfilloutaform.ItisnotusedformodifyingtheInfoPathuserinterface.

UsingtheUIobjectTheUIobjectisaccessedthroughtheUIpropertyoftheXDocumentobject.

TheUIobjectprovidestheAlertmethod,whichisusedtodisplayasimplemessageboxwithsomecustomtext,asshowninthefollowingexample:

XDocument.UI.Alert("Custommessagetextgoeshere.");

Oneofthebuilt-inInfoPathdialogboxesthattheUIobjectcandisplayistheDigitalSignaturesdialogbox;thisdialogboxcanbedisplayedtotheuserbyusingtheShowSignatureDialogmethod,asfollows:

XDocument.UI.ShowSignatureDialog();

NoteTheShowSignatureDialogmethodcanbeusedonlyinformsthathavebeenenabledfordigitalsigning.Themethodwillreturnanerrorifusedinaformthatisnotenabledfordigitalsigning.

FormoreinformationaboutusingtheUIobject,seeDisplayingalertsanddialogboxes.

UserObject

Providesmethodsthatcanbeusedtoreturninformationaboutthecurrentuser.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheUserobjectUsetheUserpropertyoftheApplicationobjecttoreturnaUserobject.

TheUserobjectcontainsthefollowingmethods:

Method DescriptionIsCurrentUser ReturnsTrueifthecurrentusermatchesthespecified

username.IsUserMemberOfReturnsTrueifcurrentuserisamemberofthe

specifiedgroup.

ShowAll

UtilObject

ProvidesutilitymethodsthatcanbeusedwithMicrosoftOfficeInfoPath2003forms.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsingtheUtilobjectUsetheUtilpropertyoftheXDocumentobjecttocreateaUtilobject.

TheUtilobjectcontainsthefollowingproperties:

Property DescriptionDate UsethispropertytoreturnaDateobject,whichprovides

severaldate-relatedmethods.Math UsethispropertytoreturnaMathobject,whichprovides

severalmath-relatedmethods.

TheUtilobjectcontainsthefollowingmethod:

Method DescriptionMatch Indicateswhetherastringmatchesaspecifiedpattern.

ShowAll

VersionUpgradeEventObject

VersionUpgradeEvent

AneventobjectthatisusedduringaMicrosoftOfficeInfoPath2003versionupgradeevent.TheVersionUpgradeEventobjectprovidesanumberofpropertiesthatcanbeusedwithinaversionupgradeeventtoprogrammaticallyinteractwithaform'sunderlyingXMLdocument,determinetheversionnumbersoftheformandformtemplate,andprovidearesponseindicatingthesuccessoftheversionupgradeprocess.

RemarksTheVersionUpgradeEventobjectispassedasaparametertotheOnVersionUpgradeeventofanInfoPathform.Thepropertiesthatitprovidesareavailableonlyduringthisevent.

UsingtheVersionUpgradeEventobjectInthefollowingexample,theDocumentVersionandSolutionVersionpropertiesoftheVersionUpgradeEventobjectareusedtodisplaytheversionnumbersoftheformandformtemplate:

functionXDocument::OnVersionUpgrade(eventObj){XDocument.UI.Alert("Theformversion:"+eventObj.DocumentVersion+"\nTheformtemplateversion:"+eventObj.SolutionVersion);eventObj.ReturnStatus=true;}

FormoreinformationaboutusingtheVersionUpgradeEventobject,seeRespondingtoformevents.

ViewObject

View

RepresentsaviewwithinaMicrosoftOfficeInfoPath2003form.TheViewobjectprovidesanumberofpropertiesandmethodsthatcanbeusedtoprogrammaticallyinteractwithanInfoPathview,includingmethodsforselectingdatacontainedintheview,switchingfromoneviewtoanother,synchronizingtheviewwithaform'sunderlyingXMLdocument,andexecutinganInfoPatheditingaction.

RemarksInfoPathformscancontainoneormoreviews,andoneviewisalwaysdefinedasthedefaultview.WhenyouworkwithaviewusingtheViewobject,youareaccessingthecurrentlyactiveview.

NoteTheInfoPathobjectmodelalsoprovidestheViewInfoscollection,whichcanbeusedtogetinformationaboutalloftheviewsimplementedinaform.

UsingtheViewobjectTheViewobjectisaccessedthroughtheViewpropertyoftheXDocumentobject.Forexample,thefollowingcodesetsareferencetoaform'scurrentlyactiveview:

varobjView;

objView=XDocument.View;

Tochangethecurrentlyactiveview,youcanusetheSwitchViewmethodoftheViewobjectasfollows:

XDocument.View.SwitchView("View2");

Toforceanupdateofaviewbasedonchangesinaform'sunderlyingXMLdocument,youcanusetheForceUpdatemethodoftheViewobject,asshownhere:

XDocument.View.ForceUpdate();

FormoreinformationaboutusingtheViewobject,seeWorkingwithviews.

ViewInfoObject

ViewInfos ViewInfo

ContainsdescriptiveinformationaboutaviewwithinaMicrosoftOfficeInfoPath2003form.

RemarksTheViewInfoobjectprovidespropertiesthatcanbeusedtogetthenameofaviewanddeterminewhetheraviewisthedefaultviewoftheform.TheViewInfoobjectisaccessiblethroughtheViewInfospropertyoftheXDocumentobject.

NoteToworkwiththeviewprogrammatically,usetheViewobject.

UsingtheViewInfoobjectInthefollowingexample,theIsDefaultpropertyoftheViewInfoobjectisusedtodeterminewhetheraviewisthedefaultviewoftheform.ThenthecodeusestheNamepropertyoftheViewInfoobjecttodisplaythenameofthedefaultviewinamessagebox.

varobjViewInfos;

//SetareferencetotheViewInfoscollection.objViewInfos=XDocument.ViewInfos;

//Determinethedefaultviewanddisplaya//messageboxwithitsname.for(i=0;i<objViewInfos.Count;i++){if(objViewInfos(i).IsDefault)XDocument.UI.Alert("Thedefaultviewis:"+XDocument.ViewInfos(0).Name);}

ShowAll

WebServiceAdapterObject

WebServiceAdapter

RepresentsaconnectiontoanXMLWebservice.TheWebServiceAdapterobjectisatypeofMicrosoftOfficeInfoPath2003dataadapterthatcontainsalltheinformationnecessaryforretrievingdatafromandsubmittingdatatoanexternaldatasource.

RemarksTheWebServiceAdapterobjectprovidespropertiesthatcanbeusedtogetandsetinformationaboutthedataadapter'sinputandoperationstrings.ItalsoprovidesapropertyforgettingtheUniformResourceLocator(URL)oftheWebServicesDescriptionLanguage(WSDL)fileoftheXMLWebservice.

UsingtheWebServiceAdapterobjectForsecondarydatasources,theWebServiceAdapterobjectisaccessiblethroughtheQueryAdapterpropertyoftheDataObjectobject,andDataObjectobjectsareaccessiblethroughtheDataObjectspropertyoftheXDocumentobject.

IfaWebserviceisusedastheprimarydatasourceforaform,theWebServiceAdapterobjectisaccessiblethroughtheQueryAdapterpropertyoftheXDocumentobject.

Inthefollowingexample,areferencetotheWebServiceAdapterobjectissetbyusingtheQueryAdapterpropertyoftheDataObjectobjectbypassingthenameoftheDataObjectobjecttotheItempropertyoftheDataObjectscollection:

varobjWSAdapter;

objWSAdapter=XDocument.DataObjects("GetCityList").QueryAdapter;

Afterthereferencehasbeenset,youcanusethepropertiesoftheWebServiceAdapterobjectasshowninthefollowingexample,whichsetsareferencetotheXMLnodereturnedbytheInputproperty:

varobjInputNode;

objInputNode=XDocument.DataObjects("GetCityList").QueryAdapter.Input;

Notethatinthiscase,theQueryAdapterpropertywasusedtoaccesstheInputpropertyoftheWebServiceAdapterobject.

FormoreinformationaboutusingtheWebServiceAdapterobject,seeAccessingexternaldatasources.

TheWebServiceAdapterobjectcontainsthefollowingproperties:

Property Description

ErrorsLocation ApropertyoftypeIXMLDOMNodethatsetsorretrievestheerrorsnodeunderwhichtheWebServiceAdapterobjectwillwritetheerrordetailsreturnedbytheWebservice.Theinitialvalueisnull.

Input SetsorretrievesastringthatcontainsthesourceXMLoftheinputelementcontainedintheformdefinitionfile(.xsf).

Name Aread-onlypropertyoftypeStringthatreturnsthenameoftheWebServiceAdapterobject.

Operation SetsorretrievesastringthatcontainsthesourceXMLoftheoperationelementcontainedintheformdefinition(.xsf)file.

OutputLocation ApropertyoftypeIXMLDOMNodethatsetsorretrievestheoutputnodeunderwhichtheWebServiceAdapterobjectwillcopythereturnedXML.

QueryAllowed Aread-onlypropertyoftypeBooleanthatcorrespondstothequeryAllowedattributeintheformdefinition(.xsf)file.

SubmitAllowed Aread-onlypropertyoftypeBooleanthatcorrespondstothesubmitAllowedattributeintheformdefinitionfile(.xsf).

Timeout ApropertyoftypeLongthatsetsorretrievesthelengthoftime,inseconds,fortheWebServiceAdapterobjecttotime-outonsubsequentrequests.Thedefaultvalueis30seconds.

WSDLURL Aread-onlypropertythatreturnsastringthatcontainstheUniformResourceLocator(URL)oftheWebServicesDescriptionLanguage(WSDL)filefortheWebserviceassociatedwiththeWebServiceAdapterobject.

TheWebServiceAdapterobjectcontainsthefollowingmethods:

Method PropertyGenerateDataSetDiffGram ReturnsanADO.NetDataSetcontainingan

inlineschemadescribingthedataandthe

DiffGramoftheDataSet.TheDiffGramfortheinputdataDomisgenerated,usingthesiblingnodeOriginalDatatocomputethedifferencebetweentheOriginalDataandtheinputdataDom.

Query ExecutestheQuerymethodontheWebServiceAdapterobject.FailsiftheQueryAllowedpropertyisFalse.

Submit ExecutestheSubmitmethodontheWebServiceAdapterobject.FailsiftheSubmitAllowedpropertyisFalse.

ShowAll

WindowObject

Windows Window

RepresentsawindowthatisusedintheMicrosoftOfficeInfoPath2003application.WindowobjectsrepresentthetwotypesofwindowsthatareusedintheInfoPathapplication:theeditingwindowthatisusedastheformareawhenauserfillsoutaform,andthedesigningwindowthatisusedasthedesignmodewhenauserdesignsaform.

RemarksTheWindowobjectprovidesanumberofpropertiesandmethodsthatcanbeusedtoprogrammaticallyinteractwithInfoPathwindows,includingtheabilitytoactivateorcloseawindowandtheabilitytointeractwiththetaskpanesandcommandbarsthattheycontain.TheWindowobjectalsoprovidesapropertyforaccessingtheform'sunderlyingXMLdocumentthatisassociatedwiththewindow.

NoteSomepropertiesoftheWindowobjectareonlyavailablewhenusingtheeditingwindowtype;theywillreturnanerrorifusedwiththedesigningwindowtype.

UsingtheWindowobjectTheWindowobjectsofanInfoPathformareaccessedthroughtheItempropertyoftheWindowscollection.ThetypeofwindowcanbedeterminedbytheTypepropertyoftheWindowobject.

YoucanaccessthecurrentlyopenwindowdirectlybyusingtheActiveWindowpropertyoftheApplicationobject,withoutgoingthroughtheWindowscollection.YoucanalsoaccesstheWindowobjectthatisassociatedwithaviewbyusingtheWindowpropertyoftheViewobject.

Inthefollowingexample,implementedasanOnClickeventhandlerforabuttoncontrol,theActiveWindowpropertyisusedtosetareferencetothecurrentwindow.Thenthecodechecksthewindowtype;ifitistheeditingwindowtype,itdisplaysthenumberoftaskpanescontainedinthewindowinamessagebox.

functionWindowObject::OnClick(eventObj){

varobjWindow;//Setareferencetothecurrentwindow.objWindow=Application.ActiveWindow;//Checkthatthewindowisaneditingwindowtype.if(objWindow.Type==0){//Displaythenumberoftaskpanesinthewindow.XDocument.UI.Alert("Numberoftaskpanes:"+objWindow.TaskPanes.Count);}objWindow=null;}

FormoreinformationaboutusingtheWindowobject,seeWorkingwithformwindows.

ShowAll

XDocumentObject

XDocuments XDocument

RepresentstheunderlyingXMLdocumentofaMicrosoftOfficeInfoPath2003form.

RemarksTheXDocumentobjectisakeyobjectintheInfoPathobjectmodelthatprovidesproperties,methods,andeventsthatcanbeusedtoprogrammaticallyinteractwithandmanipulatethesourceXMLdataofaform.

NoteTheXDocumentobjectisembeddedintheInfoPathscriptengine.WhiletheXDocumentobjectcanbeaccessedusingtheXDocumentscollection,inmostcasesyouwillaccessitdirectly,withoutgoingthroughthecollection.

UsingtheXDocumentobjectThesourceXMLdataofaformtakestheformofanXMLDocumentObjectModel(DOM),whichisaccessedthroughtheDOMpropertyoftheXDocumentobject.TheXDocumentobjectalsoprovidesanumberofpropertiesthatcanbeusedtogetinformationabouttheformanditsunderlyingXMLdocument.Forexample,thefollowingcodecheckstoseewhetherdataintheformhasbeenchangedbyusingtheIsDirtyproperty:

if(XDocument.IsDirty)XDocument.UI.Alert("Formhasbeenchanged.");elseXDocument.UI.Alert("Formhasnotbeenchanged.");

InadditiontoinformationabouttheformanditsunderlyingXMLdocument,theXDocumentobjectprovidesanumberofmethodsthatcanbeusedontheform,suchasprinting,saving,andsubmitting.Italsoprovidesanumberofeventsthatcanbeusedtorespondtovariousactionsthatoccurattheformlevel,suchasloadingofaform,switchingviews,oramergeoperation.

AccessingtheXDocumentobjectTheXDocumentobjectcanbeaccessedinavarietyplaceswithintheInfoPathobjectmodel.ThefollowingtablesummarizesthelocationswheretheXDocumentobjectisavailable.

Name DescriptionXDocumentscollection

AccessedfromtheApplicationobject.ProvidestheItempropertyforaccessingthetheXDocumentobjectsthatitcontains.

DataDOMEventobject ProvidesanXDocumentpropertyforaccessingthesourceXMLdataduringanXMLDOMchange.

DocActionEventobject

ProvidesanXDocumentpropertyforaccessingthesourceXMLdataduringabuttonclickintheformarea.

DocEventobject ProvidesanXDocumentpropertyforaccessingthesourceXMLdataduringaswitchvieworformmergeoperation.

DocReturnEventobject

ProvidesanXDocumentpropertyforaccessingthesourceXMLduringtheloadingorsubmissionofaform.

VersionUpgradeEventobject

ProvidesanXDocumentpropertyforaccessingthesourceXMLduringduringtheversionupgradeoperation.

Windowobject ProvidesanXDocumentpropertyforaccessingtheXDocumentobjectassociatedwiththewindow.

NoteFormoreinformationaboutusingtheXDocumentobject,seeAccessingformdata.

ShowAll

XMLFileAdapterObject

XMLFileAdapter

RepresentsaconnectiontoanXMLfile.TheXMLFileAdapterobjectisatypeofMicrosoftOfficeInfoPath2003dataadapterthatcontainsalltheinformationnecessaryforretrievingandsubmittingdatatoanexternaldatasource.

RemarksTheXMLFileAdapterobjectprovidestheFileURLproperty,whichcanbeusedgetorsettheUniformResourceLocator(URL)oftheXMLfilethatisbeingusedanexternaldatasource.

UsingtheXMLFileAdapterobjectForsecondarydatasources,theXMLFileAdapterobjectisaccessiblethroughtheQueryAdapterpropertyoftheDataObjectobject,andDataObjectobjectsareaccessiblethroughtheDataObjectspropertyoftheXDocumentobject.

Inthefollowingexample,areferencetotheXMLFileAdapterobjectissetbyusingtheQueryAdapterpropertyoftheDataObjectobjectbypassingthenameoftheDataObjectobjecttotheItempropertyoftheDataObjectscollection:

varobjXMLFileAdapter;

objXMLFileAdapter=XDocument.DataObjects("GetXMLCityList").QueryAdapter;

FormoreinformationaboutusingtheXMLFileAdapterobject,seeAccessingexternaldatasources.

ActiveProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetherthewindowassociatedwiththeWindowobjectistheactivewindow.

expression.Active

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTodesignateawindowastheactivewindow,usetheActivatemethodoftheWindowobject.

ExampleInthefollowingexample,theActivepropertyoftheWindowobjectisusedtodeterminewhetherthefirstwindowcontainedintheWindowscollectionistheactivewindow:

if(Application.Windows(0).Active){XDocument.UI.Alert("Thewindowisactive.");}

ActiveWindowProperty

Aread-onlypropertythatreturnsareferencetoaWindowobjectthatrepresentsthecurrentlyactivewindow.ThetypeofwindowreturnedisbasedontheXdWindowTypeenumeration.

expression.ActiveWindow

expressionRequired.AnexpressionthatreturnstheApplicationobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksUsingtheActiveWindowproperty,youcangainimmediateaccesstothewindowthatiscurrentlybeingviewedbytheuser,andthenusethepropertiesandmethodsoftheWindowobjectthatitreturns.

ExampleInthefollowingexamplefromtheMeetingAgendasampleform,theActiveWindowpropertyisusedtogainaccesstotheMailEnvelopepropertyoftheWindowobjectthatreturnsaMailEnvelopeobject.

varoEnvelope=Application.ActiveWindow.MailEnvelope;

oEnvelope.Subject=getNode("/mtg:meetingAgenda/mtg:subject").text;oEnvelope.To=rgRecipients.join(";");oEnvelope.Visible=true;

AttachmentFileNameProperty

Returnsorsetsastringthatrepresentsthefilenametobeusedforthecurrentformwhentheformisattachedtothee-mailmessageofanEmailAdapterobject.

expression.AttachmentFileName

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThe".xml"filenameextensionwillbeappendedtothestringifitisnotalreadyincluded.

IftheAttachmentFileNamepropertyissettonull,theformwillnotbeattachedtothee-mailmessage.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThisexampleshowshowtousetheAttachmentFileNamepropertyofaninstanceoftheEmailAdapterobjecttochangethenameoftheformwhenitisattachedtothee-mailmessagebeforetheEmailAdapterobjectissubmitted:

objEmailAdapter.AttachmentFileName=strName+"–"+strDate+".xml";

BCCProperty(EmailAdapterObject)

ReturnsorsetsastringthatrepresentstheBCCrecipientsofane-mailmessageassociatedwithanEmailAdapterobject.

expression.BCC

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThevaluemustbeasemicolon-delimitedstringthatcanberesolvedintoalistofvalide-mailaddressesbytheuser'se-mailclient.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThisexampleshowshowtousetheBCCpropertyofaninstanceoftheEmailAdapterobjecttochangetheBCCrecipientsbeforetheEmailAdapterissubmitted:

objEmailAdapter.BCC=oEmailAdapter.BCC+";newUser@example.com";

BCCProperty(Index)

TheBCCpropertysetsorretrievesastringcontainingtheblindcarboncopy(BCC)valueforane-mailmessage.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaBCCpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheBCCproperty.

BCCpropertyasitappliestotheEmailAdapterobject.

BCCpropertyasitappliestotheMailEnvelopeobject.

BCCProperty(MailEnvelopeObject)

Setsorretrievesastringcontainingtheblindcarboncopy(BCC)valueusedintheMailEnvelopeobjectthatisassociatedwithaWindowobject.

expression.BCC

expressionRequired.AnexpressionthatreturnsareferencetotheMailEnvelopeobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThevaluessetfortheBCCpropertyshouldbeastringofvalide-mailaddresses.Youcanspecifymultiplee-mailaddressesbyusing";"betweeneachofthem,asshowninthefollowingexample:

objEmail.BCC="someone@example.com;someone@example.com"

ExampleInthefollowingexample,theBCCpropertyoftheMailEnvelopeobjectisusedtosettheBCCvalueofacustome-mailmessage:

functionCreateMailEnvelope::OnClick(eventObj){varobjEmail;

objEmail=Application.ActiveWindow.MailEnvelope;objEmail.To="someone@example.com";objEmail.CC="someone@example.com";objEmail.BCC="someone@example.com";objEmail.Subject="Teste-mailmessage";objEmail.Visible=true;objEmail=null;}

CaptionProperty(Index)

ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaCaptionpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheCaptionproperty.

CaptionpropertyasitappliestotheSignedDataBlockobject.

CaptionpropertyasitappliestotheWindowobject.

CaptionProperty(SignedDataBlockObject)

Aread-onlypropertythatreturnsthefriendlynameoftheSignedDataBlockobject.

expression.Caption

expressionRequired.AnexpressionthatreturnsareferencetotheSignedDataBlockobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

CaptionProperty(WindowObject)

Aread/writepropertythatreturnsorsetsthecaptiontextforthewindowrepresentedbytheWindowobject.

expression.Caption

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

RemarksWhensettingthecaptiontextforawindow,thecaptionwillalwaysbefollowedby"-MicrosoftOfficeInfoPath2003".

ExampleInthefollowingexample,theCaptionpropertyisusedtosetthecaptiontextoftheactivewindow.

varstrCaption="MyCaption";

Application.ActiveWindow.Caption=strCaption;

CCProperty(EmailAdapterObject)

Returnsorsetsastringthatrepresentsthecarboncopy(CC)recipientsforthee-mailmessageassociatedwithanEmailAdapterobject.

expression.CC

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThevaluemustbeasemicolon-delimitedstringthatcanberesolvedintoalistofvalide-mailaddressesbytheuser'se-mailclient.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThisexampleshowshowtousetheCCpropertyofaninstanceoftheEmailAdapterobjecttochangetheCCrecipientsbeforetheEmailAdapterobjectissubmitted:

objEmailAdapter.CC=oEmailAdapter.CC+";newUser@example.com";

CCProperty(MailEnvelopeObject)

Setsorretrievesastringcontainingthecarboncopy(CC)valueusedintheMailEnvelopeobjectthatisassociatedwithaWindowobject.

expression.CC

expressionRequired.AnexpressionthatreturnsareferencetotheMailEnvelopeobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThevaluessetfortheCCpropertyshouldbeastringofvalide-mailaddresses.Youcanspecifymultiplee-mailaddressesbyusing";"betweeneachofthem,asshowninthefollowingexample:

objEmail.CC="someone@example.com;someone@example.com"

ExampleInthefollowingexample,theCCpropertyoftheMailEnvelopeobjectisusedtosettheCCvalueofacustome-mailmessage:

functionCreateMailEnvelope::OnClick(eventObj){varobjEmail;

objEmail=Application.ActiveWindow.MailEnvelope;objEmail.To="someone@example.com";objEmail.CC="someone@example.com";objEmail.BCC="someone@example.com";objEmail.Subject="Teste-mailmessage";objEmail.Visible=true;objEmail=null;}

CCPropety(Index)

TheCCpropertysetsorretrievesastringcontainingthecarboncopy(CC)valueforane-mailmessage.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaCCpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheCCproperty.

CCpropertyasitappliestotheEmailAdapterobject.

CCpropertyasitappliestotheMailEnvelopeobject.

ShowAll

CertificateProperty

Aread-onlypropertythatreturnstheCertificateobjectfortheX.509digitalcertificatethatwasusedtosignaformorasetofsigneddatainaform.

expression.Certificate

expressionRequired.AnexpressionthatreturnsaSignatureobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

CommandProperty

SetsorretrievestheSQLcommandstringtextforanADOAdapterobject.

expression.Command

expressionRequired.AnexpressionthatreturnsareferencetotheADOAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheCommandpropertyoftheADOAdapterobjectcontainstheSQLcommandtextthatisusedbytheADOdataadaptertosubmitdatatoandretrievedatafromanActiveXDataObjects/OLEDBexternaldatasource.

NoteTheADOAdapterobjectislimitedtoworkonlywithMicrosoftSQLServerandMicrosoftAccessdatabases.

ExampleInthefollowingexample,theCommandpropertyoftheADOAdapterobjectisusedtodisplaytheSQLcommandtextoftheADOdataadapterinamessagebox:

varobjADOAdapter;

objADOAdapter=XDocument.DataObjects("CityList").QueryAdapter;XDocument.UI.Alert("SQLcommandtext:"+objADOAdapter.Command

CommandBarsProperty

Aread-onlypropertythatreturnsareferencetotheMicrosoftOfficeCommandBarscollectionobjectcontainedinthewindowthatisassociatedwiththeWindowobject.

expression.CommandBars

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksTheCommandBarspropertycanbeusedonlybyfullytrustedforms.Ifusedbyaformthatisnotfullytrusted,theCommandBarspropertywillreturna"permissiondenied"error.

ExampleInthefollowingexample,theCommandBarspropertyoftheWindowobjectisusedtosetareferencetotheCommandBarscollectionobject:

varobjCommandBars;objCommandBars=Application.ActiveWindow.CommandBars;

ShowAll

CommentProperty

Aread-onlypropertythatreturnsthetextcommentthatwasaddedtothedigitalsignatureassociatedwithaformorasectionofaform.

expression.Comment

expressionRequired.AnexpressionthatreturnsaSignatureobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ConditionNameProperty

Aread-onlypropertythatreturnsastringvaluecontainingthenameoftheErrorobject.

expression.ConditionName

expressionRequired.AnexpressionthatreturnsareferencetotheErrorobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheConditionNamepropertyisusedonlyforcustomerrors;itisnotusedforschemavalidation–generatedorsystem-generatederrors.Ifthetypeoferrorisschemavalidationgeneratedorsystemgenerated,theConditionNamepropertywillreturnnull.

ExampleInthefollowingexample,theConditionNamepropertyoftheErrorobjectisusedtodisplaythenameofacustomerrorinamessagebox:

varobjError;

objError=XDocument.Errors(0);XDocument.UI.Alert("Errorname:"+objError.ConditionName);

ShowAll

ConnectionProperty

SetsorretrievestheconnectionstringusedforanADOAdapterobject.

expression.Connection

expressionRequired.AnexpressionthatreturnsareferencetotheADOAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheConnectionpropertyoftheADOAdapterobjectcontainstheconnectionstringthatisusedbytheADOdataadaptertoconnecttoanActiveXDataObjects/OLEDBexternaldatasource.

NoteTheADOAdapterobjectislimitedtoworkonlywithMicrosoftSQLServerandMicrosoftAccessdatabases.

ExampleInthefollowingexample,theConnectionpropertyoftheADOAdapterobjectisusedtodisplaytheconnectionstringoftheADOdataadapterinamessagebox:

varobjADOAdapter;

objADOAdapter=XDocument.DataObjects("CityList").QueryAdapter;XDocument.UI.Alert("Connectionstring:"+objADOAdapter.Connection

ContextProperty

Aread-onlypropertythatreturnsareferencetotheXMLDocumentObjectModel(DOM)nodethatisthenewcontextnodeprovidedbytheDocContextChangeEventobject.

expression.Context

expressionRequired.AnexpressionthatreturnsareferencetotheDocContextChangeEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

CountProperty(DataAdaptersCollection)

Aread-onlypropertythatreturnsthenumberofdataadaptersintheDataAdaptersCollectioncollection.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetoaDataAdaptersCollectioncollection.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

CountProperty(DataObjectsCollection)

Aread-onlypropertythatreturnsacountofthenumberofDataObjectobjectscontainedintheDataObjectscollection.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetotheDataObjectscollection.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheCountpropertyreturnsalongintegervalue.

ExampleInthefollowingexample,theCountpropertyisusedwithinaMicrosoftJScriptforlooptoiteratethroughthecollectionofDataObjectobjectsanddisplayamessageboxindicatingthenameofeachDataObjectobjectassociatedwiththeform:

for(i=0;i<XDocument.DataObjects.Count;i++){XDocument.UI.Alert("DataObjectname:"+XDocument.DataObjects(i).Name);}

ShowAll

CountProperty(ErrorsCollection)

Aread-onlypropertythatreturnsacountofthenumberofErrorobjectscontainedintheErrorscollection.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetotheErrorscollection.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheCountpropertyreturnsalongintegervalue.

ExampleInthefollowingexample,theCountpropertyisusedwithinaMicrosoftJScriptforlooptoiteratethroughthecollectionofErrorobjectsanddisplayamessageboxindicatingtheshorterrormessageofeacherror:

for(i=0;i<XDocument.Errors.Count;i++){XDocument.UI.Alert("Errormessage:"+XDocument.Errors(i).ShortErrorMessage);}

CountProperty(Index)

TheCountpropertyreturnsacountofthenumberofobjectscontainedinacollection.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickaCountpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheCountproperty.

CountpropertyasitappliestotheDataAdapterscollection.

CountpropertyasitappliestotheDataObjectscollection.

CountpropertyasitappliestotheErrorscollection.

CountpropertyasitappliestotheMergeEventobject.

CountpropertyasitappliestotheSignaturescollection.

CountpropertyasitappliestotheSignedDataBlockscollection.

CountpropertyasitappliestotheTaskPanescollection.

CountpropertyasitappliestotheViewInfoscollection.

CountpropertyasitappliestotheWindowscollection.

CountpropertyasitappliestotheXDocumentscollection.

CountpropertyasitappliestotheXMLNodescollection.

CountProperty(MergeEventObject)

Aread-onlypropertythatreturnsacountofthenumberofformsbeingmergedinamergingoperation.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetoaMergeEventobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheCountpropertycanbeusedincombinationwiththeIndexpropertyoftheMergeEventobjecttodeterminewhenthelastformwasmerged.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThisexampleshowshowtousetheIndexpropertyalongwiththeCountpropertyofaninstanceoftheMergeEventobjecttodetermineifthecurrentformisthelastformbeingmerged:

varfLast=eventObj.Index+1==eventObj.Count;

CountProperty(SignaturesCollection)

Aread-onlypropertythatreturnsthenumberofSignatureobjectsintheSignaturescollection.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetoaSignaturescollection.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

CountProperty(SignedDataBlocksCollection)

Aread-onlypropertythatreturnsthenumberofSignedDataBlockobjectsintheformtemplate.

expression.Count

expressionRequired.AnexpressionthatreturnsaSignedDataBlockscollection.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

CountProperty(TaskPanesCollection)

Aread-onlypropertythatreturnsacountofthenumberofTaskPaneobjectscontainedintheTaskPanescollection.

expression.Count

expressionRequired.ReturnsareferencetotheTaskPanescollection.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheCountpropertyreturnsalongintegervalue.

ExampleInthefollowingexample,theCountpropertyisusedwithinaMicrosoftJScriptforlooptoiteratethroughthecollectionofTaskPaneobjects.ItcheckstheVisiblepropertyofeachTaskPaneobjectandifitisTrue,setsittoFalse.

varobjTaskPanes;

objTaskPanes=XDocument.View.Window.TaskPanes;

for(i=0;i<objTaskPanes.Count;i++){if(objTaskPanes(i).Visible=true)objTaskPanes(i).Visible=false;}

ShowAll

CountProperty(ViewInfosCollection)

Aread-onlypropertythatreturnsacountofthenumberofViewInfoobjectscontainedintheViewInfoscollection.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetotheViewInfoscollection.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheCountpropertyreturnsalongintegervalue.

ExampleInthefollowingexample,theCountpropertyisusedwithinaMicrosoftJScriptforlooptoiteratethroughthecollectionofViewInfoobjectsanddisplayamessageboxindicatingthenameofeachviewimplementedintheform:

for(i=0;i<XDocument.ViewInfos.Count;i++){XDocument.UI.Alert("Viewname:"+XDocument.ViewInfos(i).Name);}

ShowAll

CountProperty(WindowsCollection)

Aread-onlypropertythatreturnsacountofthenumberofWindowobjectscontainedintheWindowscollection.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetotheWindowscollection.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheCountpropertyreturnsalongintegervalue.

ExampleInthefollowingexample,theCountpropertyisusedwithinaMicrosoftJScriptforlooptoiteratethroughthecollectionofWindowobjectsanddisplayamessageboxindicatingthewindowtypevalue:

for(i=0;i<Application.Windows.Count;i++){XDocument.UI.Alert("Windowtype:"+Application.Windows(i).Type);}

ShowAll

CountProperty(XDocumentsCollection)

Aread-onlypropertythatreturnsacountofthenumberofXDocumentobjectscontainedintheXDocumentscollection.

expression.Count

expressionRequired.AnexpressionthatreturnsareferencetotheXDocumentscollection.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheCountpropertyreturnsalongintegervalue.

ExampleInthefollowingexample,theCountpropertyoftheXDocumentscollectionisusedwithinaJScriptforlooptoiteratethroughthecollectionofXDocumentobjectsanddisplayamessageboxindicatingtheUniformResourceIdentifier(URI)locationforeachcurrentlyopenform:

for(i=0;i<Application.XDocuments.Count;i++){XDocument.UI.Alert("XDocumentURI:"+Application.XDocuments(i).URI);}

ShowAll

CountProperty(XMLNodesCollection)

Aread-onlypropertythatreturnsacountofthenumberofXMLDocumentObjectModel(DOM)nodeobjectscontainedintheXMLNodescollection.

expression.Count

expressionRequired.ReturnsareferencetotheXMLNodescollection.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheCountpropertyreturnsalongintegervalue.

ExampleInthefollowingexample,theCountpropertyisusedwithinaMicrosoftJScriptforlooptoiteratethroughthecollectionofXMLDOMnodeobjectsreturnedbytheGetSelectedNodesmethodoftheViewobjectanddisplayamessageboxindicatingthenameofeachXMLDOMnodethatiscontainedintheXMLNodescollection:

varobjXMLNodes;

objXMLNodes=XDocument.View.GetSelectedNodes();

for(i=0;i<objXMLNodes.Count;i++){XDocument.UI.Alert("XMLDOMnodename:"+objXMLNodes(i).nodeName);}

DataAdaptersProperty

Aread-onlypropertythatreturnsareferencetotheDataAdapterscollectionthatisassociatedwithaMicrosoftOfficeInfoPath2003form.

expression.DataAdapters

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theDataAdapterspropertyoftheXDocumentobjectisusedtosetareferencetoadataadaptercalled"Mainquery":

varobjDataAdapter;objDataAdapter=XDocument.DataAdapters("Mainquery");

ShowAll

DataObjectsProperty

Aread-onlypropertythatreturnsareferencetotheDataObjectscollectionthatisassociatedwithaMicrosoftOfficeInfoPath2003form.

expression.DataObjects

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheDataObjectscollectionprovidesprogrammaticaccesstoaform'ssecondarydatasources.EachsecondarydatasourceiscontainedinaDataObjectobjectwithintheDataObjectscollection.

ExampleInthefollowingexample,theDataObjectspropertyoftheXDocumentobjectisusedtosetareferencetotheCityListsecondarydatasource:

varobjDataObject;objDataObject=XDocument.DataObjects("CityList");

DateProperty

Aread-onlypropertythatreturnsareferencetotheDateobject.

expression.Date

expressionRequired.AnexpressionthatreturnsareferencetotheUtilobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksYoucanaccessallofthemethodsthattheDateobjectprovidesbyusingtheDateproperty.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

DetailedErrorMessageProperty

SetsorretrievesthestringvaluecontainingthedetailederrormessageofanErrorobject.

expression.DetailedErrorMessage

expressionRequired.AnexpressionthatreturnsareferencetotheErrorobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThedetailederrormessageisthelongererrormessagethatuserscanchoosetoviewwhendatavalidationfailsintheirforms.

ExampleInthefollowingexample,theDetailedErrorMessagepropertyoftheErrorobjectisusedtodisplaythedetailedmessageofanerrorinamessagebox:

varobjError;

objError=XDocument.Errors(0);XDocument.UI.Alert("Errorname:"+objError.DetailedErrorMessage

DocumentVersionProperty

Aread-onlypropertythatreturnsastringcontainingtheversionnumberofaMicrosoftOfficeInfoPath2003form.

expression.DocumentVersion

expressionRequired.AnexpressionthatreturnsareferencetotheVersionUpgradeEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThispropertycanbeusedonlyduringtheOnVersionUpgradeevent.

ExampleInthefollowingexample,theDocumentVersionpropertyoftheVersionUpgradeEventobjectisusedtodisplaytheversionnumberofanInfoPathforminamessagebox:

functionXDocument::OnVersionUpgrade(eventObj){XDocument.UI.Alert("Theformversion:"+eventObj.DocumentVersion"\nTheformtemplateversion:"+eventObj.SolutionVersion);eventObj.ReturnStatus=true;}

ShowAll

DOMProperty(DataObjectObject)

Aread-onlypropertythatreturnsareferencetoanXMLDocumentObjectModel(DOM)thatisassociatedwithaDataObjectobject.

expression.DOM

expressionRequired.AnexpressionthatreturnsareferencetotheDataObjectobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheDOMpropertyallowsyoutoprogrammaticallyaccessandmanipulatethesourceXMLofasecondarydatasourcethatisrepresentedbytheDataObjectobject.AfteryouhavesetareferencetotheXMLDOM,whichcontainsthesourceXMLdataofasecondarydatasource,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

ExampleInthefollowingexample,theDOMpropertyoftheDataObjectobjectisusedtoreturnallofthecontentsofaform'ssecondarydatasourceusingthexmlpropertyoftheXMLDOM:

varstrXML;strXML=XDocument.DataObjects("CityList").DOM.xml;

ShowAll

DOMProperty(Index)

TheDOMpropertyreturnsareferencetotheDocumentObjectModel(DOM).ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaDOMpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheDOMproperty.

DOMpropertyasitappliestotheDataObjectobject.

DOMpropertyasitappliestotheMergeEventobject.

DOMpropertyasitappliestotheSolutionobject.

DOMpropertyasitappliestotheXDocumentobject.

ShowAll

DOMProperty(MergeEventObject)

Aread-onlypropertythatreturnsareferencetoaform'sunderlyingXMLdocumentasanXMLDocumentObjectModel(DOM)constructionforthecurrentforminvolvedinamergingoperation.

expression.DOM

expressionRequired.AnexpressionthatreturnsareferencetoaMergeEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheDOMpropertyallowsyoutoaccessandmanipulatethesourceXMLofaformprogrammatically.AfteryouhavesetareferencetotheXMLDOM,whichcontainsthesourceXMLdataofaform,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

NoteTolearnmoreabouttheXMLDOMandthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

ExampleThisexampleshowshowtousetheDOMpropertyofaninstanceoftheMergeEventobjecttomergethedataintothecurrentform:

XDocument.ImportDOM(eventObj.DOM);

ShowAll

DOMProperty(SolutionObject)

Aread-onlypropertythatreturnsareferencetoanXMLDocumentObjectModel(DOM)thatcontainsthesourceXMLoftheformdefinition(.xsf)file.

expression.DOM

expressionRequired.AnexpressionthatreturnsareferencetoaSolutionobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheDOMpropertyoftheSolutionobjectallowsyoutoprogrammaticallyaccessandmanipulatethesourceXMLofthe.xsffile.AfteryouhavesetareferencetotheXMLDOM,whichcontainsthesourceXMLdataofthe.xsffile,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

ExampleInthefollowingexample,theDOMpropertyoftheSolutionobjectisusedtoreturnallofthecontentsofaform's.xsffileusingthexmlpropertyoftheXMLDOM:

varstrXML;

strXML=XDocument.Solution.DOM.xml;

ShowAll

DOMProperty(XDocumentObject)

Aread-onlypropertythatreturnsareferencetoaform'sunderlyingXMLdocumentintheformofanXMLDocumentObjectModel(DOM).

expression.DOM

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksAkeypropertyoftheXDocumentobject,theDOMpropertyallowsyoutoprogrammaticallyaccessandmanipulatethesourceXMLofaform.AfteryouhavesetareferencetotheXMLDOM,whichcontainsthesourceXMLdataofaform,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

ExampleInthefollowingexample,theDOMpropertyoftheXDocumentobjectisusedtoreturnallofthecontentsofaform'sunderlyingXMLdocumentusingthexmlpropertyoftheXMLDOM:

varstrXML;strXML=XDocument.DOM.xml;

ErrorCodeProperty

SetsorretrievestheerrorcodeofanErrorobject.

expression.ErrorCode

expressionRequired.AnexpressionthatreturnsareferencetotheErrorobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheErrorCodepropertyisimplementedasalonginteger.

ExampleInthefollowingexample,theErrorCodepropertyoftheErrorobjectisusedtodisplaytheerrorcodenumberofanerrorinamessagebox:

varobjError;

objError=XDocument.Errors(0);XDocument.UI.Alert("Errorname:"+objError.ErrorCode);

ErrorsProperty

Aread-onlypropertythatreturnsareferencetotheErrorscollectionthatisassociatedwithaMicrosoftOfficeInfoPath2003form.

expression.Errors

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheErrorscollectionisassociatedwithaform'sunderlyingXMLdocumentsothatwhenanerroroccurs,itoccurswithintheXMLdocument.AfteryousetareferencetotheErrorscollection,youcanaccessallofitspropertiesandmethodsformanagingtheerrorswithinanInfoPathform.

ExampleInthefollowingexample,theErrorspropertyoftheXDocumentobjectisusedtoreturnthecountofthenumberorerrorsandthendisplaythatvalueinamessagebox:

varintErrors;

intErrors=XDocument.Errors.Count;XDocument.UI.Alert("Totalnumberoferrors:"+intErrors);

ShowAll

ErrorsLocationProperty

Aread/writepropertythatspecifiestheXMLDocumentObjectModel(DOM)nodeunderwhichtheadapterwillcopyreturnederrorsasXML.

expression.ErrorsLocation

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheinitialvalueoftheErrorsLocationpropertyisnull.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

ExpirationDateProperty

Aread-onlypropertythatreturnstheexpirationdateofadigitalcertificateinthelocalized'SHORTDATE'format.

expression.ExpirationDate

expressionRequired.AnexpressionthatreturnsaCertificateobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

ExtensionProperty

Aread-onlypropertythatreturnsareferencetotheglobalscriptingobject,whichexposesthefunctionsandglobalvariablescontainedinaMicrosoftOfficeInfoPath2003form'sprimaryscriptingfile.

expression.Extension

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheExtensionpropertyfacilitatesusingthefunctionsandglobalvariablesimplementedinanInfoPathform'sscriptingfile.Usually,itisusedfromacustomtaskpane,fromacustomdialogbox,orintheXSLTransformation(XSLT)ofaviewwheredirectaccesstothefunctionsandvariablesmaybeneeded.

Forexample,ifyouweretodeclareaglobalvariableinyourscriptingfilesuchasthefollowing,

varconstCity="Redmond";

YoucouldaccessthatvalueinthecodeofyourcustomtaskpaneordialogboxbyusingtheExtensionproperty,asshownhere:

XDocument.Extension.constCity;

TousetheExtensionpropertywithinacustomtaskpane,youmustfirstsetareferencetotheXDocumentobjectbyusingtheDynamicHTML(DHTML)externalpropertyoftheDHTMLwindowobject,asshowninthisexample:

objXDocument=window.external.XDocument;

ExampleInthefollowingexample,theExtensionpropertyoftheXDocumentobjectisusedtoaccessacustomfunction:

objXDocument=window.external.XDocument;objXDocument.Extension.MyCustomFunction();

FileNameProperty(DAVAdapterObject)

ReturnsorsetsastringthatrepresentsthefilenamethatthecurrentMicrosoftOfficeInfoPath2003formwillbegivenwhentheformissubmittedbytheDAVAdapterobject.

expression.FileName

expressionRequired.AnexpressionthatreturnsareferencetotheDAVAdapterobject

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

RemarksThe".xml"filenameextensionwillbeappendedtothestringifitisnotalreadyincluded.IftheFileNamepropertyissettonull,theformisgiventhename"Form.xml"whenitissubmitted.

ExampleThefollowingexampleshowshowtousetheFileNamepropertyofaninstanceoftheDAVAdapterobjecttosetthefilenameofthesubmittedform:

objDAVAdapter.FileName=strName+"–"+strDate+".xml";

FileNameProperty(Index)

ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickaFileNamepropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheFileNameproperty.

FileNamepropertyasitappliestotheDAVAdapterobject.

FileNamepropertyasitappliestotheSaveEventobject.

FileNameProperty(SaveEventObject)

Aread-onlypropertythatreturnsastringthatrepresentsthefilenametobeusedintheOnSaveRequestevent.

expression.FileName

expressionRequired.AnexpressionthatreturnsareferencetoaSaveEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIftheIsSaveAspropertyoftheSaveEventobjectistrue,andasaveoperationhasnotyetoccurred,theFileNamepropertyreturnsanemptystring.IftheIsSaveAspropertyistrueandasaveoperationhasalreadyoccurred,thevaluereturnedbytheFileNamepropertyisthefilenameunderwhichtheformwassaved.IftheSaveEventobjectrepresentsasaveoperation(thatis,theIsSaveAspropertyoftheSaveEventobjectisfalse),theFileNamepropertyreturnsthesamevalueastheURIpropertyoftheXDocumentobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theFileNamepropertyoftheSaveEventobjectisusedinanotificationtotheuserbeforeasaveoperation:

XDocument.UI.Alert("Youareabouttosavethefollowingfile:"+eventObj.

ShowAll

FileURLProperty

SetsorretrievestheUniformResourceLocator(URL)oftheXMLfilethatisassociatedwiththeXMLFileAdapterobject.

expression.FileURL

expressionRequired.AnexpressionthatreturnsareferencetotheXMLFileAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheFileURLpropertysetsandretrievesastringvalue.

ExampleInthefollowingexample,theFileURLpropertyoftheXMLFileAdapterobject,accessedthroughtheQueryAdapterpropertyoftheXDocumentobject,isusedtodisplaytheURLoftheXMLfileinamessagebox:

XDocument.UI.Alert("XMLfileURL:"+XDocument.QueryAdapter.

FolderURLProperty

ApropertythatreturnsorsetsastringthatrepresentstheUniformResourceLocator(URL)towhichtheformwillbesubmittedbytheDAVAdapterobject.

expression.FolderURL

expressionRequired.AnexpressionthatreturnsareferencetotheDAVAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheSubmitmethodoftheDAVAdapterobjectwillfailifthevalueoftheFolderURLpropertydoesnotbeginwitheitherthe"http:"orthe"https:"prefix.TheSubmitmethodwillalsofailifthesitespecifiedbytheFolderURLpropertyisnotavailable,oriftheURLisnotinthesamesecuritydomainastheformtemplate.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThisexampleshowshowtousetheFolderURLpropertyofaninstanceoftheDavAdapterobjecttochangethefoldertowhichtheformdatawillbesubmitted:

objDavAdapter.FolderURL=objDavAdapter.FolderURL+"data/";

HeightProperty

Aread/writepropertyoftypelongintegerthatspecifiestheheightofthethewindowrepresentedbytheWindowobject,measuredinpoints.

expression.Height

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

RemarksThispropertywillreturnanerrorifitissetonawindowthatisminimizedormaximized.

Thispropertycan'tbesettoavaluethatislargerthanthevaluereturnedbytheUsableHeightproperty.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

HTMLDocumentProperty

ReturnsareferencetoanHTMLdocumentobjectoftheMicrosoftOfficeInfoPath2003customtaskpane.

expression.HTMLDocument

expressionRequired.AnexpressionthatreturnsareferencetotheHTMLdocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheHTMLDocumentpropertyoftheHTMLTaskPaneobjectisoneofthepropertiesinheritedbytheTaskPaneobjectwhenthetypeofthetaskpaneis0,whichmeansthatitisthecustomtaskpane.

UsingtheHTMLDocumentmethod,youcancallscriptingfunctionscontainedintheHTMLcodeofthetaskpanefromtheprimaryscriptingfileofaform,andyoucanalsodirectlymanipulatetheHTMLcodeofthetaskpaneusinganyofthepropertiesandmethodsthattheHTMLdocumentobjectprovides.

ExampleInthefollowingexample,theHTMLDocumentpropertyoftheHTMLTaskPaneobjectisusedtosetareferencetotheHTMLdocumentobjectofthecustomtaskpane.ThenthecodecallstheTaskPaneSwitchViewcustomfunctionthatisdefinedintheHTMLcodeofthecustomtaskpane.

varobjHTMLDoc;

objHTMLDoc=XDocument.View.Window.TaskPanes(0).HTMLDocumentobjHTMLDoc.parentWindow.TaskPaneSwitchView();

ShowAll

HTMLWindowProperty

ReturnsareferencetoanHTMLwindowobjectoftheMicrosoftOfficeInfoPath2003customtaskpane.

expression.HTMLWindow

expressionRequired.AnexpressionthatreturnsareferencetotheHTMLwindowobject.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksTheHTMLWindowpropertyoftheHTMLTaskPaneobjectisoneofthepropertiesinheritedbytheTaskPaneobjectwhenthetypeofthetaskpaneis0,whichmeansthatitisthecustomtaskpane.

UsingtheHTMLWindowproperty,youcancallscriptingfunctionscontainedintheHTMLcodeofthetaskpanefromtheprimaryscriptingfileofaform,andyoucanalsodirectlymanipulatetheHTMLcodeofthetaskpaneusinganyofthepropertiesandmethodsthattheHTMLdocumentobjectprovides.

NoteTheHTMLWindowpropertyprovidesthesamefunctionalityastheHTMLDocumentproperty,butitisonlyavailablewhenusingfullytrustedforms.Iftheformisnotfullytrusted,youcanusetheHTMLDocumentproperty.

ExampleInthefollowingexample,theHTMLWindowpropertyoftheHTMLTaskPaneobjectisusedtosetareferencetotheHTMLwindowobjectofthecustomtaskpaneofafullytrustedform.ThenthecodecallstheTaskPaneSwitchViewcustomfunctionthatisdefinedintheHTMLcodeofthecustomtaskpane.

varobjHTMLDoc;

objHTMLDoc=XDocument.View.Window.TaskPanes(0).HTMLWindowobjHTMLDoc.parentWindow.TaskPaneSwitchView();

IndexProperty

Aread-onlypropertythatreturnsthe0-basedindexoftheformthatiscurrentlybeingmerged.

expression.Index

expressionRequired.AnexpressionthatreturnsareferencetoaMergeEventobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksThevalueoftheIndexpropertyoftheMergeEventobjectincreasesfrom0toCount-1foreachmergeeventthatoccurswhenformsaremerged.

WhenusedincombinationwiththeCountpropertyoftheMergeEventobject,theIndexpropertycanbeusedtodeterminewhenthelastformhasbeenmerged.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThisexampleshowshowtousetheIndexpropertyalongwiththeCountpropertyofaninstanceoftheMergeEventobjecttodetermineifthecurrentformisthelastformtobemerged:

varfLast=eventObj.Index+1==eventObj.Count;

ShowAll

InputProperty

SetsorretrievesastringvaluethatcontainsthesourceXMLoftheinputelementcontainedintheformdefinition(.xsf)file.

expression.Input

expressionRequired.AnexpressionthatreturnsareferencetotheWebServiceAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheinputelementofthe.xsffilecontainsinformationaboutthepartsoftheinputSimpleObjectAccessProtocol(SOAP)messagethatareusedtocommunicatewiththeWebservice.SpecificpartsintheSOAPmessagearereplacedbyMicrosoftOfficeInfoPath2003withdatafromwithintheform.ItisusedwhenasecondarydatasourceispopulatedwithdatafromaWebservice,andInfoPathneedstopassargumentstotheWebservicetoretrievethedatathatitprovides.

ExampleInthefollowingexample,theInputpropertyoftheWebServiceAdapterobjectisusedtodisplaytheinputstringoftheWebservicedataadapterinamessagebox:

varobjWSAdapter;

objWSAdapter=XDocument.DataObjects("WebCityList").QueryAdapter;XDocument.UI.Alert("Inputstring:"+objWSAdapter.Input);

IntroProperty

Returnsorsetsastringthatrepresentstheintroductioninthebodyofthee-mailmessageforanEmailAdapterobject.

expression.Intro

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThisexampleshowshowtousetheIntropropertyofaninstanceoftheEmailAdapterobjecttochangetheintroductionofthebodyofthee-mailmessagebeforetheEmailAdapterissubmitted:

objEmailAdapter.Intro="Hereismystatusreportfortheweek.";

IsCancelledProperty

Aread/writepropertythatprovidesadditionalinformationforuseintheOnSaveRequesteventinconjunctionwiththeReturnStatusproperty.

expression.IsCancelled

expressionRequired.AnexpressionthatreturnsareferencetoaSaveEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksWhenclosingInfoPath,theuserispromptedtosavethedocumentiftheIsDirtypropertyoftheXDocumentobjectistrue.IftheIsCancelledpropertyistrue,InfoPathwillbepreventedfromclosingifthesaveoperationfails(thatis,theReturnStatuspropertyisfalse).

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theIsCancelledpropertyoftheSaveEventobjectisusedtoensurethatthedocumentdoesnotcloseifthesaveoperationwascancelled:

eventObj.IsCancelled=eventObj.PerformSaveOperation();if(eventObj.IsCancelled)return;eventObj.ReturnStatus=true;

IsDefaultProperty

SetsorretrievesaBooleanvaluethatindicateswhethertheviewisdefinedasthedefaultviewinaMicrosoftOfficeInfoPath2003form.

expression.IsDefault

expressionRequired.AnexpressionthatreturnsareferencetotheViewInfoobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheIsDefaultpropertyoftheViewInfoobjectcanbeusedtodeterminewhetheraviewisthedefaultview,anditcanbeusedtoprogrammaticallychangethedefaultviewbeforethefirstviewisloaded.

ExampleInthefollowingexample,theIsDefaultpropertyisusedtomakethesecondviewcontainedintheViewInfoscollectionthedefaultview:

XDocument.ViewInfos(1).IsDefault=true;

IsDirtyProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetherthedatainaMicrosoftOfficeInfoPath2003formhasbeenmodifiedsinceitwaslastsaved.

expression.IsDirty

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIftheIsDirtypropertyisTrue,dataintheform'sunderlyingXMLdocumenthasbeenchangedsinceitwaslastsaved.IfFalse,nochangeshaveoccurred.

NoteChangesthatoccurduringtheOnLoadeventwillnotresultintheIsDirtypropertybeingsettoTrue.

ExampleInthefollowingexample,theIsDirtypropertyoftheXDocumentobjectisusedtodeterminewhetherdataintheformhasbeenchanged:

if(XDocument.IsDirty)XDocument.UI.Alert("Datahasbeenchanged.");elseXDocument.UI.Alert("Datahasnotbeenchanged.");

ShowAll

IsDOMReadOnlyProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetherthedataintheunderlyingXMLdocumentofaMicrosoftOfficeInfoPath2003formhasbeenplacedinaread-onlystate.

expression.IsDOMReadOnly

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIftheIsDOMReadOnlypropertyisTrue,dataintheform'sunderlyingXMLdocumentisinaread-onlystateandcannotbechanged.IfFalse,thedataintheform'sunderlyingXMLdocumentcanbechanged.

Todeterminewhethertheformhasbeenplacedinaread-onlystate,usetheIsReadOnlypropertyoftheXDocumentobject.

Thedatainaform'sXMLdocumentwillbeplacedinaread-onlystateinthefollowingscenarios:

Theformisdigitallysigned

TheformisinReducedFunctionalityMode(RFM)mode

DuringtheOnBeforeChangeevent

DuringtheOnValidateevent

Duringanundoorredooperation

ExampleInthefollowingexample,theIsDOMReadOnlypropertyoftheXDocumentobjectisusedtodeterminewhetherdataintheform'sunderlyingXMLdocumenthasbeenplacedinaread-onlystate.Ifithas,areturnstatementisusedtoexittheeventhandler.

functionmsoxd__item::OnAfterChange(objEvent){

//DeterminewhethertheXMLDOMisread-only.if(XDocument.IsDOMReadOnly)return;

//Continuenormalprocessing...

}

IsNewProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetheranewlycreatedMicrosoftOfficeInfoPath2003formhasbeensaved.

expression.IsNew

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIftheIsNewpropertyisTrue,dataintheform'sunderlyingXMLdocumenthasnotbeensavedsincetheformwasinitiallycreated.IfFalse,thedatainthenewform'sunderlyingXMLdocumenthasbeensaved.

ExampleInthefollowingexample,theIsNewpropertyoftheXDocumentobjectisusedtodeterminewhetherthedatainanewformhasbeensaved:

if(XDocument.IsNew)XDocument.UI.Alert("Pleasesaveyourform.");elsereturn;

IsReadOnlyProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetheraMicrosoftOfficeInfoPath2003formisinread-onlymode.

expression.IsReadOnly

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIftheIsReadOnlypropertyisTrue,theformhasbeenplacedinaread-onlystate.Changescanstillbemadetotheform,butitcannotbesavedusingasaveoperation,itmustbesavedusingasave-asoperation.

Todeterminewhethertheform'sunderlyingXMLdocumenthasbeenplacedinaread-onlystate,usetheIsDOMReadOnlypropertyoftheXDocumentobject.

ExampleInthefollowingexample,theIsReadOnlypropertyoftheXDocumentobjectisusedtodeterminewhethertheformisinaread-onlystate:

if(XDocument.IsReadOnly)XDocument.UI.Alert("Theformcannotbemodified.");elsereturn;

IsRecoveredProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetheraMicrosoftOfficeInfoPath2003formwaslastsavedbyanAutoRecoversaveoperation.

expression.IsRecovered

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingexampleshowshowtousetheIsRecoveredpropertytoindicate,whentheformisopened,whethertheformwaslastsavedbyanAutoRecoversaveoperation:

functionXDocument::OnLoad(eventObj){XDocument.UI.Alert("LastsavedbyanAutoRecoversaveoperation:"+XDocument.}

IsSaveAsProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetherthePerformSaveOperationmethodoftheSaveEventobjectwillbeperformedasa"save"operationorasa"saveas"operation.

expression.IsSaveAs

expressionRequired.AnexpressionthatreturnsareferencetoaSaveEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheIsSaveAspropertyreturnstruewhentheeventwastriggeredbyacalltotheSaveAsmethod,orbyacalltotheSavemethodwhenthedocumentisnew,orbyacalltoeithermethodwhenthedocumentisread-only.Otherwise,theIsSaveAspropertyreturnsFalse.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theIsSaveAspropertyoftheSaveEventobjectisusedtodetermineiftheuserwillbepresentedwithaSaveAsdialogbox;otherwise,itwillinformtheuserthattheformwillsimplybesaved.

if(!eventObj.IsSaveAs){XDocument.UI.Alert(“Abouttosavethisform.”);}eventObj.PerformSaveOperation();

ShowAll

IsSignedProperty

Aread-onlypropertythatreturnsaBooleanvaluethatindicateswhetheraMicrosoftOfficeInfoPath2003formhasbeendigitallysignedusingdigitalsignatures.

expression.IsSigned

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIftheIsSignedpropertyisTrue,theformhasbeendigitallysigned.IfFalse,theformhasnotbeendigitallysigned.

InfoPathusesXMLSignaturestodigitallysignforms.

NoteIfaformhasbeendigitallysigned,itsunderlyingXMLdocumentisplacedinaread-onlystate.

ExampleInthefollowingexample,theIsSignedpropertyoftheXDocumentobjectisusedtodeterminewhetheraformhasbeendigitallysigned:

if(XDocument.IsSigned)XDocument.UI.Alert("Thisformcontainsdigitalsignatures.");elsereturn;

ShowAll

IssuedByProperty

Aread-onlypropertythatreturnstheissuerofthedigitalcertificate.

expression.IssuedBy

expressionRequired.AnexpressionthatreturnsaCertificateobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

IssuedToProperty

Aread-onlypropertythatreturnsastringrepresentingtowhomthedigitalcertificateisissued.

expression.IssuedTo

expressionRequired.AnexpressionthatreturnsaCertificateobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

IsUndoRedoProperty(DataDOMEventObject)

Aread-onlypropertythatreturnsaBooleanvalueindicatingwhetherthedatavalidationeventoccursduringanundooperationoraredooperation.

expression.IsUndoRedo

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksWhenanundooraredooperationtakesplace,theform'sunderlyingXMLdocumentisplacedinaread-onlystateandcannotbemodified.ThiscansometimesoccurduringanOnAfterChangeevent;whenitdoes,theIsUndoRedopropertyisusedtobypassthescript-baseddatavalidationthatitcontains.

ExampleInthefollowingexamplefromtheDataValidationdevelopersampleform,theIsUndoRedopropertyisusedtodeterminewhethertheeventisoccurringduringanundoorredooperation.Ifitis,theeventhandlerisexitedusingthereturn;statement.

functionmsoxd__itemB_quantityListB::OnAfterChange(eventObj){if(eventObj.IsUndoRedo){//AnundoorredooperationhasoccurredandtheDOMisread-only.return;}XDocument.DOM.selectSingleNode("/sampleData/listB/total").text=GetTotal("/sampleData/listB/itemB/quantityListB");}

IsUndoRedoProperty(DocContextChangeEventObject)

Aread-onlypropertythatreturnsaBooleanvalueindicatingwhetherthecontextchangeeventoccurredinresponsetoundoingoperationorredoinganoperation.

expression.IsUndoRedo

expressionRequired.ReturnsareferencetoaDocContextChangeEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

IsUndoRedoProperty(Index)

ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickanIsUndoRedopropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheIsUndoRedoproperty.

IsUndoRedopropertyasitappliestotheDataDOMEventobject.

IsUndoRedopropertyasitappliestotheDocContextChangeEventobject.

ShowAll

ItemProperty(DataAdaptersCollection)

Aread-onlypropertythatreturnsareferencetothespecifieddataadapterobjectfromtheDataAdaptersCollectioncollection,basedonpositionorname.

expression.Item(ByValvarIndexAsVariant)AsObject

expressionRequired.AnexpressionthatreturnsareferencetotheDataAdapterscollection.

varIndexRequiredVariant.AnexpressionthatspecifiesthepositionofamemberoftheDataAdapterscollection.Iftheargumentisanumericexpression,itmustbeanumberfrom0tothevalueofthecollection'sCountpropertyminus1.Iftheargumentisastringexpression,itmustbethenameofamemberofthecollection.

returnsAreferencetoadataadapterobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theItempropertyoftheDataAdapterscollectionisusedtoreturnareferencetoadataadapterinthecollection:

varobjDataAdapter;objDataAdapter=XDocument.DataAdapters.Item(0);

BecausetheItempropertyisthedefaultpropertyoftheDataAdapterscollection,itcanalsobeusedasfollows:

varobjDataAdapter;objDataAdapter=XDocument.DataAdapters(0);

YoucanalsousethenameofadataadapterastheargumenttotheItemmethod,asshowninthefollowingexample:

varobjDataAdapter;objDataAdapter=XDocument.DataAdapters("MyDataAdapter");

ShowAll

ItemProperty(DataObjectsCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedDataObjectobjectfromtheDataObjectscollection.

expression.Item(ByValvarIndexAsVariant)AsDataObject

expressionRequired.AnexpressionthatreturnsareferencetotheDataObjectscollection.

varIndexRequiredVariant.AnexpressionthatspecifiesthepositionofamemberoftheDataObjectscollection.Ifanumericexpression,theargumentmustbeanumberfrom0tothevalueofthecollection'sCountpropertyminus1.Ifastringexpression,theargumentmustbethenameofamemberofthecollection.

returnsAreferencetoaDataObjectobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIfthevalueprovidedforthevarIndexargumentdoesnotmatchanyexistingmemberofthecollection,anerroroccurs.

AfteryouhavesetareferencetotheDataObjectobjectthattheItempropertyreturns,youcanaccessanyofitspropertiesormethods.

ExampleInthefollowingexample,theItempropertyoftheDataObjectscollectionisusedtoreturnareferencetoaDataObjectobject:

varobjDataObject;objDataObject=XDocument.DataObjects.Item(0);

BecausetheItempropertyisthedefaultpropertyoftheDataObjectscollection,itcanalsobeusedasfollows:

varobjDataObject;objDataObject=XDocument.DataObjects(0);

YoucanalsousethenameoftheDataObjectobjectastheargumenttotheItemmethod,asshowninthefollowingexample:

varobjDataObject;objDataObject=XDocument.DataObjects("MyDataObject");

ItemProperty(ErrorsCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedErrorobjectfromtheErrorscollection.

expression.Item(ByValindexAsLong)AsError

expressionRequired.AnexpressionthatreturnsareferencetotheErrorscollection.

indexRequiredLongInteger.AnexpressionthatspecifiesthepositionofamemberoftheErrorscollection.Theargumentmustbeanumberfrom0tothevalueofthecollection'sCountpropertyminus1.

returnsAreferencetoanErrorobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksIfthevalueprovidedfortheindexargumentdoesnotmatchanyexistingmemberofthecollection,anerroroccurs.

AfteryouhavesetareferencetotheErrorobjectthattheItempropertyreturns,youcanaccessanyofitspropertiesormethods.

ExampleInthefollowingexample,theItempropertyoftheErrorscollectionisusedtoreturnareferencetoanErrorobject:

varobjError;objError=XDocument.Errors.Item(0);

BecausetheItempropertyisthedefaultpropertyoftheErrorscollection,itcanalsobeusedasfollows:

varobjError;objError=XDocument.Errors(0);

ItemProperty(Index)

TheItempropertyreturnsareferencetoanobjectcontainedinacollection.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickanItempropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheItemproperty.

ItempropertyasitappliestotheDataAdapterscollection.

ItempropertyasitappliestotheDataObjectscollection.

ItempropertyasitappliestotheErrorscollection.

ItempropertyasitappliestotheSignaturescollection.

ItempropertyasitappliestotheSignedDataBlockscollection.

ItempropertyasitappliestotheTaskPanescollection.

ItempropertyasitappliestotheViewInfoscollection.

ItempropertyasitappliestotheWindowscollection.

ItempropertyasitappliestotheXDocumentscollection.

ItempropertyasitappliestotheXMLNodescollection.

ShowAll

ItemProperty(SignaturesCollection)

Aread-onlypropertythatreturnsareferencetothespecifieddigitalsignaturefromtheSignaturescollection.

expression.Item(ByValvarIndexAsVariant)AsSignature

expressionRequired.AnexpressionthatreturnsareferencetotheSignaturescollection.

varIndexRequiredVariant.AnumericexpressionthatspecifiesthepositionofamemberoftheSignaturescollection.Theargumentmustbeanumberfrom0tothevalueofthecollection'sCountpropertyminus1.

returnsAreferencetoadigitalsignature.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ItemProperty(SignedDataBlocksCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedSignedDataBlockobjectfromtheSignedDataBlockscollection,basedonpositionorname.

expression.Item(ByValvarIndexAsVariant)AsSignedDataBlock

expressionRequired.AnexpressionthatreturnsaSignedDataBlockscollection.

varIndexRequiredVariant.AnexpressionthatspecifiesthepositionofamemberoftheSignedDataBlockscollection.Ifthisargumentisanumericexpression,itmustbeanumberfrom0tothevalueofthecollection'sCountpropertyminus1.Ifthisargumentisastringexpression,itmustbethenameofamemberofthecollection.

returnsAreferencetoaSignedDataBlockobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

ItemProperty(TaskPanesCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedTaskPaneobjectfromtheTaskPanescollection.

expression.Item(ByValvarIndexAsVariant)AsTaskPane

expressionRequired.ReturnsareferencetotheTaskPanescollection.

varIndexRequiredVariant.Anumericexpressionthatspecifiesthetypeoftaskpane.BasedontheXdTaskPaneTypeenumeration.

returnsAreferencetoaTaskPaneobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksIfthevalueprovidedforthevarIndexargumentdoesnotmatchanyexistingmemberofthecollection,anerroroccurs.

AfteryouhavesetareferencetotheTaskPaneobjectthattheItempropertyreturns,youcanaccessanyofitspropertiesandmethods.

ExampleInthefollowingexample,theItempropertyoftheTaskPanescollectionisusedtoreturnareferencetoaspecifiedTaskPaneobject:

varobjTaskPane;

objTaskPane=XDocument.View.Window.TaskPanes.Item(4);

BecausetheItempropertyisthedefaultpropertyoftheTaskPanescollection,itcanalsobeusedasfollows:

varobjTaskPane;

objTaskPane=XDocument.View.Window.TaskPanes(4);

ShowAll

ItemProperty(ViewInfosCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedViewInfoobjectfromtheViewInfoscollection.

expression.Item(ByValvarIndexAsVariant)AsViewInfo

expressionRequired.AnexpressionthatreturnsareferencetotheViewInfoscollection.

varIndexRequiredVariant.AnexpressionthatspecifiesthepositionofamemberoftheViewInfoscollection.Ifanumericexpression,theargumentmustbeanumberfrom0tothevalueofthecollection'sCountpropertyminus1.Ifastringexpression,theargumentmustbethenameofamemberofthecollection.

returnsAreferencetoaViewInfoobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksIfthevalueprovidedforthevarIndexargumentdoesnotmatchanyexistingmemberofthecollection,anerroroccurs.

AfteryouhavesetareferencetotheViewInfoobjectthattheItempropertyreturns,youcanaccessanyofitsproperties.

ExampleInthefollowingexample,theItempropertyoftheViewInfoscollectionisusedtoreturnareferencetoaViewInfoobject:

varobjViewInfo;objViewInfo=XDocument.ViewInfos.Item(0);

BecausetheItempropertyisthedefaultpropertyoftheViewInfoscollection,itcanalsobeusedasfollows:

varobjViewInfo;objViewInfo=XDocument.ViewInfos(0);

YoucanalsousethenameoftheViewInfoobject,whichisthenameofaview,astheargumenttotheItemmethod,asshowninthefollowingexample:

varobjViewInfo;objViewInfo=XDocument.ViewInfos("MyView");

ItemProperty(WindowsCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedWindowobjectfromtheWindowscollection.

expression.Item(ByValvarIndexAsVariant)AsWindow

expressionRequired.AnexpressionthatreturnsareferencetotheWindowscollection.

varIndexRequiredVariant.AnexpressionthatspecifiesthepositionofamemberoftheWindowscollection.Theargumentmustbeanumberfrom0tothevalueofthecollection'scountpropertyminus1.

returnsAreferencetoaWindowobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksIfthevalueprovidedforthevarIndexargumentdoesnotmatchanyexistingmemberofthecollection,anerroroccurs.

AfteryouhavesetareferencetotheWindowobjectthattheItempropertyreturns,youcanaccessanyofitspropertiesandmethods.

ExampleInthefollowingexample,theItempropertyoftheWindowscollectionisusedtoreturnareferencetoaWindowobject:

varobjWindow;objWindow=Application.Windows.Item(0);

BecausetheItempropertyisthedefaultpropertyoftheWindowscollection,itcanalsobeusedasfollows:

varobjWindow;objWindow=Application.Windows(0);

ShowAll

ItemProperty(XDocumentsCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedXDocumentobjectfromtheXDocumentscollection.

expression.Item(ByValvarIndexAsVariant)AsXDocument

expressionRequired.AnexpressionthatreturnsareferencetotheXDocumentscollection.

varIndexRequiredVariant.AnexpressionthatspecifiesthepositionofamemberoftheXDocumentscollection.Ifanumericexpression,theargumentmustbeanumberfrom0tothevalueofthecollection'sCountpropertyminus1.Ifastringexpression,theargumentmustbetheUniformResourceLocator(URL)pathofamemberofthecollection.

returnsAreferencetoanXDocumentobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksIfthevalueprovidedforthevarIndexargumentdoesnotmatchanyexistingmemberofthecollection,anerroroccurs.

AfteryouhavesetareferencetotheXDocumentobjectthattheItempropertyreturns,youcanaccessanyofitspropertiesormethods.

ExampleInthefollowingexample,theItempropertyoftheXDocumentscollectionisusedtoreturnareferencetoanXDocumentobject:

varobjXDoc;objXDoc=Application.XDocuments.Item(0);

BecausetheItempropertyisthedefaultpropertyoftheXDocumentscollection,itcanalsobeusedasfollows:

varobjXDoc;objXDoc=Application.XDocuments(0);

YoucanalsousethenameoftheXDocumentastheargumenttotheItemmethod,asshowninthefollowingexample:

varobjXDoc;objXDoc=Application.XDocuments("MyForm");

ShowAll

ItemProperty(XMLNodesCollection)

Aread-onlypropertythatreturnsareferencetothespecifiedXMLDocumentObjectModel(DOM)nodefromtheXMLNodescollection.

expression.Item(ByValvarIndexAsVariant)AsIXMLDOMNode

expressionRequired.ReturnsareferencetotheXMLNodescollection.

varIndexRequiredVariant.AnumericexpressionthatspecifiesthepositionofamemberoftheXMLNodescollection.Theargumentmustbeanumberfrom0tothevalueofthecollection'scountpropertyminus1.

returnsAreferencetoanXMLDOMnodeobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksIfthevalueprovidedforthevarIndexargumentdoesnotmatchanyexistingmemberofthecollection,anerroroccurs.

AfteryouhavesetareferencetotheXMLDOMnodeobjectthattheItempropertyreturns,youcanaccessanyofitspropertiesandmethods.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

ExampleInthefollowingexample,theItempropertyoftheXMLNodescollectionisusedtoreturnareferencetoanXMLDOMnodeobject:

varobjXMLNodes;varobjXMLNode;

objXMLNodes=XDocument.View.GetContextNodes();objXMLNode=objXMLNodes.Item(0);

BecausetheItempropertyisthedefaultpropertyoftheXMLNodescollection,itcanalsobeusedasfollows:

varobjXMLNodes;varobjXMLNode;

objXMLNodes=XDocument.View.GetContextNodes();objXMLNode=objXMLNodes(0);

LanguageProperty

SetsorretrievesaMicrosoftOfficeInfoPath2003form'sdefaultlanguagecode.

expression.Language

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThelanguagesettingsforanInfoPathformcanalsobeaccessedusingtheLanguageSettingspropertyoftheApplicationobject.

ExampleInthefollowingexample,theLanguagepropertyoftheXDocumentobjectisusedtodisplayaform'scurrentlanguagesettinginamessagebox:

XDocument.UI.Alert("Thecurrentlanguageis:"+XDocument.Language

ShowAll

LanguageSettingsProperty

Aread-onlypropertythatreturnsareferencetotheMicrosoftOfficeLanguageSettingsobject.

expression.LanguageSettings

expressionAnexpressionthatreturnsareferencetotheApplicationobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheLanguageSettingspropertyisavailableonlywhenusingscriptingcode.

AfteryouestablishareferencetotheLanguageSettingsobject,youcanaccessallthepropertiesandmethodsoftheobject.

ExampleThefollowingexampleusestheLanguageIDpropertyoftheLanguageSettingsobjecttoreturntheLCIDvalue(afour-digitnumber)forthelanguagethatiscurrentlybeingusedfortheOfficehelpsystem:

Application.LanguageSettings.LanguageID(3);

NoteBecauseMicrosoftOfficeInfoPath2003usesscriptingcodeinsteadofVisualBasicforApplications(VBA),youcannotusethenamesofenumeratedvalues;youmustusethenumericalvaluesoftheenumerations,asinthepreviousexample(msoLanguageIDHelp=3).

LeftProperty

Aread/writepropertyoftypelongintegerthatspecifiesthehorizontalpositionofthewindowrepresentedbytheWindowobject,measuredinpoints.

expression.Left

expressionRequired.AnexpressionthatreturnsareferencetoaWindowobject.

RemarksThispropertywillreturnanerrorifitissetonawindowthatisminimizedormaximized.

Settingthispropertytoapositionthatisoffthescreen,willactuallycausethewindowtobedisplayedonthescreen.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

MachineOnlineStateProperty

Aread-onlypropertyoftypeXdMachineOnlineStatethatreturnsthecurrentconnectionstateoftheclientcomputer.

expression.MachineOnlineState

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

MailEnvelopeProperty

Aread-onlypropertythatreturnsareferencetotheMailEnvelopeobjectassociatedwiththewindowthatisrepresentedbytheWindowobject.

expression.MailEnvelope

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheMailEnvelopepropertycanbeusedonlywiththeeditingwindowtypes;ifusedwithadesigningwindowtype,itwillreturnanerror.Itwillalsoreturnanerrorifnoformisopenintheformarea.

ExampleInthefollowingexample,theMailEnvelopepropertyoftheWindowobjectisusedtosetareferencetotheMailEnvelopeobject,whichisthenusedtocreateanddisplayacustome-mailmessage:

varobjEmail;

objEmail=Application.ActiveWindow.MailEnvelope;objEmail.Subject="Teste-mailmessage";objEmail.Visible=true;

ShowAll

MatchExpressionProperty

Aread-onlypropertythatreturnsastringvaluecontainingtheXPathexpressionfortheXMLDocumentObjectModel(DOM)nodeforwhichtheeventiscurrentlybeingprocessed.

expression.MatchExpression

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheXPathexpressionthattheMatchExpressionpropertycontainspointstoanXMLDOMnodeintheform'sunderlyingXMLdocument.Thisisthenodethatiscurrentlybeingvalidatedbythedatavalidationeventhandler.

ExampleInthefollowingexample,theMatchExpressionpropertyoftheDataDOMEventobjectisusedtodisplaytheXPathexpressionoftheXMLDOMnodethatiscurrentlybeingvalidated:

XDocument.UI.Alert("Matchexpression:"+eventObj.MatchExpression

MathProperty

Aread-onlypropertythatreturnsareferencetotheMathobject.

expression.Math

expressionRequired.AnexpressionthatreturnsareferencetotheUtilobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksUsingtheMathproperty,youcanaccessallofthemethodsthattheMathobjectprovides.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

NameProperty(ADOAdapterObject)

Aread-onlypropertythatreturnsthenameofanADOAdapterobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoanADOAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

NameProperty(ApplicationObject)

Aread-onlypropertythatreturnsastringcontainingthenameoftheMicrosoftOfficeInfoPath2003application.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksThenameoftheapplicationdoesnotcontaintheversionnumber.Toobtaintheversionnumberofanapplication,usetheVersionpropertyoftheApplicationobject.

ExampleInthefollowingexample,theAlertmethodoftheUIobject,accessedthroughtheXDocumentobject,isusedtodisplayamessageboxthatindicatesthenameoftheapplication:

XDocument.UI.Alert("Applicationname:"+Application.Name);

ShowAll

NameProperty(DataObjectObject)

Aread-onlypropertythatreturnsastringvalueindicatingthenameoftheassociatedDataObjectobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetotheDataObjectobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThenameoftheDataObjectobjectisthesameasthenameofthesecondarydatasourcethatitrepresents.ThenameoftheDataObjectobjectcanalsobeusedastheargumenttotheItempropertyoftheDataObjectscollection.

ExampleInthefollowingexample,theNamepropertyoftheDataObjectobjectisusedtotodisplaythenameoftheDataObjectobjectinamessagebox:

varobjDataObject;

objDataObject=XDocument.DataObjects(0);XDocument.UI.Alert("DataObjectname:"+objDataObject.Name);

NameProperty(DAVAdapterObject)

Aread-onlypropertythatreturnsthenameofaDAVAdapterobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoaDAVAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

NameProperty(EmailAdapterObject)

Aread-onlypropertythatreturnsthenameofanEmailAdapterobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

NameProperty(HWSAdapterObject)

Aread-onlypropertythatreturnsthenameofanHWSAdapterobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoaHWSAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

NameProperty(Index)

TheNamepropertyreturnsastringthatspecifiesthenameofanobject.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaNamepropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheNameproperty.

NamepropertyasitappliestotheADOAdapterobject.

NamepropertyasitappliestotheApplicationobject.

NamepropertyasitappliestotheDataObjectobject.

NamepropertyasitappliestotheDAVAdapterobject.

NamepropertyasitappliestotheEmailAdapterobject.

NamepropertyasitappliestotheHWSAdapterobject.

NamepropertyasitappliestotheSharepointListAdapterobject.

NamepropertyasitappliestotheSignedDataBlockobject.

NamepropertyasitappliestotheViewobject.

NamepropertyasitappliestotheViewInfoobject.

NamepropertyasitappliestotheWebServiceAdapterobject.

NamepropertyasitappliestotheXMLFileAdapterobject.

NameProperty(SharePointListAdapterObject)

Aread-onlypropertythatreturnsthenameofaSharepointListAdapterobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoaSharePointListAdapterobject

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

NameProperty(SignedDataBlockObject)

Aread-onlypropertythatreturnsthenameofaSignedDataBlockobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoaSignedDataBlockobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

NameProperty(ViewObject)

Aread-onlypropertythatreturnsastringcontainingthenameoftheviewthatisrepresentedbytheViewobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTodeterminewhetheraviewisthedefaultview,usetheViewInfoobject.

ExampleInthefollowingexamplefromtheEventsdevelopersampleform,theNamepropertyoftheViewobjectisusedtodeterminewhichviewtheuserhasswitchedto.IftheviewistheArchiveCustomerview,anotevalueisaddedtotheform'sunderlyingXMLdocument:

functionXDocument::OnSwitchView(eventObj){varoDate=newDate();

if(XDocument.View.Name=="ArchiveCustomer"){varoNotesNode=XDocument.DOM.selectSingleNode("/Customers/CustomerInfo/Notes");varoDivNode=XDocument.DOM.createNode(1,"div","http://www.w3.org/1999/xhtml");

oDivNode.text="Noterecorded"+oDate.toString();oNotesNode.appendChild(oDivNode);}}

NameProperty(ViewInfoObject)

Aread-onlypropertythatreturnsastringvalueindicatingthenameoftheviewthatisassociatedwiththeViewInfoobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetotheViewInfoobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThenameoftheViewInfoobjectisthesameasthenameoftheviewthatitrepresents.ThenameoftheViewInfoobjectcanalsobeusedastheargumenttotheItempropertyoftheViewInfoscollection.

ExampleInthefollowingexample,theNamepropertyoftheViewInfoobjectisusedtotodisplaythenameofaviewinamessagebox:

varobjViewInfo;

objViewInfo=XDocument.ViewInfos(0);XDocument.UI.Alert("Viewname:"+objViewInfo.Name);

NameProperty(WebServiceAdapterObject)

Aread-onlypropertythatreturnsthenameofaWebServiceAdapterobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

NameProperty(XMLFileAdapterObject)

Aread-onlypropertythatreturnsthenameofanXMLFileAdapterobject.

expression.Name

expressionRequired.AnexpressionthatreturnsareferencetoanXMLFileAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

NewValueProperty

Aread-onlypropertythatreturnsastringvalueindicatingthevalueofanXMLDocumentObjectModel(DOM)nodethatisbeingupdatedorinsertedduringadatavalidationevent.

expression.NewValue

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheNewValuepropertycontainsthevalueoftheXMLDOMnodethatwillreplacetheexistingvalue.TogettheoriginalvalueoftheXMLDOMnode,usetheOldValuepropertyoftheDataDOMEventobject.

ExampleInthefollowingexamplefromtheADO(ActiveXDataObjects)developersampleform,theNewValuepropertyoftheDataDOMEventobjectisusedtodeterminewhetherthenewvalueoftheXMLDOMnodeisanemptystring.Ifitisnot,thecodesetsotherfieldstobeemptystrings.

functionmsoxd__Employees_EmployeeID_attr::OnAfterChange(eventObj){if(eventObj.IsUndoRedo){//AnundoorredooperationhasoccurredandtheDOMisread-only.return;}if(eventObj.NewValue=="")return;

if(XDocument.DOM.selectSingleNode('/dfs:myFields/dfs:queryFields/q:Employees/@FirstName').text!="")XDocument.DOM.selectSingleNode('/dfs:myFields/dfs:queryFields/q:Employees/@FirstName').text="";

if(XDocument.DOM.selectSingleNode('/dfs:myFields/dfs:queryFields/q:Employees/@LastName').text!="")XDocument.DOM.selectSingleNode('/dfs:myFields/dfs:queryFields/q:Employees/@LastName').text="";}

ShowAll

NodeProperty(ErrorObject)

Aread-onlypropertythatreturnsareferencetotheXMLDocumentObjectModel(DOM)nodeofaform'sunderlyingXMLdocumentthatisassociatedwithanErrorobject.

expression.Node

expressionRequired.AnexpressionthatreturnsareferencetotheErrorobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksUsingtheNodeproperty,youcanaccessallofthepropertiesandmethodsthattheXMLDOMnodeobjectprovides.

ExampleInthefollowingexample,theNodepropertyoftheErrorobjectisusedtodisplaytheXMLnodeofanerrorinamessagebox:

varobjError;

objError=XDocument.Errors(0);XDocument.UI.Alert("Errorname:"+objError.Node.xml);

ShowAll

NodeProperty(Index)

TheNodepropertyreturnsareferencetotheXMLDocumentObjectModel(DOM)nodeofaform'sunderlyingXMLdocumentthatisassociatedwithaparticularobject.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaNodepropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheNodeproperty.

NodepropertyasitappliestotheErrorobject.

NodepropertyasitappliestotheInfoPathControlSiteobject.

NodeProperty(InfoPathControlSiteObject)

RetrievesareferencetotheXMLnodetowhichtheActiveXcontrolisbound.

expression.Node

expressionRequired.AnexpressionthatreturnsareferencetotheInfoPathControlSiteobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

OldValueProperty

Aread-onlypropertythatreturnsastringvalueindicatingtheoriginalvalueofanXMLDocumentObjectModel(DOM)nodethatisbeingupdatedordeletedduringadatavalidationevent.

expression.OldValue

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheOldValuepropertycontainstheoriginalvalueoftheXMLDOMnodethatwillbereplacedwithanewvalueordeleted.TogetthenewvalueoftheXMLDOMnode,usetheNewValuepropertyoftheDataDOMEventobject.

ExampleInthefollowingexample,theOldValuepropertyoftheDataDOMEventobjectisusedtodisplaytheoriginalvalueofanXMLDOMnode,alongwithitsnewvalue:

XDocument.UI.Alert("Originalvalue:"+eventObj.OldValue+"\nNewvalue:"+eventObj.NewValue);

ShowAll

OperationProperty(DataDOMEventObject)

Aread-onlypropertythatreturnsastringvalueindicatingthetypeofactionthatisappliedtoanXMLDocumentObjectModel(DOM)nodeduringadatavalidationevent.

expression.Operation

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksThevaluesthattheOperationpropertyreturnsincludeInsert,Update,andDelete.

ExampleInthefollowingexamplefromtheStructuralEditingdevelopersampleform,theOperationpropertyoftheDataDOMEventobjectisusedtocheckthetypeofactionthatisoccurring;ifitisadeleteaction,thecodecallsacustomfunction:

functionmsoxd__item::OnAfterChange(eventObj){if(!eventObj.IsUndoRedo&&eventObj.Operation=="Delete"&&eventObj.Site.nodeName=="item"&&eventObj.Source.nodeName=="item"){Calculate();}}

OperationProperty(Index)

TheOperationpropertyeitherspecifiesorreturnsastringthatrepresentsaWebservicecommandstring,orreturnsthenameofaneventaction.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickanOperationpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheOperationproperty.

OperationpropertyasitappliestotheDataDOMEventobject.

OperationpropertyasitappliestotheWebServiceAdapterobject.

ShowAll

OperationProperty(WebServiceAdapterObject)

SetsorretrievesastringvaluethatcontainsthesourceXMLoftheoperationelementcontainedintheformdefinition(.xsf)file.

expression.Operation

expressionRequired.AnexpressionthatreturnsareferencetotheWebServiceAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheoperationelementofthe.xsffilecontainsinformationabouttheWebservice,includingitsname,themethodusedforretrievingandsubmittingdata,anditsUniformResourceLocator(URL).

ExampleInthefollowingexample,theOperationpropertyoftheWebServiceAdapterobjectisusedtodisplaytheoperationstringoftheWebservicedataadapterinamessagebox:

varobjWSAdapter;

objWSAdapter=XDocument.DataObjects("WebCityList").QueryAdapter;XDocument.UI.Alert("Operationstring:"+objWSAdapter.Operation

ShowAll

OutputLocationProperty

Aread/writepropertythatspecifiestheXMLDocumentObjectModel(DOM)nodeunderwhichtheadapterwillcopytheXMLreturnedbytheXMLWebservice.

expression.OutputLocation

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIfthevalueoftheOutputLocationpropertyisnotsetonaqueryadapter,itwillcorrespondtothedataFieldselementinthedatasourceassociatedwiththedataconnection.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

PackageURLProperty

Aread-onlypropertythatreturnsastringcontainingtheUniformResourceLocator(URL)ofthecachefolderthatcontainsaMicrosoftOfficeInfoPath2003form'sextractedformfiles.

expression.PackageURL

expressionRequired.AnexpressionthatreturnsareferencetoaSolutionobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThePackageURLpropertyissetatruntime,andtheURLitcontainspointstothefolderwheretheformtemplate'sfilesarecached.

ExampleInthefollowingexample,thePackageURLpropertyoftheSolutionobjectisusedtodisplaythefolder'sURLinamessagebox:

XDocument.UI.Alert("PackageURL:"+XDocument.Solution.PackageURL

ShowAll

ParentProperty

Aread-onlypropertythatreturnsareferencetotheXMLDocumentObjectModel(DOM)nodeoftheparentoftheXMLDOMnodebeingchangedduringadatavalidationevent.

expression.Parent

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksAfteryouhavesetareferencetotheXMLDOMnodethattheParentpropertyreturns,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.Thiscanbeespeciallyusefulduringdeleteoperations,becausetheParentpropertymapstothelocationoftheXMLDOMnodethatwasremoved.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

ExampleInthefollowingpartialexamplefromtheDataValidationdevelopersampleform,theParentpropertyoftheDataDOMEventobjectisusedtocheckthenameoftheparentnode;ifitmatchescertaincriteria,anerrormessageisdisplayed:

functionmsoxd__shippingDates::OnBeforeChange(eventObj){varobjOrderDate=newDate(XDocument.DOM.selectSingleNode('/sampleData/shippingDates/orderDate').text.replace(/(.*)-(.*)-(.*)/,"$2-$3-$1"));varobjShipDate=newDate(XDocument.DOM.selectSingleNode('/sampleData/shippingDates/shipDate').text.replace(/(.*)-(.*)-(.*)/,"$2-$3-$1"));...

if(objShipDate.toString()!="NaN"&&objOrderDate.toString()=="NaN"){eventObj.ReturnMessage="TheShipDateisinvalidwithoutanorderdate.";

if(eventObj.Parent.nodeName=="orderDate")eventObj.ReturnMessage+="YoumustdeletetheShipDate"+"beforedeletingtheOrderDate.";

eventObj.ReturnStatus=false;return;}...}

ShowAll

QueryAdapterProperty(DataObjectObject)

Aread-onlypropertythatreturnsareferencetothedataadapterobjectthatisusedforasecondarydatasource.

expression.QueryAdapter

expressionRequired.AnexpressionthatreturnsareferencetotheDataObjectobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksAfteryouhavesetareferencetothedataadapterobjectthattheQueryAdapterpropertyreturns,youcanusethepropertiesandmethodsthattheparticulardataadapterobjectcontains.

MicrosoftOfficeInfoPath2003supportsthreetypesofdataadapters:

1. ActiveXDataObjectsRepresentedbytheADOAdapterobject.

2. WebservicesRepresentedbytheWebServiceAdapterobject.

3. XMLfileRepresentedbytheXMLFileAdapterobject.

ExampleInthefollowingexample,theQueryAdapterpropertyoftheDataObjectobjectisusedtoreturnareferencetothedataadapterthatisassociatedwiththeDataObjectobject,which,inthiscase,isanADOAdapterdataadapterobject.ThecodethenusestheCommandpropertyoftheADOAdapterobjecttodisplaytheSQLcommandtextinamessagebox:

varobjDataAdapter;

objDataAdapter=XDocument.DataObjects("CityList").QueryAdapterXDocument.UI.Alert("SQLcommandtext:"+objDataAdapter.Command);

QueryAdapterProperty(Index)

TheQueryAdapterpropertyreturnsareferencetoatypeofdataadapterobjectsuchastheADOAdapter,WebServiceAdapter,orXMLFileAdapterobject.ThispropertyisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaQueryAdapterpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheQueryAdapterproperty.

QueryAdapterpropertyasitappliestotheDataObjectobject.

QueryAdapterpropertyasitappliestotheXDocumentobject.

ShowAll

QueryAdapterProperty(XDocumentObject)

Aread-onlypropertythatreturnsareferencetothedataadapterobjectthatisassociatedwithaMicrosoftOfficeInfoPath2003form.

expression.QueryAdapter

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksDataadapterobjectsprovidedifferentpropertiesandmethodsthatretrieveandsubmitdatatoexternaldatasources;thedataadapterthatisassociatedwithaformisdependentonthetypeofdatasourcethatwasusedwhentheformwasinitiallycreated.

TheQueryAdapterpropertyallowsyoutoaccessanInfoPathform'sprimarydatasource.Toaccessthedataadapterobjectsusedforaform'ssecondarydatasources,usetheDataObjectspropertyoftheXDocumentobject.

MicrosoftOfficeInfoPath2003supportsthreetypesofdataadapters:

1. ActiveXDataObjectsRepresentedbytheADOAdapterobject.

2. WebservicesRepresentedbytheWebServiceAdapterobject.

3. XMLfileRepresentedbytheXMLFileAdapterobject.

NoteTheXMLFileAdapterobjectcannotbeusedwiththeQueryAdapterpropertyoftheXDocumentobject,itisonlyusedforsecondarydatasources.Toaccessaform'sunderlyingXMLdocument,usetheDOMpropertyoftheXDocumentobject.

ExampleInthefollowingexample,theQueryAdapterpropertyoftheXDocumentobjectisusedtosetareferencetotheADOAdapterdataadapterobject;thentheCommandpropertyoftheADOAdapterobjectisusedtodisplaytheSQLcommandtextinamessagebox:

varobjADOAdapter;

objADOAdapter=XDocument.QueryAdapter;XDocument.UI.Alert("SQLcommandtext:"+objADOAdapter.Command);

ShowAll

QueryAllowedProperty(ADOAdapterObject)

Aread-onlypropertyoftypeBooleanthatalwaysreturnsTrue,correspondingtothequeryAllowedattributeintheformdefinitionfile(.xsf).

expression.QueryAllowed

expressionAnexpressionthatreturnsanADOAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

QueryAllowedProperty(DAVAdapterObject)

Aread-onlypropertyoftypeBooleanthatalwaysreturnsFalse,correspondingtothequeryAllowedattributeintheformdefinitionfile(.xsf).

expression.QueryAllowed

expressionAnexpressionthatreturnsaDAVAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

QueryAllowedProperty(EmailAdapterObject)

Aread-onlypropertyoftypeBooleanthatalwaysreturnsFalse,correspondingtothequeryAllowedattributeintheformdefinitionfile(.xsf).

expression.QueryAllowed

expressionAnexpressionthatreturnsanEmailAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

QueryAllowedProperty(HWSAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluethatisalwaysFalse,correspondingtothequeryAllowedattributeintheformdefinitionfile(.xsf).

expression.QueryAllowed

expressionAnexpressionthatreturnsanHWSAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

QueryAllowedProperty(Index)

TheQueryAllowedpropertyreturnsavaluethatcorrespondstothequeryAllowedattributeintheformdefinitionfile(.xsf).ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaQueryAllowedpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheQueryAllowedproperty.

QueryAllowedpropertyasitappliestotheADOAdapterobject.

QueryAllowedpropertyasitappliestotheDAVAdapterobject.

QueryAllowedpropertyasitappliestotheEmailAdapterobject.

QueryAllowedpropertyasitappliestotheHWSAdapterobject.

QueryAllowedpropertyasitappliestotheSharepointListAdapterobject.

QueryAllowedpropertyasitappliestotheWebServiceAdapterobject.

QueryAllowedpropertyasitappliestotheXMLFileAdapterobject.

ShowAll

QueryAllowedProperty(SharePointListAdapterObject)

Aread-onlypropertyoftypeBooleanthatalwaysreturnsTrue,correspondingtothequeryAllowedattributeintheformdefinitionfile(.xsf).

expression.QueryAllowed

expressionAnexpressionthatreturnsaSharepointListAdapterObjectobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

QueryAllowedProperty(WebServiceAdapterObject)

Aread-onlypropertyoftypeBooleanthatcorrespondstothequeryAllowedattributeintheformdefinitionfile(.xsf).ThedefaultvalueisFalse.

expression.QueryAllowed

expressionAnexpressionthatreturnsaWebServiceAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

QueryAllowedProperty(XMLFileAdapterObject)

Aread-onlypropertyoftypeBooleanthatalwaysreturnsTrue,correspondingtothequeryAllowedattributeintheformdefinitionfile(.xsf).

expression.QueryAllowed

expressionAnexpressionthatreturnsanXMLFileAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

ReturnMessageProperty

Setsorretrievesastringvalueindicatingtheerrormessagethatwillbereturnedifthedatavalidationeventisnotsuccessful.

expression.ReturnMessage

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksUsedinconjunctionwiththeReturnStatuspropertyoftheDataDOMEventobject,theReturnStatuspropertydisplaysamessageboxtotheuserwiththespecifiedtextmessage.

ExampleInthefollowingexample,theReturnMessagepropertyoftheDataDOMEventobjectisusedtodisplayamessagetotheuserifthedatavalidationfortheXMLDOMnodefails:

functionmsoxd__id_attr::OnBeforeChange(eventObj){if(eventObj.NewValue==""){eventObj.ReturnMessage="Youmustsupplyavalueforthisfield.";eventObj.ReturnStatus=false;return;}}

ShowAll

ReturnStatusProperty(DataDOMEventObject)

SetsorretrievesaBooleanvalueindicatingthereturnstatusofthedatavalidationevent.

expression.ReturnStatus

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIftheReturnStatuspropertyissettoFalse,thechangestotheXMLDocumentObjectModel(DOM)nodearenotacceptedandthedatavalidationeventfails.IfsettoTrue,nodatavalidationerrorhasoccurredandthedatavalidationeventissuccessful.

ExampleInthefollowingexample,theReturnStatuspropertyoftheDataDOMEventobjectisusedtoindicatethatthedatavalidationeventwasnotsuccessful.ThecodealsousestheReturnMessagepropertyoftheDataDOMEventobjecttodisplayamessagetotheuser.

functionmsoxd__id_attr::OnBeforeChange(eventObj){if(eventObj.NewValue==""){eventObj.ReturnMessage="Youmustsupplyavalueforthisfield.";eventObj.ReturnStatus=false;return;}}

ReturnStatusProperty(DocActionEventObject)

SetsorretrievesaBooleanvalueindicatingthereturnstatusoftheOnClickevent.

expression.ReturnStatus

expressionRequired.ReturnsareferencetotheDocActionEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIftheReturnStatuspropertyissettoFalse,theOnClickeventfails.IfsettoTrue,theOnClickeventissuccessful.ThedefaultvalueisTrue.

NoteSettingtheReturnStatuspropertytofalsewillcauseamessageboxtobedisplayedwhichindicateswhathasfailed.

ExampleInthefollowingexample,theReturnStatuspropertyoftheDocActionEventobjectisusedtoindicatethattheOnClickeventwasnotsuccessful:

functionDocActionEventCancel::OnClick(eventObj){//Canceltheevent.eventObj.ReturnStatus=false;}

ReturnStatusProperty(DocReturnEventObject)

SetsorretrievesaBooleanvalueindicatingthereturnstatusoftheOnLoadandOnSubmitRequestevents.

expression.ReturnStatus

expressionRequired.ReturnsareferencetotheDocReturnEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIftheReturnStatuspropertyissettoFalse,theOnLoadandOnSubmitRequesteventsfail.IfsettoTrue,theOnLoadandOnSubmitRequesteventsaresuccessful.ThedefaultvaluefortheOnLoadeventisTrue,andthedefaultvaluefortheOnSubmitRequesteventisFalse.

ExampleInthefollowingexample,theReturnStatuspropertyoftheDocReturnEventobjectisusedtoindicatethattheOnLoadeventwasnotsuccessful:

functionXDocument::OnLoad(eventObj){//Canceltheevent.eventObj.ReturnStatus=false;}

ReturnStatusProperty(Index)

TheReturnStatuspropertyreturnsaBooleanvalueindicatingwhetherthechangesthatoccurredduringtheeventareacceptedorrejected.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaReturnStatuspropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheReturnStatusproperty.

ReturnStatuspropertyasitappliestotheDataDOMEventobject.

ReturnStatuspropertyasitappliestotheDocActionEventobject.

ReturnStatuspropertyasitappliestotheDocReturnEventobject.

ReturnStatuspropertyasitappliestotheMergeEventobject.

ReturnStatuspropertyasitappliestotheSaveEventobject.

ReturnStatuspropertyasitappliestotheVersionUpgradeEventobject.

ReturnStatusProperty(MergeEventObject)

Aread-writepropertythatsetsorretrievesaBooleanvalueindicatingthereturnstatusoftheOnMergeRequestevent.

expression.ReturnStatus

expressionRequired.AnexpressionthatreturnsareferencetoaMergeEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThedefaultvalueoftheReturnStatuspropertyoftheMergeEventobjectisFalse.IfthispropertyisnotsettoTrue,theeventhandlerfortheOnMergeRequesteventwillfail.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ReturnStatusProperty(SaveEventObject)

SetsorretrievesaBooleanvalueindicatingthereturnstatusoftheOnSaveRequestevent.

expression.ReturnStatus

expressionRequired.AnexpressionthatreturnsareferencetoaSaveEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ReturnStatusProperty(SignEventObject)

SetsorretrievesaBooleanvalueindicatingthereturnstatusoftheOnSignevent.

expression.ReturnStatus

expressionRequired.AnexpressionthatreturnsareferencetoaSignEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ReturnStatusProperty(VersionUpgradeEventObject)

SetsorretrievesaBooleanvalueindicatingthereturnstatusoftheOnVersionUpgradeevent.

expression.ReturnStatus

expressionRequired.ReturnsareferencetotheVersionUpgradeEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIftheReturnStatuspropertyissettoFalse,theOnVersionUpgradeeventfailsandtheformisnotopened.IfsettoTrue,theOnVersionUpgradeeventissuccessful.

ExampleInthefollowingexample,theReturnStatuspropertyoftheVersionUpgradeEventobjectisusedtoindicatethattheOnVersionUpgradeeventwasnotsuccessful:

functionXDocument::OnVersionUpgrade(eventObj){//Canceltheevent.eventObj.ReturnStatus=false;}

RoleProperty

Setsorretrievestheuser'scurrentrole.

expression.Role

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theRolepropertyisusedtodeterminethecurrentuser'srole.

varstrCurrentRole=XDocument.Role;

RollBackProperty(MergeEventobject)

Aread/writepropertythatprovidesadditionalinformationtotheOnMergeRequesteventalongwiththeReturnStatuspropertyflag.

expression.RollBack

expressionRequired.AnexpressionthatreturnsareferencetoaMergeEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIftheReturnStatuspropertyoftheMergeEventobjectissettoTrue,thispropertyisignored.

IftheReturnStatuspropertyisFalseandtheRollBackpropertyisTrue,theentiremergingoperationwillbecancelledandrolledbacktothestatebeforetheoperationwasinitiated.IftheRollBackpropertyisFalse,mergingthecurrentformwillfail,butthemergingoperationwillcontinuewiththenextform.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theRollBackpropertyoftheMergeEventobjectisusedtorollbacktheentireoperationifamergefails.

try{XDocument.ImportDOM(eventObj.DOM)}catch(ex){eventObj.ReturnStatus=false;eventObj.RollBack=true;}

ShortErrorMessageProperty

SetsorretrievesthestringvaluecontainingtheshorterrormessageofanErrorobject.

expression.ShortErrorMessage

expressionRequired.AnexpressionthatreturnsareferencetotheErrorobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheshorterrormessageistheToolTipthatusersviewwhendatavalidationfailsintheirforms.

ExampleInthefollowingexample,theShortErrorMessagepropertyoftheErrorobjectisusedtodisplaytheshortmessageofanerrorinamessagebox:

varobjError;

objError=XDocument.Errors(0);XDocument.UI.Alert("Errorname:"+objError.ShortErrorMessage);

ShowAll

SignatureBlockXmlNodeProperty

Aread-onlypropertythatreturnstheXMLnodecorrespondingadigitalsignature.

expression.SignatureBlockXmlNode

expressionRequired.AnexpressionthatreturnsaSignatureobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

SignatureContainerProperty

Aread-onlypropertythatreturnstherootXMLnodeofthesubtreecontainingthesignaturesintheSignedDataBlockobject.

expression.SignatureContainer

expressionRequired.AnexpressionthatreturnsareferencetotheSignedDataBlockobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

SignatureRelationProperty

Aread-onlypropertythatreturnstherelationamongmultiplesignaturesoftheSignedDataBlockobject,expressedasXdSignatureRelationenumeratedconstants.

expression.SignatureRelation

expressionRequired.AnexpressionthatreturnsareferencetotheSignedDataBlockobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

SignaturesProperty

Aread-onlypropertythatreturnsareferencetotheSignaturescollectionassociatedwiththeSignedDataBlockobject.

expression.Signatures

expressionRequired.AnexpressionthatreturnsareferencetotheSignedDataBlockobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

SignedDataBlockProperty

Aread-onlypropertythatreturnsthesigneddatablockthattriggerstheOnSignevent.

expression.SignedDataBlock

expressionRequired.AnexpressionthatreturnsaSignEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

SignedDataBlocksProperty

Aread-onlypropertythatreturnsareferencetotheSignedDataBlockscollectionthatisassociatedwithanXDocumentobject.

expression.SignedDataBlocks

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheSignedDataBlockspropertyisusedtoobtainareferencetotheSignedDataBlockscollection.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

SiteProperty

Aread-onlypropertythatreturnsareferencetotheXMLDocumentObjectModel(DOM)nodewherethedatavalidationeventiscurrentlybeingprocessed.

expression.Site

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksAfteryouhavesetareferencetotheXMLDOMnodethattheSitepropertyreturns,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

ExampleInthefollowingexamplefromtheDataValidationdevelopersampleform,theSitepropertyoftheDataDOMEventobjectisusedtocheckthevalueoftheXMLDOMnode;ifitmatchescertaincriteria,anerroriscreated:

functionmsoxd__itemB_quantityListB::OnValidate(eventObj){if(parseInt(eventObj.Site.nodeTypedValue,10)>50)eventObj.ReportError(eventObj.Site,"Invalidquantity."+"Thetotalnumberofeachtypeofblockcannotexceed50.",false);

if(parseInt(eventObj.Site.nodeTypedValue,10)<0)eventObj.ReportError(eventObj.Site,"Invalidquantity."+"Thetotalnumberofeachtypeofblockcannotbelessthan0.",false);}

ShowAll

SiteUrlProperty

Aread-onlypropertyreturningtheUniformResourceLocator(URL)oftheWindowsSharePointServicessitethattheSharepointListAdapterwillquery.

expression.SiteUrl

expressionRequired.AnexpressionthatreturnsareferencetoaSharePointListAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingexampleshowshowtousetheSiteUrlpropertyofaSharePointListAdapterobjecttostoretheURLlocationinalocalvariable:

varstrSiteURL=XDocument.DataAdapters["Announcements"].SiteUrl

ShowAll

SolutionProperty

Aread-onlypropertythatreturnsareferencetotheSolutionobjectthatisassociatedwithaMicrosoftOfficeInfoPath2003form.

expression.Solution

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheSolutionobjectprovidesaccesstoinformationaboutaform'sassociatedformdefinition(.xsf)file,includingaccesstoanXMLDocumentObjectModel(DOM)thatcontainsallofthesourceXMLofthe.xsffile.

ExampleInthefollowingexample,theSolutionpropertyoftheXDocumentobjectisusedtoloadavariablewiththeXMLcontentsofthe.xsffile:

varstrXSF;strXSF=XDocument.Solution.DOM.xml;

ShowAll

SolutionVersionProperty

Aread-onlypropertythatreturnsastringcontainingtheversionnumberofaMicrosoftOfficeInfoPath2003formtemplate.

expression.SolutionVersion

expressionRequired.AnexpressionthatreturnsareferencetotheVersionUpgradeEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThispropertycanbeusedonlyduringtheOnVersionUpgradeevent.

ExampleInthefollowingexample,theSolutionVersionpropertyoftheVersionUpgradeEventobjectisusedtodisplaytheversionnumberofanInfoPathformtemplateinamessagebox:

functionXDocument::OnVersionUpgrade(eventObj){XDocument.UI.Alert("Theformversion:"+eventObj.DocumentVersion+"\nTheformtemplateversion:"+eventObj.SolutionVersion);eventObj.ReturnStatus=true;}

ShowAll

SourceProperty(DataDOMEventObject)

Aread-onlypropertythatreturnsareferencetotheXMLDocumentObjectModel(DOM)wherethedatavalidationeventisoccurring.

expression.Source

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksAferyouhavesetareferencetotheXMLDOMnodethattheSourcepropertyreturns,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

ExampleInthefollowingexamplefromtheStructuralEditingdevelopersampleform,theSourcepropertyoftheDataDOMEventobjectisusedtoreturnareferencetotheXMLDOMnodethatcausedtheinitialchange.Ifthenodenamematchescertaincriteria,acustomfunctioniscalled.

functionmsoxd__quantity::OnAfterChange(eventObj){if(!eventObj.IsUndoRedo&&eventObj.Source.nodeName!="item")Calculate(eventObj.Site.parentNode);}

ShowAll

SourceProperty(DocActionEventObject)

Aread-onlypropertythatreturnsareferencetotheinner-mostXMLDocumentObjectModel(DOM)nodeofaform'sunderlyingXMLdocument.

expression.Source

expressionRequired.ReturnsareferencetotheDocActionEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksAfteryouhavesetareferencetotheXMLDOMnodethattheSourcepropertyreturns,youcanuseanyofthepropertiesandmethodsthataresupportedbytheXMLDOM.

NoteTolearnmoreabouttheXMLDOMandallofthepropertiesandmethodsthatitsupports,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

ExampleInthefollowingexample,theSourcepropertyoftheDocActionEventobjectisusedtodisplaythesourceXMLdataoftheXMLDOMnodeinamessagebox:

functionDocActionEventSource::OnClick(eventObj){XDocument.UI.Alert("Source:"+eventObj.Source.xml);}

ShowAll

SourceProperty(Index)

TheSourcepropertyreturnsareferencetotheXMLDocumentObjectModel(DOM)nodecontainingthesourceXMLofthedatabeingchangedduringanevent.ThispropertyisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaSourcepropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheSourceproperty.

SourcepropertyasitappliestotheDataDOMEventobject.

SourcepropertyasitappliestotheDocActionEventobject.

ShowAll

StatusProperty(CertificateObject)

Aread-onlypropertythatreturnsthestatusofthedigitalcertificate.ThestatusthatisreturnedisoneoftheXdCertificateStatusenumeratedconstants.

expression.Status

expressionRequired.AnexpressionthatreturnsaCertificateobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

StatusProperty(Index)

ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickaStatuspropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheStatusproperty.

StatuspropertyasitappliestotheCertificateobject.

StatuspropertyasitappliestotheSignatureobject.

ShowAll

StatusProperty(SignatureObject)

Aread-onlypropertythatreturnsthestatusofthespecifieddigitalsignature.ThestatusthatisreturnedisbasedontheXdSignatureStatusenumeration

expression.Status

expressionRequired.AnexpressionthatreturnsaSignatureobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheStatuspropertyonlyverifieswhetherthehashofthedigitalsignatureisvalid.Itdoesnotverifythechainoftrustofthedigitalcertificate,nordoesitverifythattheimageoftheviewcapturedatthetimethesignaturewasaddedmatchesthecurrentviewofthesignedform.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

SubjectProperty(EmailAdapterObject)

Returnsorsetsastringthatrepresentsthesubjectofthee-mailmessageassociatedwiththespecifiedEmailAdapterobject.

expression.Subject

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThisexampleshowshowtousetheSubjectpropertyofaninstanceoftheEmailAdapterobjecttochangethesubjectofthee-mailmessagebeforetheEmailAdapterobjectissubmitted:

objEmailAdapter.Subject="WeeklyStatusReport";

SubjectProperty(MailEnvelopeObject)

SetsorretrievesastringcontainingthesubjectvalueusedintheMailEnvelopeobjectthatisassociatedwithaWindowobject.

expression.Subject

expressionRequired.AnexpressionthatreturnsareferencetotheMailEnvelopeobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheMailEnvelopeobjectdoesnotsupporttheprogrammaticcreationofthebodyofane-mailmessage.Usersenterthebodytextafterthee-mailmessageisdisplayedinthedefaulte-maileditor.

ExampleInthefollowingexample,theSubjectpropertyoftheMailEnvelopeobjectisusedtosetthesubjectvalueofacustome-mailmessage:

functionCreateMailEnvelope::OnClick(eventObj){varobjEmail;

objEmail=Application.ActiveWindow.MailEnvelope;objEmail.To="someone@example.com";objEmail.CC="someone@example.com";objEmail.BCC="someone@example.com";objEmail.Subject="Teste-mailmessage";objEmail.Visible=true;objEmail=null;}

ShowAll

SubmitAllowedProperty(ADOAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluecorrespondingtothesubmitAllowedattributeintheformdefinitionfile(.xsf).

expression.SubmitAllowed

expressionRequired.AnexpressionthatreturnsareferencetoanADOAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThedefaultvalueoftheSubmitAllowedpropertyisFalse,asisthedefaultvalueforthesubmitAllowedattribute.IfthesubmitAllowedattributeissettoTrue,theADOconnectionsupportssubmittingdataaswellasquerying.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

SubmitAllowedProperty(DAVAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluethatalwaysreturnsFalse,correspondingtothesubmitAllowedattributeintheformdefinitionfile(.xsf).

expression.SubmitAllowed

expressionRequired.AnexpressionthatreturnsareferencetoaDAVAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

SubmitAllowedProperty(EmailAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluethatalwaysreturnsTrue,correspondingtothesubmitAllowedattributeintheformdefinitionfile(.xsf).

expression.SubmitAllowed

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

SubmitAllowedProperty(HWSAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluethatisalwaysTrue,correspondingtothesubmitAllowedattributeintheformdefinitionfile(.xsf).

expression.SubmitAllowed

expressionRequired.AnexpressionthatreturnsareferencetoaHWSAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

SubmitAllowedProperty(Index)

TheSubmitAllowedpropertyreturnsavaluethatcorrespondstothesumitAllowedattributeintheformdefinitionfile(.xsf).ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaSubmitAllowedpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheSubmitAllowedproperty.

SubmitAllowedpropertyasitappliestotheADOAdapterobject.

SubmitAllowedpropertyasitappliestotheDAVAdapterobject.

SubmitAllowedpropertyasitappliestotheEmailAdapterobject.

SubmitAllowedpropertyasitappliestotheHWSAdapterobject.

SubmitAllowedpropertyasitappliestotheSharepointListAdapterobject.

SubmitAllowedpropertyasitappliestotheWebServiceAdapterobject.

SubmitAllowedpropertyasitappliestotheXMLFileAdapterobject.

ShowAll

SubmitAllowedProperty(SharePointListAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluecorrespondingtothesubmitAllowedattributeintheformdefinitionfile(.xsf).AlwaysreturnsFalsefortheSharePointListAdapterobject.

expression.SubmitAllowed

expressionRequired.AnexpressionthatreturnsareferencetoaSharepointListAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

SubmitAllowedProperty(WebServiceAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluecorrespondingtothesubmitAllowedattributeintheformdefinitionfile(.xsf).ThedefaultvalueisFalse.

expression.SubmitAllowed

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

SubmitAllowedProperty(XMLFileAdapterObject)

Aread-onlypropertythatreturnsaBooleanvaluethatalwaysreturnsFalse,correspondingtothesubmitAllowedattributeintheformdefinitionfile(.xsf).

expression.SubmitAllowed

expressionRequired.AnexpressionthatreturnsareferencetoanXMLFileAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

TaskPanesProperty

Aread-onlypropertythatreturnsareferencetotheTaskPanescollectionthatisassociatedwiththeWindowobject.

expression.TaskPanes

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheTaskPanespropertycanbeusedonlywiththeeditingwindowtypes;ifusedwithadesigningwindowtype,itwillreturnanerror.

ExampleInthefollowingexample,theTaskPanespropertyoftheWindowobjectisusedtosetareferencetotheTaskPanescollection:

varobjTaskPanes;

objTaskPanes=Application.ActiveWindow.TaskPanes;

ShowAll

TimeoutProperty(ADOAdapterObject)

SetsorretrievesthelongintegertimeoutvalueforanADOAdapterobject.

expression.Timeout

expressionRequired.AnexpressionthatreturnsareferencetotheADOAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheTimeoutpropertyoftheADOAdapterobjectcontainsthetimeoutvaluethatisusedbytheADOdataadaptertoregulatethetimeusedtosubmitandretrievedatafromanActiveXDataObjects/OLEDBexternaldatasource.

NoteTheADOAdapterobjectislimitedtoworkonlywithMicrosoftSQLServerandMicrosoftAccessdatabases.

ExampleInthefollowingexample,theTimeoutpropertyoftheADOAdapterobjectisusedtodisplaythetimeoutvalueoftheADOdataadapterinamessagebox:

varobjADOAdapter;

objADOAdapter=XDocument.DataObjects("CityList").QueryAdapter;XDocument.UI.Alert("SQLcommandtext:"+objADOAdapter.Timeout

ShowAll

TimeoutProperty(Index)

TheTimeoutpropertysetsorretrievesthetime-outvalueforsometypesofdataadapters.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaTimeoutpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheTimeoutproperty.

TimeoutpropertyasitappliestotheADOAdapterobject.

TimeoutpropertyasitappliestotheWebServiceAdapterobject.

TimeoutProperty(WebServiceAdapterObject)

Setsorretrievesthelongintegertime-outvalueinsecondsforaWebServiceAdapterobject.

expression.Timeout

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThedefaultvalueoftheTimeoutpropertyoftheWebServiceAdapterobjectis30seconds.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ToProperty(EmailAdapterObject)

Returnsorsetsastringthatrepresentstherecipientsforthee-mailmessageassociatedwithaspecifiedEmailAdapterobject.

expression.To

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThevaluemustbeasemicolon-delimitedstringthatcanberesolvedintoalistofvalide-mailaddressesbytheuser'se-mailclient.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThisexampleshowshowtousetheTopropertyofaninstanceoftheEmailAdapterobjecttochangetherecipientsofane-mailmessagebeforetheEmailAdapterobjectissubmitted:

objEmailAdapter.To=objEmailAdapter.To+";newUser@example.com";

ToProperty(Index)

TheTopropertyreturnsorsetstherecipientsofane-mailmessage.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaTopropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheToproperty.

TopropertyasitappliestotheEmailAdapterobject.

TopropertyasitappliestotheMailEnvelopeobject.

ToProperty(MailEnvelopeObject)

Setsorretrievesastringcontainingthesend-tovalueusedintheMailEnvelopeobjectthatisassociatedwithaWindowobject.

expression.To

expressionRequired.AnexpressionthatreturnsareferencetotheMailEnvelopeobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThevaluessetfortheTopropertyshouldbeastringofvalide-mailaddresses.Youcanspecifymultiplee-mailaddressesbyusing";"betweeneachofthem,asshowninthefollowingexample:

objEmail.To="someone@example.com;someone@example.com"

ExampleInthefollowingexample,theTopropertyoftheMailEnvelopeobjectisusedtosetthesend-tovalueofacustome-mailmessage:

functionCreateMailEnvelope::OnClick(eventObj){varobjEmail;

objEmail=Application.ActiveWindow.MailEnvelope;objEmail.To="someone@example.com";objEmail.CC="someone@example.com";objEmail.BCC="someone@example.com";objEmail.Subject="Teste-mailmessage";objEmail.Visible=true;objEmail=null;}

TopProperty

Aread/writepropertyoftypelongintegerthatspecifiestheverticalpositionofthewindowrepresentedbytheWindowobject,measuredinpoints.

expression.Top

expressionRequired.AnexpressionthatreturnsareferencetoaWindowobject.

RemarksTheToppropertywillreturnanerrorifitissetonawindowthatisminimizedormaximized.

SettingtheToppropertytoapositionthatisoffthescreen,willcausetheentirewindowtobedisplayedonthescreen.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

TypeProperty(DocContextChangeEventObject)

Aread-onlypropertythatreturnsastringcontainingthetypeofcontextchangeeventthatoccurredwhentheOnContextChangeeventwastriggered.

expression.Type

expressionRequired.AnexpressionthatreturnsareferencetotheDocContextChangeEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksAsdescribedintheOnContextChangeeventtopic,theTypepropertyreturnsonlythevalue"ContextNode"forcontextchangesinMicrosoftInfoPath2003ServicePack1.Nevertheless,ifcodeinaneventhandlerperformsactionsthatdependoncurrentfunctionality,thatcodeshouldstillbedesignedtocheckthevalueoftheTypeproperty,becausefutureversionsofInfoPathmayusedifferentvaluesfordifferentcontextchanges.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

TypeProperty(ErrorObject)

Aread-onlypropertythatreturnsastringvaluecontainingthetypeofanErrorobject.

expression.Type

expressionRequired.AnexpressionthatreturnsareferencetotheErrorobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTherearethreetypesorerrors:

SCHEMA_VALIDATIONDatavalidationfailedasaresultofanXMLSchema–definedconstraint.

SYSTEM_GENERATEDDatavalidationfailedasaresultofconstraintsdefinedintheformdefinition(.xsf)fileorasaresultofscriptingcodecallingtheReportErrormethodoftheDataDOMEventobject.

USER_SPECIFIEDDatavalidationfailedasaresultofacustomscriptingerrorusingtheAddmethodoftheErrorscollection.

ExampleInthefollowingexample,theTypepropertyoftheErrorobjectisusedtodisplaythetypeofanerrorinamessagebox:

varobjError;

objError=XDocument.Errors(0);XDocument.UI.Alert("Errorname:"+objError.Type);

ShowAll

TypeProperty(HTMLTaskPaneObject)

Aread-onlypropertythatreturnsavalueindicatingthetypeoftaskpanerepresentedbytheHTMLTaskPaneobject,whichisalwaysacustomtaskpane.

expression.Type

expressionRequired.AnexpressionthatreturnsareferencetotheHTMLTaskPaneobject.BasedontheXdTaskPaneTypeenumeration.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheTypepropertyoftheHTMLTaskPaneobjectisoneofthepropertiesinheritedfromtheTaskPaneobjectwhenthetypeofthetaskpaneis0,whichmeansthatitisthecustomtaskpane.

NoteTheTypepropertyisbasedontheXdTaskPaneTypeenumeration.TheseenumeratedvaluesarealsousedasargumentstotheItempropertyoftheTaskPanescollectionforreturningareferencetoaspecifiedtypeoftaskpane.

ExampleInthefollowingexample,theItempropertyoftheTaskPanescollectionisusedtosetareferencetotheHTMLTaskPaneobjectthatrepresentsthecustomtaskpane.ThentheVisiblepropertyoftheHTMLTaskPaneobjectisusedtomakethecustomtaskpaneappearintheMicrosoftOfficeInfoPath2003userinterface.ThetypevalueofthecustomtaskpaneisthesameasthevaluepassedtotheItemproperty.

varobjTaskPane;

objTaskPane=XDocument.View.Window.TaskPanes(0);objTaskPane.Visible=true;

TypeProperty(Index)

TheTypepropertyreturnsavalueindicatingthetypeoftheobject.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaTypepropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheTypeproperty.

TypepropertyasitappliestotheDocContextChangeEventobject.

TypepropertyasitappliestotheErrorobject.

TypepropertyasitappliestotheHTMLTaskPaneobject.

TypepropertyasitappliestotheTaskPaneobject.

TypepropertyasitappliestotheWindowobject.

ShowAll

TypeProperty(TaskPaneObject)

Aread-onlypropertythatreturnsavalueindicatingthetypeoftaskpanerepresentedbytheTaskPaneobject.

expression.Type

expressionRequired.AnexpressionthatreturnsareferencetotheTaskPaneobject.BasedontheXdTaskPaneTypeenumeration.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksIftheTypepropertyoftheTaskPaneobjectreturns0,thetaskpaneisacustomtaskpane.IftheTypepropertyreturnsanyothervalue,thetaskpaneisabuilt-intaskpane.

NoteTheTypepropertyisbasedontheXdTaskPaneTypeenumeration.TheseenumeratedvaluesarealsousedasargumentstotheItempropertyoftheTaskPanescollectionforreturningareferencetoaspecifiedtypeoftaskpane.

ExampleInthefollowingexample,theItempropertyoftheTaskPanescollectionisusedtosetareferencetotheTaskPaneobjectthatrepresentsthebuilt-inHelptaskpane.ThentheVisiblepropertyoftheTaskPaneobjectisusedtomaketheHelptaskpaneappearintheMicrosoftOfficeInfoPath2003userinterface.

varobjTaskPane;

objTaskPane=XDocument.View.Window.TaskPanes.Item(4);objTaskPane.Visible=true;

ShowAll

TypeProperty(WindowObject)

Aread-onlypropertythatreturnsalongintegervaluethatindicatesthetypeofwindowthatisrepresentedbytheWindowobject.ThevaluereturnedisbasedontheXdWindowTypeenumeration.

expression.Type

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheWindowobjectsrepresentthetwotypesofwindowsthatareusedintheInfoPathapplication:theeditingwindowthatisusedastheformareawhenauserfillsoutaform,andthedesigningwindowthatisusedasthedesignmodewhenauserdesignsaform.

ExampleInthefollowingexample,theTypepropertyoftheWindowobjectisusedtodeterminethetypeofwindowthatisthecurrentlyactivewindow:

if(Application.ActiveWindow.Type==0)XDocument.UI.Alert("Theactivewindowisaneditingwindow.");elseXDocument.UI.Alert("Theactivewindowisadesigningwindow.");

UIProperty

ReturnsareferencetotheMicrosoftOfficeInfoPath2003UIobject.

expression.UI

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheUI(userinterface)objectprovidesanumberofmethodsthatcanbeusedtodisplaycustomandbuilt-indialogboxes.

ExampleInthefollowingexample,theUIpropertyoftheXDocumentobjectisusedtodisplayasimplemessageboxusingtheAlertmethod:

XDocument.UI.Alert("Hereisthemessagetext.");

ShowAll

URIProperty(Index)

TheURIpropertyreturnsastringvaluethatspecifiesaUniformResourceIdentifier(URI)location.ThispropertyisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaURIpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheURIproperty.

URIpropertyasitappliestotheSolutionobject.

URIpropertyasitappliestotheXDocumentobject.

ShowAll

URIProperty(SolutionObject)

Aread-onlypropertythatreturnsastringvaluecontainingtheUniformResourceIdentifier(URI)ofaMicrosoftOfficeInfoPath2003formtemplate.

expression.URI

expressionRequired.AnexpressionthatreturnsareferencetoaSolutionobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThevalueoftheURIpropertyoftheSolutionobjectcantaketheformofaUniformResourceLocator(URL)orUniformResourceName(URN),dependingonthelocationfromwhichtheformwasopened.

ExampleInthefollowingexample,theURIpropertyoftheSolutionobjectisusedtodisplayaformtemplate'sURIinamessagebox:

XDocument.UI.Alert("URI:"+XDocument.Solution.URI);

ShowAll

URIProperty(XDocumentObject)

Aread-onlypropertythatreturnsastringvaluecontainingtheUniformResourceIdentifier(URI)ofaMicrosoftOfficeInfoPath2003form.

expression.URI

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheURIpropertycanbeusedasthenameofaformwhenaccessedthroughtheXDocumentscollection,asshowninthefollowingexample:

Application.XDocuments(XDocument.URI);

ExampleInthefollowingexample,theURIpropertyoftheXDocumentobjectisusedtodisplayaform'sURIinamessagebox:

XDocument.UI.Alert("URI:"+XDocument.URI);

UsableHeightProperty

Aread-onlypropertyoftypelongintegerthatreturnstheavailablescreenheight(themaximumnumberofpointstowhichyoucansettheheightofanInfoPathdocumentwindow.)

expression.UsableHeight

expressionRequired.AnexpressionthatreturnsareferencetoanApplicationobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UsableWidthProperty

Aread-onlypropertyoftypelongintegerthatreturnstheavailablescreenwidth(themaximumnumberofpointstowhichyoucansetthewidthofanInfoPathdocumentwindow.)

expression.UsableWidth

expressionRequired.AnexpressionthatreturnsareferencetoanApplicationobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UserProperty

Aread-onlypropertythatreturnsareferencetotheUserobject.

expression.User

expressionRequired.AnexpressionthatreturnsareferencetoanApplicationobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

UtilProperty

Read-onlypropertythatreturnsareferencetotheUtilobject.

expression.Util

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

VersionProperty(ApplicationObject)

Aread-onlypropertythatreturnsastringcontainingtheMicrosoftOfficeInfoPath2003versionnumber.

expression.Version

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheversionnumberoftheapplicationdoesnotcontainthename.Toobtainthenameofanapplication,usetheNamepropertyoftheApplicationobject.

Toobtaintheversionnumberofaformtemplate,usetheVersionpropertyoftheSolutionobject.

ExampleInthefollowingexample,theVersionpropertyoftheApplicationobjectisusedtodisplaytheapplication'sversionnumberinamessagebox:

XDocument.UI.Alert("Applicationversion:"+Application.Version);

VersionProperty(Index)

TheVersionpropertyreturnsastringvaluethatspecifiesaversionnumber.ThispropertyisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaVersionpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheVersionproperty.

VersionpropertyasitappliestotheApplicationobject.

VersionpropertyasitappliestotheSolutionobject.

ShowAll

VersionProperty(SolutionObject)

Aread-onlypropertythatreturnsastringcontainingtheversionnumberofaMicrosoftOfficeInfoPath2003formtemplate.

expression.Version

expressionRequired.AnexpressionthatreturnsareferencetotheSolutionobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksToobtaintheversionnumberoftheInfoPathapplication,usetheVersionpropertyoftheApplicationobject.

ExampleInthefollowingexample,theVersionpropertyoftheSolutionobjectisusedtodisplayaformtemplate'sversionnumberinamessagebox:

XDocument.UI.Alert("Formtemplateversion:"+XDocument.Solution.

ViewProperty

Aread-onlypropertythatreturnsareferencetotheViewobjectassociatedwithaMicrosoftOfficeInfoPath2003form.

expression.View

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheViewobjectthattheViewpropertyaccessesrepresentstheviewthatiscurrentlyactiveinanInfoPathform.AfteryouhavesetareferencetotheViewobject,youcanaccessanyofitspropertiesandmethodstoprogrammaticallyinteractwiththeview.

ExampleInthefollowingexample,theViewpropertyoftheXDocumentobjectisusedtosetareferencetotheViewobject;then,usingtheNamepropertyoftheViewobject,itdisplaysthenameoftheviewinamessagebox:

varobjView;

objView=XDocument.View;XDocument.UI.Alert("Viewname:"+objView.Name);

ViewInfosProperty

Aread-onlypropertythatreturnsareferencetotheViewInfoscollectionassociatedwithaMicrosoftOfficeInfoPath2003form.

expression.ViewInfos

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheViewInfoscollectioncontainsacollectionofViewInfoobjectsthatcontaininformationabouteachoftheviewsimplementedinanInfoPathform.

ExampleInthefollowingexample,theViewInfospropertyoftheXDocumentobjectisusedtosetareferencetotheViewInfoscollection;then,usingtheCountpropertyoftheViewInfoscollection,itloopsthroughthecollectiontodeterminethedefaultviewusingtheIsDefaultpropertyoftheViewInfoobject.Whenthedefaultviewisfound,thecodedisplaysthenameoftheviewinamessagebox.

varobjViewInfos;objViewInfos=XDocument.ViewInfos;for(i=0;i<objViewInfos.Count;i++){if(objViewInfos(i).IsDefault)XDocument.UI.Alert("Thedefaultviewis:"+objViewInfos(i).Name);}

ShowAll

VisibleProperty(HTMLTaskPaneObject)

SetsorretrievesaBooleanvalueindicatingthatthetaskpanerepresentedbytheHTMLTaskPaneobject,whichisalwaysacustomtaskpane,isvisibleintheMicrosoftOfficeInfoPath2003userinterface.

expression.Visible

expressionRequired.AnexpressionthatreturnsareferencetotheHTMLTaskPaneobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheVisiblepropertyoftheHTMLTaskPaneobjectisoneofthepropertiesinheritedfromtheTaskPaneobjectwhenthetypeofthetaskpaneis0,whichmeansthatitisthecustomtaskpane.

SettingtheVisiblepropertytoTruecausesthetaskpanetoappearintheuserinterface,andsettingittoFalsecausesittoberemovedfromtheuserinterface.

ExampleInthefollowingexample,theItempropertyoftheTaskPanescollectionisusedtosetareferencetotheHTMLTaskPaneobjectthatrepresentsthecustomtaskpane.ThentheVisiblepropertyoftheHTMLTaskPaneobjectisusedtomakethecustomtaskpaneappearintheInfoPathuserinterface.

varobjTaskPane;

objTaskPane=XDocument.View.Window.TaskPanes(0);objTaskPane.Visible=true;

VisibleProperty(Index)

TheVisiblepropertyspecifiesorreturnsaBooleanvalueindicatingwhethertheuserinterfacecomponentrepresentedbytheobjectisvisibleintheuserinterface.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaVisiblepropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheVisibleproperty.

VisiblepropertyasitappliestotheHTMLTaskPaneobject.

VisiblepropertyasitappliestotheMailEnvelopeobject.

VisiblepropertyasitappliestotheTaskPaneobject.

VisibleProperty(MailEnvelopeObject)

SetsorretrievesaBooleanvaluethatindicatesthevisibilityofthecustome-mailmessagecreatedwiththeMailEnvelopeobjectthatisassociatedwithaWindowobject.

expression.Visible

expressionRequired.AnexpressionthatreturnsareferencetotheMailEnvelopeobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksWhentheVisiblepropertyoftheMailEnvelopeobjectissettoTrue,thecustome-mailmessagewillbedisplayedusingthedefaulte-maileditor.Ifthereisnodefaulte-maileditorconfigured,theVisiblepropertywillreturnanerror.

ExampleInthefollowingexample,theVisiblepropertyoftheMailEnvelopeobjectisusedtodisplayacustome-mailmessageinthedefaulte-maileditor:

functionCreateMailEnvelope::OnClick(eventObj){varobjEmail;

objEmail=Application.ActiveWindow.MailEnvelope;objEmail.To="someone@example.com";objEmail.CC="someone@example.com";objEmail.BCC="someone@example.com";objEmail.Subject="Teste-mailmessage";objEmail.Visible=true;objEmail=null;}

ShowAll

VisibleProperty(TaskPaneObject)

SetsorretrievesaBooleanvalueindicatingthatthetaskpanerepresentedbytheTaskPaneobjectisvisibleintheMicrosoftOfficeInfoPath2003userinterface.

expression.Visible

expressionRequired.AnexpressionthatreturnsareferencetotheTaskPaneobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksSettingtheVisiblepropertytoTruecausesthetaskpanetoappearintheuserinterface,andsettingittoFalsecausesittoberemovedfromtheuserinterface.

ExampleInthefollowingexample,theItempropertyoftheTaskPanescollectionisusedtosetareferencetotheTaskPaneobjectthatrepresentsthebuilt-inHelptaskpane.ThentheVisiblepropertyoftheTaskPanesobjectisusedtomaketheHelptaskpaneappearintheInfoPathuserinterface.

varobjTaskPane;

objTaskPane=XDocument.View.Window.TaskPanes(4);objTaskPane.Visible=true;

WidthProperty

Aread/writepropertyoftypelongintegerthatspecifiesthewidthofthewindowrepresentedbytheWindowobject,measuredinpoints.

expression.Width

expressionRequired.AnexpressionthatreturnsareferencetoaWindowobject.

RemarksTheWidthpropertywillreturnanerrorifitissetonawindowthatisminimizedormaximized.

TheWidthpropertycan'tbesettoavaluethatislargerthanthevaluereturnedbytheUsableWidthproperty.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

WindowProperty(HTMLTaskPaneExternalObject)

Aread-onlypropertythatreturnsareferencetotheWindowobjectassociatedwithacustomtaskpane.

expression.Window

expressionRequired.AnexpressionthatreturnsareferencetotheHTMLTaskPaneExternalobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheWindowobjectreturnedbytheWindowpropertyrepresentsthecurrentlyactiveMicrosoftOfficeInfoPath2003windowthatisassociatedwiththecustomtaskpane.

ExampleInthefollowingexample,theHTMLTaskPaneExternalobjectisusedthroughtheexternalpropertyoftheDynamicHTML(DHTML)windowobjecttosetareferencetotheWindowobjectthatispartoftheInfoPathobjectmodel:

varobjWindow;

objWindow=window.external.Window;objWindow.MailEnvelope.Visible=true;

WindowProperty(Index)

TheWindowpropertyreturnsareferencetoaWindowobject.ThispropertyisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaWindowpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheWindowproperty.

WindowpropertyasitappliestotheHTMLTaskPaneExternalobject.

WindowpropertyasitappliestotheViewobject.

ShowAll

WindowProperty(ViewObject)

Aread-onlypropertythatreturnsareferencetothewindowobjectassociatedwithaview.

expression.Window

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheWindowobjectreturnedbytheWindowpropertyrepresentsthecurrentlyactiveMicrosoftOfficeInfoPath2003window.ItcanalsobeaccessedthroughtheWindowscollection.

ExampleInthefollowingexample,theWindowpropertyoftheViewobjectisusedtosetareferencetothefirsttaskpanecontainedintheTaskPanescollection:

varobjTaskPane;

objTaskPane=XDocument.View.Window.TaskPanes(0);

WindowsProperty

Aread-onlypropertythatreturnsareferencetotheWindowscollection.

expression.Windows

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksAfteryouhavesetareferencetotheWindowscollection,youcanuseitspropertiestoaccesseachoftheWindowobjectsthatitcontains.

NoteTheWindowscollectioncanbeusedonlytogetthecountoftheWindowobjectsthatitcontainsortoreturnareferencetoaWindowobject.ItcannotbeusedtoaddorremoveWindowobjects.

ExampleInthefollowingexample,theWindowspropertyisusedtoaccesstheCountpropertyoftheWindowscollectionanddisplaythevalueinamessagebox:

XDocument.UI.Alert("CountofWindows:"+Application.Windows.Count);

WindowStateProperty

Aread/writepropertyoftypeXdWindowStatethatreturnsorsetsthestateofthewindowrepresentedbytheWindowobject.

expression.WindowState

expressionRequired.AnexpressionthatreturnsareferencetoaWindowobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

WSDLURLProperty

Aread-onlypropertythatreturnsastringvaluecontainingtheUniformResourceLocator(URL)oftheWebServicesDescriptionLanguage(WSDL)filefortheWebserviceassociatedwiththeWebServiceAdapterobject.

expression.WSDLURL

expressionRequired.AnexpressionthatreturnsareferencetotheWebServiceAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheWSDLfileisanXMLdocumentthatdefinestheformatofmessagesanXMLWebserviceunderstands.TheservicedescriptionservesasanagreementthatdefinesthebehaviorofanXMLWebserviceandinstructspotentialclientsinhowtointeractwithit.ThebehaviorofanXMLWebserviceisdeterminedbymessagingpatternsthattheservicedefinesandsupports.ThesepatternsconceptuallydictatewhattheserviceconsumercanexpecttohappenwhenaproperlyformattedmessageissubmittedtotheXMLWebservice.

ExampleInthefollowingexample,theWSDLURLpropertyoftheWebServiceAdapterobjectisusedtodisplaytheURLoftheWSDLfilethatisusedfortheWebservice:

varobjWSAdapter;

objWSAdapter=XDocument.DataObjects("WebCityList").QueryAdapter;XDocument.UI.Alert("WSDLfileURL:"+objWSAdapter.WSDLURL

ShowAll

XDocumentProperty(DataDOMEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeDataDOMEventobjectduringadatavalidationevent.

expression.XDocument

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksAfteryouhavesetareferencetotheXDocumentobjectthattheXDocumentpropertyoftheDataDOMEventobjectreturns,youcanuseanyofthepropertiesandmethodsthatitprovides.

ExampleInthefollowingexample,theXDocumentpropertyoftheDataDOMEventobjectisusedtosetareferencetotheXDocumentobject:

varobjXDoc;

objXDoc=eventObj.XDocument;

XDocumentProperty(DocActionEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeDocActionEventobjectduringanOnClickevent.

expression.XDocument

expressionRequired.ReturnsareferencetotheDocActionEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksAfteryouhavesetareferencetotheXDocumentobjectthattheXDocumentpropertyoftheDocActionEventobjectreturns,youcanuseanyofthepropertiesandmethodsthatitprovides.

ExampleInthefollowingexample,theXDocumentpropertyoftheDocActionEventobjectisusedtosetareferencetotheXDocumentobject:

varobjXDoc;

objXDoc=eventObj.XDocument;

XDocumentProperty(DocContextChangeEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeDocContextChangeEventobjectinanOnContextChangeevent.

expression.XDocument

expressionRequired.ReturnsareferencetoaDocContextChangeEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

XDocumentProperty(DocEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeDocEventobjectduringanOnSwitchVieworOnAfterChangeevent.

expression.XDocument

expressionRequired.ReturnsareferencetotheDocEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksAfteryouhavesetareferencetotheXDocumentobjectthattheXDocumentpropertyoftheDocEventobjectreturns,youcanuseanyofthepropertiesandmethodsthatitprovides.

ExampleInthefollowingexample,theXDocumentpropertyoftheDocEventobjectisusedtosetareferencetotheXDocumentobject:

varobjXDoc;

objXDoc=eventObj.XDocument;

XDocumentProperty(DocReturnEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeDocReturnEventobjectduringanOnLoadorOnSubmitRequestevent.

expression.XDocument

expressionRequired.ReturnsareferencetotheDocReturnEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksAfteryouhavesetareferencetotheXDocumentobjectthattheXDocumentpropertyoftheDocReturnEventobjectreturns,youcanuseanyofthepropertiesandmethodsthatitprovides.

ExampleInthefollowingexample,theXDocumentpropertyoftheDocReturnEventobjectisusedtosetareferencetotheXDocumentobject:

varobjXDoc;

objXDoc=eventObj.XDocument;

ShowAll

XDocumentProperty(HTMLTaskPaneExternalObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectassociatedwithacustomtaskpane.

expression.XDocument

expressionRequired.AnexpressionthatreturnsareferencetotheHTMLTaskPaneExternalobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheXDocumentobjectreturnedbytheXDocumentpropertyrepresentstheform'sunderlyingXMLdocumentthatisassociatedwiththecustomtaskpane.

ExampleInthefollowingexample,theHTMLTaskPaneExternalobjectisusedthroughtheexternalpropertyoftheDynamicHTML(DHTML)windowobjecttosetareferencetotheXDocumentobjectthatispartoftheInfoPathobjectmodel:

varobjXDoc;

objXDoc=window.external.XDocument;objXDoc.View.SwitchView("View2");

XDocumentProperty(Index)

TheXDocumentpropertyreturnsareferencetoanXDocumentobject.ThispropertyisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelobjects.ClickanXDocumentpropertylinkbelowtoviewtheHelptopicforaspecificimplementationoftheXDocumentproperty.

XDocumentpropertyasitappliestotheDataDOMEventobject.

XDocumentpropertyasitappliestotheDocActionEventobject.

XDocumentpropertyasitappliestotheDocContextChangeEventobject.

XDocumentpropertyasitappliestotheDocEventobject.

XDocumentpropertyasitappliestotheDocReturnEventobject.

XDocumentpropertyasitappliestotheHTMLTaskPaneExternalobject.

XDocumentpropertyasitappliestotheMergeEventobject.

XDocumentpropertyasitappliestotheSaveEventobject.

XDocumentpropertyasitappliestotheVersionUpgradeEventobject.

XDocumentpropertyasitappliestotheWindowobject.

XDocumentProperty(InfoPathControlSiteObject)

RetrievesareferencetotheXDocumentobjectassociatedwiththeviewthatcontainsthecontrol.

expression.XDocument

expressionRequired.AnexpressionthatreturnsareferencetotheInfoPathControlobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

XDocumentProperty(MergeEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeMergeEventobjectinanOnMergeRequestevent.

expression.XDocument

expressionRequired.ReturnsareferencetoaMergeEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

XDocumentProperty(SignEventObject)

RetrievesareferencetotheXDocumentobjectassociatedwiththeOnSignevent.

expression.XDocument

expressionRequired.AnexpressionthatreturnsareferencetoaSignEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

XDocumentProperty(VersionUpgradeEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeVersionUpgradeEventobjectduringanOnVersionUpgradeevent.

expression.XDocument

expressionRequired.ReturnsareferencetotheVersionUpgradeEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksAfteryouhavesetareferencetotheXDocumentobjectthattheXDocumentpropertyoftheVersionUpgradeEventobjectreturns,youcanuseanyofthepropertiesandmethodsthatitprovides.

ExampleInthefollowingexample,theXDocumentpropertyoftheVersionUpgradeEventobjectisusedtosetareferencetotheXDocumentobject:

varobjXDoc;

objXDoc=eventObj.XDocument;

ShowAll

XDocumentProperty(WindowObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththewindowthatisrepresentedbytheWindowobject.

expression.XDocument

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheXDocumentpropertycanbeusedonlywiththeeditingwindowtypes;ifusedwithadesigningwindowtype,itwillreturnanerror.Itwillalsoreturnanerrorifnoformisopenintheformarea.

ExampleInthefollowingexample,theXDocumentpropertyoftheWindowobjectisusedtosetareferencetotheform'sunderlyingXMLdocumentthatisassociatedwiththecurrentlyactivewindow:

varobjXDoc;

objXDoc=Application.ActiveWindow.XDocument;

XDocumentsProperty

Aread-onlypropertythatreturnsareferencetotheXDocumentscollection.

expression.XDocuments

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksAfteryouhavesetareferencetotheXDocumentscollection,youcanuseitspropertiestoaccesseachoftheXDocumentobjectsthatitcontains.

ExampleInthefollowingexample,theXDocumentspropertyisusedtoaccesstheCountpropertyoftheXDocumentscollectionanddisplaythevalueinamessagebox:

XDocument.UI.Alert("CountofXDocuments:"+Application.XDocuments

ShowAll

XPathProperty

Aread-onlypropertythatreturnstheXPathexpressionofaSignedDataBlockobject.

expression.XPath

expressionRequired.AnexpressionthatreturnsareferencetoaSignedDataBlockobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

XPathNamespaceDeclarationsProperty

Aread-onlypropertycontainingthenamespacedeclarationsfortheXPathexpressionreturnedbytheXPathpropertyofaSignedDataBlockobject.

expression.XPathNamespaceDeclarations

expressionRequired.AnexpressionthatreturnsareferencetoaSignedDataBlockobject

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ActivateMethod

ActivatesthewindowthatisrepresentedbytheWindowobject.

expression.Activate()

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheActivatemethodcanbeusedonlywiththeeditingwindowtypes;ifusedwithadesigningwindowtype,itwillreturnanerror.

Todeterminewhetherawindowistheactivewindow,usetheActivepropertyoftheWindowobject.

ExampleInthefollowingexample,theActivatemethodoftheWindowobjectisusedtoactivateawindowthatisassociatedwiththeview.Notethecheckofthewindowtype.

varobjWindow;

//Setareferencetoaview'sassociatedwindow.objWindow=XDocument.View.Window;if(objWindow.Type==0){//Makethewindowtheactivewindow.objWindow.Activate();}

objWindow=null;

ShowAll

AddMethod

AddsanErrorobjecttotheErrorscollectionandreturnsareferencetothenewErrorobject.

expression.Add(ByValvarNodeAsVariant,ByValbstrConditionNameAsString,ByValbstrShortErrorMessageAsString,[ByValbstrDetailedErrorMessageAsString],[ByVallErrorCodeAsLong],[ByValbstrTypeAsString="modeless"])AsError

expressionRequired.AnexpressionthatreturnsareferencetotheErrorscollection.

varNodeRequiredVariant.TheXMLnodethattheerrorwillbeassociatedwith.

bstrConditionNameRequiredString.Thenameoftheerror.

bstrShortErrorMessageRequiredString.Theshortmessagefortheerror.

bstrDetailedErrorMessageOptionalString.Thedetailedmessagefortheerror.

lErrorCodeOptionalLongInteger.Defaultvalueis0.Theerrorcodeoftheerror.

bstrTypeOptionalString.Defaultvalueis"modeless".Thetypeoferrorprocessing.Theothersupportedvalueis"modal".

returnsAreferencetothenewlycreatedErrorobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheAddmethodisusedtocreatecustomerrormessagesinaMicrosoftOfficeInfoPath2003form.TherearetwotypesoferrorsthatcanbecreatedusingtheAddmethod:

modelessTheuserisnotifiedoftheerrorwithaninlinealertandcanchoosetoreturntothepreviousvaluewithanundooperation.

modalTheuserisnotifiedoftheerrorwithadialogboxalert.AfterclickingOKinthedialogboxalert,theerrorwillappearasaninlinealertandtheusercanchoosetoreturntothepreviousvaluewithanundooperation.

NoteCustomerrorscanalsobecreatedusingtheReportErrormethodoftheDataDOMEventobject.

ExampleInthefollowingexample,theAddmethodoftheErrorscollectionisusedtocreateacustomerrormessage:

varobjErrors;varobjError;

objErrors=XDocument.Errors;objError=objErrors.Add(MyXMLNode,"ValidationError","Thedataisinvalid.");

AlertMethod

DisplaysamessageboxwithacustomtextmessageinaMicrosoftOfficeInfoPath2003form.

expression.Alert(ByValbstrAlertStringAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheUIobject.

bstrAlertStringRequiredString.Thetexttobedisplayed.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheAlertmethoddisplaysasimplemessageboxthatusesaninformationiconandanOKbutton.Onlythetextinthemessageboxcanbecustomized.

NoteCarriagereturnscanbeinsertedintothetextofthecustommessagebyusingthestandard\ncharacters.

ExampleInthefollowingexample,theAlertmethodoftheUIobjectisusedtodisplayamessagebox:

XDocument.UI.Alert("Custommessagetextgoeshere.");

AvgMethod

ReturnsaVariantthatistheaveragevalueofallofthenumericalelementsinanodeset.

expression.Avg(ByValpxmllistInputAsIXMLDOMNodeList)AsVariant

expressionRequired.AnexpressionthatreturnsareferencetotheMathobject.

pxmllistInputRequiredIXMLDOMNodeList.Thenodesetthatcontainsthevaluestobeaveraged.

returnsAVariantthatrepresentstheaveragevalueofallthenumericalelementsinanodeset.

Security0:Canbeaccessedwithoutrestrictions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,thevariableaverageAgeissettotheaveragevalueofallofthenumericalelementsinthemy:agesnodeset.

varages=XDocument.DOM.selectNodes("//my:ages");varaverageAge=XDocument.Util.Math.Avg(ages);

BuildSQLFromXMLNodesMethod

ReturnsastringcontaininganSQLcommandtextfragmentusingthespecifiedXMLnode.

expression.BuildSQLFromXMLNodes(ByRefpXmlNodeAsIXMLDOMNode)AsString

expressionRequired.AnexpressionthatreturnsareferencetotheADOAdapterobject.

pXmlNodeRequiredObject.TheXMLnodetobeconvertedtoanSQLfragment.

returnsString.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThefragmentofSQLthattheBuildSQLFromXMLNodesmethodgeneratesisanSQLWHEREclauseintheformoffield=value.TheXMLnodethatyouuseforthepXmlNodeargumentshouldbeadescendantofthedfs:queryFieldsnode;whenyouhavetheSQLcommandtextfragment,youcanaddittotheexistingSQLcommandstringoftheADOAdapterobjectusingtheCommandproperty.

ExampleInthefollowingexample,theBuildSQLFromXMLNodesmethodoftheADOAdapterobjectisusedtocreateanSQLcommandtextfragmentbasedonaspecifiedXMLnode.ThisexampleisbasedonaformthatusestheOrderstableintheMicrosoftSQLServerNorthwindsampledatabase.

functionQueryGreaterThan(){varobjQueryFieldNode;varstrWhereClause;varstrOldCommand;varobjQueryFieldAttributes;varobjCurQueryFieldAttribute;

//BuildtheWHEREclausefromtheQueryFieldsintheform's//underlyingXMLDOM.objQueryFieldNode=XDocument.DOM.selectSingleNode("dfs:myFields/dfs:queryFields/q:Orders");strWhereClause=XDocument.QueryAdapter.BuildSQLFromXMLNodes(objQueryFieldNode);

//Replacethe'='signswith'>=',andappendtheclauseto//theSQLcommandtext.strWhereClause=strWhereClause.replace(/=/,">=");strOldCommand=XDocument.QueryAdapter.Command;if(strWhereClause!=""){XDocument.QueryAdapter.Command=strOldCommand+"where"+strWhereClause;}

//CleartheQueryFieldssotheWHEREclauseisn't//automaticallygenerated.objQueryFieldAttributes=objQueryFieldNode.attributes;while(objCurQueryFieldAttribute=objQueryFieldAttributes.nextNode()){objCurQueryFieldAttribute.text="";}//Performthequery.try{XDocument.Query();}catch(e){XDocument.UI.Alert("Failedtoquery.\n\n"+e.message);}//Resetthecommandsothatsubsequentqueriesarebasedon//thecorrectSQLcommandtextstring.XDocument.QueryAdapter.Command=strOldCommand;

//Cleanup.objQueryFieldNode=null;strWhereClause=null;strOldCommand=null;objQueryFieldAttributes=null;objCurQueryFieldAttribute=null;

}

ShowAll

CacheSolutionMethod(ApplicationObject)

Examinestheformtemplateinthecacheand,ifnecessary,updatesitfromthepublishedlocationoftheformtemplate.

expression.CacheSolution(ByValbstrSolutionURIAsString)

expressionRequired.AnexpressionthatreturnsareferencetoanApplicationobject.

bstrSolutionURIRequiredString.ThestringthatspecifiestheUniformResourceIdentifier(URI)oftheformtemplate.Thisparametercanbespecifiedasaformdefinition(.xsf)fileoraformtemplate(.xsn)file.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksIftheformtemplatethatcurrentlyexistsinthecachematchestheformtemplatefromthepublishedlocation,nocachingtakesplace.Ifthecomputerisofflineandtheformisalreadyinthecache,thecacheiskeptandnoupdatewilloccur.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingVisualBasicforApplications(VBA)example,theCacheSolutionmethodoftheApplicationobjectisusedtocacheaformtemplate:

PublicSubCacheFormTemplate()

DimIAsIntegerDimobjAppAsObjectDimaryForms(2)AsString

'CreateareferencetotheApplicationobject.SetobjApp=CreateObject("InfoPath.Application")

'Populatethearraywithformtemplatelocations.aryForms(0)="\\MyServer\MyForms\MyForm.xsn"aryForms(1)="\\MyServer\MyForms\manifest.xsf"

'Loopthroughthearrayandcachetheformtemplates.ForI=0ToUBound(aryForms)-1objApp.CacheSolution(aryForms(I))NextI

EndSub

ShowAll

CacheSolutionMethod(ExternalApplicationObject)

Examinestheformtemplateinthecacheand,ifnecessary,updatesitfromthepublishedlocationoftheformtemplate.

expression.CacheSolution(ByValbstrSolutionURIAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

bstrSolutionURIRequiredString.ThestringvaluethatspecifiestheUniformResourceIdentifier(URI)oftheformtemplate.Thisparametercanbespecifiedasaformdefinition(.xsf)fileoraformtemplate(.xsn)file

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksIftheformtemplatethatcurrentlyexistsinthecachematchestheformtemplatefromthepublishedlocation,nocachingtakesplace.Ifthecomputerisofflineandtheformisalreadyinthecache,thecacheiskeptandnoupdatewilloccur.

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theCacheSolutionmethodoftheExternalApplicationobjectisusedtocacheaformtemplate:

PublicSubCacheFormTemplate()

DimIAsIntegerDimobjExternalAppAsObjectDimaryForms(2)AsString

'CreateareferencetotheExternalApplicationobject.SetobjExternalApp=CreateObject("InfoPath.ExternalApplication")

'Populatethearraywithformtemplatelocations.aryForms(0)="\\MyServer\MyForms\MyForm.xsn"aryForms(1)="\\MyServer\MyForms\manifest.xsf"

'Loopthroughthearrayandcachetheformtemplates.ForI=0ToUBound(aryForms)-1objExternalApp.CacheSolution(aryForms(I))NextI

EndSub

ShowAll

CacheSolutionMethod(Index)

TheCacheSolutionmethodexaminestheformtemplateinthecacheand,ifnecessary,updatesitfromthepublishedlocationoftheformtemplate.ThismethodisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickaCacheSolutionmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheCacheSolutionmethod.

CacheSolutionmethodasitappliestotheApplicationobject.

CacheSolutionmethodasitappliestotheExternalApplicationobject.

ShowAll

CloseMethod(ExternalApplicationObject)

ClosesthespecifiedMicrosoftOfficeInfoPath2003form.

expression.Close(ByValbstrDocumentURIAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

bstrDocumentURIRequiredString.ThestringvaluethatspecifiestheUniformResourceIdentifier(URI)ofaform.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksTheClosemethodclosesthecurrentlyopenformwithoutquittingtheInfoPathapplication.WhenusingtheClosemethod,theformisclosedunconditionally,meaningthatanychangesmadetothedataintheformarenotsaved.

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theClosemethodoftheExternalApplicationobjectisusedtoclosethecurrentlyopenform:

PublicSubAutomateInfoPathForm()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.ExternalApplication")

'OpenanInfoPathform.objIP.Open("C:\MyForms\Form1.xml")MsgBox("TheInfoPathformhasbeenopened.")

'ClosetheInfoPathform.objIP.Close("C:\MyForms\Form1.xml")MsgBox("TheInfoPathformhasbeenclosed.")

'QuittheInfoPathapplication.objIP.QuitMsgBox("TheInfoPathapplicationhasbeenclosed.")

SetobjIP=Nothing

EndSub

CloseMethod(Index)

TheClosemethodclosestheitemassociatedwiththespecifiedcollectionorobject.ThismethodisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollectionsandobjects.ClickaClosemethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheClosemethod.

ClosemethodasitappliestotheExternalApplicationobject.

ClosemethodasitappliestotheWindowobject.

ClosemethodasitappliestotheXDocumentscollection.

ShowAll

CloseMethod(WindowObject)

ClosesthewindowthatisrepresentedbytheWindowobject.

expression.Close([ByValbForceAsBoolean])

expressionRequired.AnexpressionthatreturnsareferencetotheWindowobject.

bForceOptionalBoolean.DefaultvalueisFalse.Determineswhetheropendocumentswillbesaved.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheClosemethodwillclosetheassociatedwindowandtheformsthatitcontains.IfthebForceparameterissettoTrue,allformswillbeclosedwithoutsaving,eveniftheycontainchangessincetheywerelastsaved.IfsettoFalse,userswillbepromptedtosavetheirchanges.

TheClosemethodcanbeusedonlywiththeeditingwindowtypes;ifusedwithadesigningwindowtype,itwillreturnanerror.Inaddition,theClosemethodcanonlybeusedwiththeOnSubmitRequestandOnClickeventhandlers.Ifusedwithanyothertypeofeventhandler,itwillreturnanerror.

NoteIfthewindowbeingclosedistheonlywindowopeninMicrosoftOfficeInfoPath2003,theInfoPathapplicationwillalsobeclosed.

ExampleInthefollowingexample,theClosemethodoftheWindowobjectisusedtoclosethecurrentlyactivewindow,forcingasaveifchangesintheformhaveoccurred:

Application.ActiveWindow.Close(false);

ShowAll

CloseMethod(XDocumentsCollection)

ClosesthespecifiedMicrosoftOfficeInfoPath2003form.

expression.Close(ByValvarIndexAsVariant)

expressionRequired.AnexpressionthatreturnsareferencetotheXDocumentscollection.

varIndexRequiredVariant.ThestringvaluethatspecifiestheUniformResourceIdentifier(URI)ofaform,alongintegervaluethatspecifiesthepositionalindexofanXDocumentobjectwithintheXDocumentscollection,orareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheClosemethodclosesthecurrentlyopenformwithoutquittingtheInfoPathapplication.Theformisclosedunconditionally,meaningthatanychangesmadetothedataintheformarenotsaved.

ExampleInthefollowingexample,theClosemethodoftheXDocumentscollectionisusedtoclosethecurrentlyopenformusingthepositionalindexofanXDocumentobjectcontainedinthecollection:

Application.XDocuments.Close(0);

Alternatively,youcanpassareferencetoanXDocumentobject:

varobjXDoc;

objXDoc=Application.XDocuments(0);Application.XDocuments.Close(objXDoc);

ConfirmMethod

Displaysamessageboxwithbuttonsforinputfromauser.ThevaluethatisreturnedisoneoftheXdConfirmChoiceenumeratedconstants.

expression.Confirm(promptAsString,buttonsAsXdConfirmButtons)AsXdConfirmChoice

expressionRequired.AnexpressionthatreturnsareferencetotheUIobject

bstrPromptRequiredString.Thetextmessagetobedisplayed.

lButtonsRequiredXdConfirmButtons.Specifiesthenumberandtypeofbuttonstodisplay.YoumayspecifyanyofthevaluesoftheXdConfirmButtonsenumeration.

Security2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Remarks

ExampleInthefollowingexample,theConfirmmethodoftheUIobjectisusedtodisplayadialogboxwithYesandNobuttons:

XDocument.UI.Confirm("Doyouwishtocontinue?",4);

CreateMethod

CreatesanewSignatureobject.ThismethodcanbecalledonlyfromtheOnSigneventhandler.

expression.Create()

expressionRequired.AnexpressionthatreturnsaSignaturescollection.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksThedigitalsignatureinnotactuallywrittentothefileuntiltheSignmethodiscalledforthenewlycreatedSignatureobject.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

CreateDOMMethod

CreatesanewinstanceoftheXMLDocumentObjectModel(DOM)inmemory.

expression.CreateDOM()AsXMLDOMDocument

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

returnsAreferencetotheXMLDOM.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksUsingtheCreateDOMmethodtocreateaninstanceoftheXMLDOMisequivalenttousingthefollowingmethodofcreatingaMicrosoftXMLCoreServices(MSXML)5.0DOMDocumentobject:

varobjDoc=newActiveXObject("Msxml2.DOMDocument.5.0");NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theCreateDOMmethodoftheXDocumentobjectisusedtocreateaninstanceofXMLDOMandassignittoavariable.

varobjDOM=XDocument.CreateDOM();

ShowAll

DeleteMethod

DeletesthespecifiedErrorobjectfromtheErrorscollection.

expression.Delete(ByValvarNodeAsVariant,ByValbstrConditionNameAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheErrorscollection.

varNodeRequiredVariant.TheXMLDocumentObjectModel(DOM)nodeassociatedwiththeerror.

bstrConditionNameRequiredString.Thenameoftheerror.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheDeletemethoddeletesalltheErrorobjectsintheErrorscollectionthatareassociatedwiththespecifiedXMLnodeandthathavethesamename.TodeletealloftheErrorobjectscontainedintheErrorscollection,usetheDeleteAllmethod.

NoteTheDeletemethodwillonlydeleteerrorsthatwerecreatedusingtheAddmethodoftheErrorscollection.Itcannotbeusedtodeleteerrorsthatoccurbecauseofschemaordatavalidationconstraints,orerrorsthatwerecreatedusingtheReportErrormethodoftheDataDOMEventobject.

ExampleInthefollowingexample,theDeletemethodoftheErrorscollectionisusedtodeletealltheerrorsbasedontheirassociatedXMLnodeandname:

XDocument.Errors.Delete(MyXMLNode,"ValidationError");

DeleteAllMethod

DeletesalloftheErrorobjectscontainedintheErrorscollection.

expression.DeleteAll()

expressionRequired.AnexpressionthatreturnsareferencetotheErrorscollection.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTodeleteaspecificErrorobjectfromtheErrorscollection,usetheDeletemethod.

NoteUnliketheDeletemethodthatwillonlydeleteerrorsthatwerecreatedusingtheAddmethodoftheErrorscollection,theDeleteAllmethodwilldeleteallerrorsintheErrorscollection,regardlessofhowtheywerecreated.

ExampleInthefollowingexample,theDeleteAllmethodoftheErrorscollectionisusedtodeletealltheerrorsthatitcontains:

XDocument.Errors.DeleteAll();

DisableAutoUpdateMethod

Disablesautomaticsynchronizationbetweenaform'sunderlyingXMLdocumentandtheassociatedViewobject.

expression.DisableAutoUpdate()

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheviewsinaMicrosoftOfficeInfoPath2003formareautomaticallysynchronizedwiththedatathatiscontainedinaform'sunderlyingXMLdocument.YoucanoverridethisbyusingtheDisableAutoUpdatemethod.Youmayneedtodothisforperformancereasons,suchaswhenyouareprogramaticallymakingmanychangestoaform'sunderlyingXMLdocumentandyoudonotwanttheviewtoberefresheduntilthechangesarecomplete.

AutomaticsynchronizationcanbeenabledusingtheEnableAutoUpdatemethodoftheViewobject.

ExampleInthefollowingexample,theDisableAutoUpdatemethodoftheViewobjectisusedtodisablesynchronizationbetweenaform'sunderlyingXMLdocumentandtheviewthatitisassociatedwith:

XDocument.View.DisableAutoUpdate();

EnableMethod

DefinesamethodthatmustbeprovidedbythedeveloperforInfoPathtocallwhenitneedstoenableordisableaninstanceofthecontrolinaview.

expression.Enable(vfEnabledAsBoolean)

expressionRequired.AnexpressionthatreturnsareferencetotheInfoPathControlobject.

vfEnabledRequired.ABooleanvaluethatspecifieswhetherthecontrolisenabled.

RemarksInfoPathwillcalltheEnablemethodtoenableordisablethecontrol,suchaswhentheviewisbeingrefreshedorclosed,whenthedocumentissignedandshouldnotbeedited,orwhenrulesareappliedtotheformthatmustdisablethecontrol.

TheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

EnableAutoUpdateMethod

Enablesautomaticsynchronizationbetweenaform'sunderlyingXMLdocumentandtheassociatedViewobject.

expression.EnableAutoUpdate()

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheviewsinaMicrosoftOfficeInfoPath2003formareautomaticallysynchronizedwiththedatathatiscontainedinaform'sunderlyingXMLdocument.However,thiscanbeoverriddenusingtheDisableAutoUpdatemethod.Tore-enablesynchronization,usetheEnableAutoUpdatemethod.

ExampleInthefollowingexample,theEnableAutoUpdatemethodoftheViewobjectisusedtoenablesynchronizationbetweenaform'sunderlyingXMLdocumentandtheviewthatitisassociatedwith:

XDocument.View.EnableAutoUpdate();

EvalMethod

ReturnsaVariantcontainingthesetofresultscalculatedwhentheexpressionisappliedtoeachsetofelementsinthecontext.

expression.Eval(ByValnodeListAsIXMLDOMNodeList,ByValbstrExpressionasString)AsVariant

expressionRequired.AnexpressionthatreturnsareferencetotheMathobject.

nodeListRequiredIXMLDOMNodeList.Thenodethatsetsthecontextfortheexpression.

bstrExpressionRequiredString.Theexpressiontobeappliedtoeachsetofnodesinthespecifiedcontext.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,thevariablemaxCostissettothelargestcostvalue,wherecostiscalculatedbymultiplyingpricebyquantity.

varnodes=XDocument.DOM.selectNodes("/my:items/my:item");varmaxCost=XDocument.Util.Math.Max(XDocument.Util.Math.Eval

ShowAll

ExecuteActionMethod

ExecutesaMicrosoftOfficeInfoPath2003editingcommandagainstaform'sunderlyingXMLdocument,basedonthedataselectedintheviewthatisassociatedwiththeViewobject.

expression.ExecuteAction(ByValbstrActionAsString,[ByValvarXmlToEditAsVariant])

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

bstrActionRequiredString.Thenameoftheeditingactiontoperform.

varXmlToEditOptionalVariant.Thenameofthefieldorgrouptowhichtoapplytheeditingaction.ThisisequivalenttothevalueofthenameattributeinthexmlToEditelementoftheformdefinition(.xsf)file.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheExecuteActionmethodisusedtoprogrammaticallyperformbuilt-inInfoPatheditingactionsagainstaform'sunderlyingXMLdocument,basedontheselectedcontextinaview.

Theactionthatisexecutedwillbethesameactionthatwouldbeusedwhenclickingonanequivalentmenuortoolbarbutton;namelyoneforwhichthebuttonelementinthe.xsffilehascorrespondingxmlToEditandactionattributes.Aswithusingabutton,theactionwillbebasedoncurrentselection:itwillactontheselectedcontext(andinthecasewheretheselectionwouldleadthebuttontobedisabled,thentheExecuteActionmethodwillhavenoeffect).

NoteItispossiblewithscriptingcodetofirstsettheselectioncontextbyusingtheSelectNodesorSelectTextmethodsoftheViewobject,thencallingtheExecuteActionmethodtoactonthatcontext.

TheExecuteActionmethodwillreturnanerrorforthefollowingreasons:

ThebstrActionparameterdoesnotcontainavalideditingcomponentname.

ThevarXmlToEditparameterdoesnotmatchaneditingcomponentthatisdefinedintheview.

ThevarXmlToEditparameterisrequiredforaspecificeditingaction.

Theeditingactionisnotapplicabletotheselectedcontext.

Validparametercombinations

NoteInsomecases,callingtheExecuteActionmethodfromtheOnClickeventforabuttoninaviewmaycauseanerror.Thisisbecausetheselectedcontextchangestothebuttonwhenthebuttonisclicked.Inthiscase,itisbettertouseabutton(orlink)onacustomtaskpane,toolbar,ormenutocalltheExecuteActionmethod.

ExampleInthefollowingexample,theExecuteActionmethodoftheViewobjectisusedtodeleteselecteddataandplaceitontheclipboard:

XDocument.View.ExecuteAction("Cut");

Inthefollowingexample,theExecuteActionmethodoftheViewobjectisusedtoinsertdatausingthexCollectioneditingcomponent,basedontheselectedcontext:

XDocument.View.ExecuteAction("xCollection::insert","group1_1");

ExportMethod

Exportstheviewtoafileofthespecifiedformat.

expression.Export(ByValbstrURLAsString,ByValbstrFormatAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

bstrURLRequiredString.Thedirectorylocationthattheexportedviewfilewillbewrittento.

bstrFormatRequiredString.Thetypeoffileformattoexportto.Onlythe"MHT"valueissupported.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksIfusedinaformthatisnotfullytrusted,theExportmethodwillreturna"permissiondenied"error.

ExampleInthefollowingexample,theExportmethodoftheViewobjectisusedtoexportthecurrentview:

XDocument.View.Export("C:\\MyView","MHT");

ShowAll

ForceUpdateMethod

Forcessynchronizationbetweenaform'sunderlyingXMLdocumentandtheassociatedViewobject.

expression.ForceUpdate()

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheviewsinaMicrosoftOfficeInfoPath2003formareautomaticallysynchronizedwiththedatathatiscontainedinaform'sunderlyingXMLdocument.However,youcanforcesynchronizationtooccurusingtheForceUpdatemethod.Thisisalsousefulwhendatainasecondarydatasourcehaschangedandneedstoberefreshedintheview.

AutomaticsynchronizationcanbedisabledusingtheDisableAutoUpdatemethodandenabledusingtheEnableAutoUpdatemethod.

ExampleInthefollowingexample,theForceUpdatemethodoftheViewobjectisusedtoforcesynchronizationbetweenaform'sunderlyingXMLdocumentandtheviewthatitisassociatedwith:

XDocument.View.ForceUpdate();

ShowAll

FormatStringMethod

FormatsthespecifiedstringorXMLnodeaccordingtothespecifiedcategoryandoptionsparameters.

expression.FormatString(ByValvarInput,ByValbstrCategoryAsString,ByValbstrOptionsAsString)AsString

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

varInputRequiredStringorXMLnode.ThestringvalueorXMLnodetobeformatted.

bstrCategoryRequiredString.Thestringvaluethatspecifiesthecategoryusedforformatting.Valuesincludenumber,percentage,currency,date,time,anddatetime.

bstrOptionsRequiredString.Thestringvaluethatspecifiestheoptionsusedforformatting.Takestheformofacase-sensitivestringintheformat"optionName:value".

returnsString.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheFormatStringmethodcanbeusedanywhereinyourscriptingcodeinwhichyouneedtochangetheformatofaspecifiedstring.ItmustbequalifiedwiththeApplicationobjectname,anditsreturnvaluemustbeassignedtoavariableorusedasanexpressionthatrequiresastringvalue.

ThefollowingsectionslistthevaluesthatmaybeusedforthebstrCategoryandbstrOptionsparameters:

Listofcategories

Listofoptions

ExampleInthefollowingexample,theFormatStringmethodoftheApplicationobjectisusedtoformatthespecifieddatestringintoalongdateformat:

Application.FormatString("2003-01-08","date","dateFormat:LongDate");

ShowAll

GenerateDataSetDiffGramMethod

ReturnsanXMLDataSet,containinganinlineschemadescribingthedataandtheDataSet'sDiffGram.

expression.GenerateDataSetDiffGram(ByValpNodeAsIXMLDocumentObject)AsIXMLDocumentObject

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

pNodeRequiredIXMLDocumentObject.AnXMLDocumentObjectModel(DOM)nodethatcontainstheXMLdataoftheDataSetwhoseDiffGramwillbecreated.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheDiffGramfortheinputpNodeisgeneratedusingthesiblingnodeoriginalDatatocomputethedifferencebetweentheoriginalDataandtheinputpNode.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

GetContextNodesMethod

ReturnsareferencetoanXMLNodescollectionthatispopulatedwithXMLDocumentObjectModel(DOM)nodesbasedonthecurrentcontext.ItconsistsofthesequenceofXMLDOMnodesthataremappedfromtheview,correspondingtothecurrentXSLTransformation(XSLT)node,startingatthecurrentselectionandwalkingupthroughtheviewancestorstotheBODYtag.expression.GetContextNodes([ByValvarNodeAsVariant],[ByValvarViewContextAsVariant])AsXMLNodes

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

varNodeOptionalVariant.AnXMLDOMnode.

varViewContextOptionalVariant.TheIDofthecontrolthatisusedforthecontext.

returnsAreferencetotheXMLNodescollection.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIfnoparametersareused,thecontextnodesarebasedonthecurrentselection.Ifparametersareused,thenthecontextnodesreturnedarethosethatwouldbereturnedbasedontheselectionthatwouldbeobtainedfromcallingtheSelectNodesmethodoftheViewobject.

ExampleInthefollowingpartialexamplefromtheStructuralEditingdevelopersampleform,theGetContextNodesmethodoftheViewobjectisusedtoreturnacollectionofXMLDOMnodesbasedonthecurrentcontext.ThenthecodeloopsthroughthecollectionofXMLDOMnodeslookingforaparticularnode.Whenitisfound,thecodecallsthecustomApplyDiscountToItemfunctiontoupdatethedatathatthenodecontains.

objContextNodes=XDocument.View.GetContextNodes();

//Scanthelistofcontextnodesforanitemnodeandifoneisfound//applythediscounttoit.for(vari=0;i<objContextNodes.Count;i++){if(objContextNodes.item(i).nodeName=="item"){ApplyDiscountToItem(objContextNodes.item(i),intPercentage);blnAppliedDiscount=true;break;}}

ShowAll

GetDataVariableMethod

Returnsastringcontainingthevalueofthespecifiedvariable,whichisapredefinedvariablestoredasaprocessinginstructionattributeintheform'sunderlyingXMLdocument.

expression.GetDataVariable(ByVallVariableNumberAsLong)AsString

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

lVariableNumberRequiredLong.Thenumberofthevariable.

returnsString.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIfthevariableisnotdefinedorisempty,theGetDataVariablemethodwillreturnanemptystring.Tosetavariable,usetheSetDataVariablemethodoftheXDocumentobject.

NoteInfoPathonlysupportsusingtheinitialViewvariable,whichisthevariableusedtospecifytheinitialviewdisplayedwhenaformisopened.Thenumberofthisvariableisalways1,anditsvaluemustbethenameofaviewwithintheform.

ExampleInthefollowingexample,theGetDataVariablemethodoftheXDocumentobjectisusedtoreturnthevalueofthefirstvariable:

varstrVariable1;strVariable1=XDocument.GetDataVariable(1);

ShowAll

GetDOMMethod

ReturnsareferencetotheXMLDocumentObjectModel(DOM)ofthespecifiedDataObjectobjectassociatedwiththeXDocumentobject.

expression.GetDOM(ByValbstrNameAsString)AsXMLDOMDocument

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

bstrNameRequiredString.ThenameofaDataObjectobject.

returnsAreferencetoanXMLDOMdocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksAfteryouhaveareferencetotheXMLDOMthattheGetDOMmethodreturns,youcanuseanyofthepropertiesandmethodsthattheXMLDOMsupportstomanipulatethedatathattheDOMcontains.

NoteFormoreinformationabouttheXMLDOM,seetheMSXML5.0SDKdocumentationintheMicrosoftScriptEditor(MSE)Helpsystem.

ExampleInthefollowingexample,theGetDOMmethodoftheXDocumentobjectisusedtosetareferencetotheXMLDOMthatitreturns,whichinthiscaseistheDataObjectobjectnamedCityDropDownList:

varobjXml;

objXml=XDocument.GetDOM("CityDropDownList");

GetNamedNodePropertyMethod

ReturnsthevalueofanamedpropertyforthespecifiedXMLnode,whichmustbeanonattributenodeinthemaindatasource.

expression.GetNamedNodeProperty(ByValvarMainDOMNodeAsVariant,ByValbstrPropertyNameAsString,ByValbstrDefaultValueAsString)AsString

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

varMainDOMNodeRequiredVariant.AnXMLnodecorrespondingtoanonattributenodeinthemaindatasource,forwhichanamedpropertyistobeset.

bstrPropertyNameRequiredString.Specifiesthenameofthepropertywhosevalueistobereturned.

bstrDefaultValueRequiredString.Specifiesthedefaultvaluetobereturnedifthepropertyhasnotbeenset.

returnsAstringcorrespondingtothecurrentvalueofthenamedpropertyforthespecifiedXMLnodeinthemaindatasource.IfthespecifiedpropertyhasnotbeensetforthisXMLnode,thespecifieddefaultstringisreturned.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNamedpropertiesallowuserstoassociatestringswithuser-definedpropertiesofXMLelementnodesinthemaindatasource.ThevalueofanamedpropertycanbesetbyusingtheSetNamedNodePropertymethod.UsetheGetNamedNodePropertymethodtoreadthevalueofanamedproperty.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingexampledemonstratessettingandgettingthevalueofanamedproperty(withthename"cost")ofanXMLnode(called"item"):

varobjXMLNode=XDocument.DOM.selectSingleNode("/items/item");

varstrTest=XDocument.GetNamedNodeProperty(objXMLNode,'cost','Valuenotset');

//Thevalueofthe"cost"namedpropertyissetto100.XDocument.SetNamedNodeProperty(objXMLNode,'cost','100');

strTest=XDocument.GetNamedNodeProperty(objXMLNode,'cost','Valuenotset');

InthefollowingXSLexample,the"cost"namedpropertyoftheitemnodeisdisplayed:

<xsl:value-ofselect="xdXDocument:GetNamedNodeProperty(item,'cost','empty')"/>

ShowAll

GetSelectedNodesMethod

ReturnsareferencetoanXMLNodescollectionthatispopulatedwithXMLDocumentObjectModel(DOM)nodesbasedonthecurrentselectionofitemsinaview.

expression.GetSelectedNodes()AsXMLNodes

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

returnsAreferencetotheXMLNodescollection.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIfnoitemsareselectedinaview,orifonlytextisselected,thentheGetSelectedNodesmethodreturnsanemptycollection.

ExampleInthefollowingexample,theGetSelectedNodesmethodoftheViewobjectisusedtosetareferencetoacollectionofXMLDOMnodesbasedonwhatiscurrentlyselectedintheview.Thenthecodedetermineswhethernodeswerereturnedand,iftheywere,displaysinformationaboutthefirstnodefoundintheXMLNodescollectioninamessagebox.

objXMLNodes=XDocument.View.GetSelectedNodes();

if(objXMLNodes.Count>0){XDocument.UI.Alert(objXMLNodes(0).nodeName+"\n\n"+objXMLNodes(0).text);}

ImportDOMMethod

ImportsthespecifiedXMLdataintothecurrentform.

expression.ImportDOM(ByValpxDocAsIXMLDocumentObject)

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

pxDocRequiredIXMLDocument.TheXMLdatathatistobeimported(merged)intothecurrentlyopenform.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksUsingtheobjectmodeltoimportaformprogrammaticallyisequivalenttoperformingamergeoperationusingtheMergeFormscommandontheFilemenuinInfoPath.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theImportDOMmethodoftheXDocumentobjectisusedtoimportaformfromtheOnMergeRequesteventhandler:

XDocument::OnMergeRequest(eventObj){XDocument.ImportDOM(eventObj.DOM);eventObj.ReturnStatus=true;}

ShowAll

ImportFileMethod

Importsthespecifiedformintothecurrentform.

expression.ImportFile(ByValbstrFileURIAsString)

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

bstrFileURIRequiredString.TheUniformResourceIdentifier(URI)oftheformthatistobeimported(merged)intothecurrentlyopenform.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksUsingtheobjectmodeltoprogrammaticallyimportaformisequivalenttoperformingamergeoperationintheuserinterface.

ExampleInthefollowingexample,theImportFilemethodoftheXDocumentobjectisusedtoimportaform:

XDocument.ImportFile("C:\SomeOtherForm.xml");

InitMethod

DefinesamethodthatmustbeprovidedbythedevelopertoperformanyinitializationroutinesrequiredwhenaninstanceofthecontrolisaddedtoanInfoPathform.

expression.Init(pControlSiteAsInfoPathControlSite)

expressionRequired.AnexpressionthatreturnsareferencetotheInfoPathControlobject.

pControlSiteRequired.AninstanceoftheInfoPathControlSiteobject.

RemarksInfoPathcallstheInitmethodwhenauseraddsaninstanceofthecontroltoaview.InfoPathpassesaninstanceoftheInfoPathControlSiteobjecttotheInitmethodwhenthecontrolisinitialized.TheInfoPathControlSiteobjectprovidestheNodepropertythatprovidesaccesstotheXMLDOMnodetowhichthecontrolisbound,andtheXDocumentpropertyforaccessingtheXDocumentobjectassociatedwithaform,whichinturnprovidesaccesstothefullInfoPathobjectmodel.

TheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

IsCurrentUserMethod

ReturnsTrueifthecurrentusermatchesthespecifiedusername.

expression.IsCurrentUser(ByValbstrUsernameAsString)AsBoolean

expressionRequired.AnexpressionthatreturnsareferencetotheUserobject.

bstrUsernameRequiredString.Theusernameintheformatof"domain\username."

returnsABooleanvalueindicatingwhetherthespecifiedusernamematchesthenameofthecurrentuser.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksEventhoughtheIsCurrentUsermethodismarkedassecuritylevel0,itisnotalwaysaccessible.WhenacallismadetotheIsCurrentUsermethod,InfoPathfirstperformsasecuritychecktodetermineifaccesstothismethodisallowed.Thesecuritycheckconfirmswhetherthecallingcodeistrustedornotanditdeterminesthelocationofthecallingcode.

Ifthecallingcodeistrusted(asitiswhen,forexample,theIsCurrentUsermethodiscalledfromaninstalledorsignedInfoPathformtemplate,orfromtrustedexternalcode,suchasanexecutablefileonthelocalcomputer),InfoPathwillallowfullaccesstotheIsCurrentUsermethod.

Ifthecallingcodeisnottrusted(asinthecircumstanceofacallcomingfromadomain-basedInfoPathformtemplateorfromscriptexecutinginMicrosoftInternetExplorer),InfoPathfirstcheckswherethecallisbeingmadefrom.IfthecallisfromcodethatisnottrustedinanInfoPathformtemplateataURLsuchas"http://www.contoso.com/example.xsn",thenthecallisfromtheInternetzone.InfoPathdeniesaccesstotheIsCurrentUsermethodforallcallsthatarenottrustedcomingfromtheInternetzone.IfthecallisfromaURLsuchas"http://contoso/example.xsn",thenthecallisfromtheIntranetzone.ForacallthatisnottrustedfromtheIntranetzone,InfoPathcheckswhethertheInternetExploreruserauthenticationsettingsallowautomaticlogon(intheIntranetzoneonlyorforeverylogon).IfInternetExplorerisconfiguredforautomaticlogon,thenInfoPathallowsfullaccesstotheIsCurrentUsermethod.Otherwise,accesstotheIsCurrentUsermethodisdenied.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theIsCurrentUsermethodoftheUserobjectisusedtodetermineifthecurrentuserequals"UserDomain\NancyDavilio".

varfUserMatched;fUserMatched=Application.User.IsCurrentUser("UserDomain\NancyDavolio")

ShowAll

IsDestinationReachableMethod

ReturnsaBooleanvalueindicatingwhetherthespecifiedUniformResourceLocator(URL),universalnamingconvention(UNC)path,orIPaddressofthedestinationcomputercanbeconnectedtofromtheclientcomputer.

expression.IsDestinationReachable(ByValbstrDestinationAsString,[ByValbstrBehaviorAsString)AsBoolean

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

bstrDestinationRequiredString.Specifiesthelocationtocheckfornetworkconnectivity.IPaddresses,aUNCpaths,oraURLsareacceptablevalues.

returnsABooleanvalueindicatingwhetherthedestinationisreachable.Trueifthespecifieddestinationcanbeconnectedto;otherwise,False.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

NoteIfanIPaddressisspecified,thesecuritylevelforthismethodbecomeslevel3.ItisnotpossibletodeterminethedomainfromtheIPaddress,thereforethecallermusthavethefulltrustpermission.

RemarksForUNCandURLstrings,validvaluesarethoseincludingonlytheservername,forexamplehttp://MyServeror\\MyServer.Valuessuchashttp://MyServer/MyVirtualDirectoryor\\MyServer\MySharearenotconsideredvalid.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

IsUserMemberOfMethod

ReturnsaBooleanvaluethatindicateswhetherthecurrentuserisamemberofthespecifiedgroup.

expression.IsUserMemberOf(ByValbstrGroupnameAsString)AsBoolean

expressionRequired.AnexpressionthatreturnsareferencetotheUserobject.

bstrGroupnameRequiredString.Thegroupnameintheformatof"domain\groupname."

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksEventhoughtheIsUserMemberOfmethodismarkedassecuritylevel0,itisnotalwaysaccessible.WhenacallismadetotheIsUserMemberOfmethod,InfoPathfirstperformsasecuritychecktodetermineifaccesstothismethodisallowed.Thesecuritycheckconfirmswhetherthecallingcodeistrustedornotanditdeterminesthelocationofthecallingcode.

Ifthecallingcodeistrusted(asitiswhen,forexample,theIsUserMemberOfmethodiscalledfromaninstalledorsignedInfoPathformtemplate,orfromtrustedexternalcode,suchasanexecutablefileonthelocalcomputer),InfoPathwillallowfullaccesstotheIsUserMemberOfmethod.

Ifthecallingcodeisnottrusted(asinthecircumstanceofacallcomingfromadomain-basedInfoPathformtemplateorfromscriptexecutinginMicrosoftInternetExplorer),InfoPathfirstcheckswherethecallisbeingmadefrom.IfthecallisfromcodethatisnottrustedinanInfoPathformtemplateataURLsuchas"http://www.contoso.com/example.xsn",thenthecallisfromtheInternetzone.InfoPathwilldenyaccesstotheIsUserMemberOfmethodforallcallsthatarenottrustedcomingfromtheInternetzone.IfthecallisfromaURLsuchas"http://contoso/example.xsn",thenthecallisfromtheIntranetzone.ForacallthatisnottrustedfromtheIntranetzone,InfoPathcheckswhethertheInternetExploreruserauthenticationsettingsallowautomaticlogon(intheIntranetzoneonlyorforeverylogon).IfInternetExplorerisconfiguredforautomaticlogon,thenInfoPathcheckstheuser'sgroupmembership.Ifthegroupmembershipispublic,InfoPathallowsfullaccesstotheIsUserMemberOfmethod.Ifthegroupmembershipisnotfullypublic,InfoPathhidestheresult.Thatis,InfoPathtreatsthegroupmembershipasifitwerenotvisible.ThereturnvalueinthiscaseisalwaysFalsebecausethegroupmembershipisnotpublic.InfoPathdoesnotreportthataccessisdenied.

NoteGroupmembershipinformationisfullypublicifaccesstoitisallowedandtheinformationisvisiblebyallnon-anonymoususers.Ifevenasinglenon-anonymoususerhasbeenspecificallydeniedaccesstomembershipinformation,thenthegroupmembershipinformationisnot

fullypublic.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theIsUserMemberOfmethodoftheUserobjectisusedtodetermineifthecurrentuserisamemberofthe"GroupDomain\Administrators"group.

varfGroupMatched;fGroupMatched=Application.User.IsUserMemberOf("GroupDomain\Administrators")

MatchMethod

ReturnsaBooleanvaluethatindicateswhetherthetestmatchesthespecifiedpattern.

expression.Match(ByValbstrValueAsString,ByValbstrPatternAsString)AsBoolean

bstrValueRequiredString.Thestringtotestagainstthepattern.

bstrPatternRequiredString.Thepatterntouse.

returnsABooleanvaluethatindicateswhetherthestringmatchesthepattern.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksTheMatchmethodcanbeusedtotestanystringagainstaregularexpression.TheregularexpressionmustconformtotheW3C'sXMLSchemaspecificationforregularexpressions(http://www.w3.org/TR/xmlschema-2/#regexs).

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

NoteTheXMLSchemaspecificationforregularexpressionsisdifferentfromregularexpressionsinPerl.

ExampleInthefollowingexample,thevariableisSSNValidissettoavaluethatindicateswhetherornotthevaluestoredinthemy:SSNnodeisalegalSocialSecurityNumber:

varSSN=XDocument.DOM.selectSingleNode(“//my:SSN”);varisSSNValid=XDocument.Util.Match(SSN.text,"\\d\\d\\d-\\d\\d-\\d\\d\\d\\d");

MaxMethod

ReturnsaVariantthatisthelargestvalueofallofthenumericalelementsinanodeset.

expression.Max(ByValpxmllistInputAsIXMLDOMNodeList)AsVariant

expressionRequired.AnexpressionthatreturnsareferencetotheMathobject.

pxmllistInputRequiredIXMLDOMNodeList.Thenodesettosearchforthelargestvalue.

returnsAVariantthatrepresentsthelargestvalueofallthenumericalelementsinanodeset.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,maxAgeissettothemaximumvalueofallofthenumericalelementsinthemy:agesnodeset:

varages=XDocument.DOM.selectNodes("//my:ages");varmaxAge=XDocument.Util.Math.Max(ages);

MinMethod

ReturnsaVariantthatisthesmallestvalueofallofthenumericalelementsinanodeset.

expression.Min(ByValpxmllistInputAsIXMLDOMNodeList)AsVariant

expressionRequired.AnexpressionthatreturnsareferencetotheMathobject.

pxmllistInputRequiredIXMLDOMNodeList.Thenodesettosearchforthesmallestvalue.

returnsAVariantthatrepresentsthesmallestvalueofallthenumericalelementsinanodeset.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,thevariableminAgeissettotheminimumvalueofallofthenumericalelementsinthemy:agesnodeset:

varages=XDocument.DOM.selectNodes("//my:ages");varmaxAge=XDocument.Util.Math.Min(ages);

ShowAll

NavigateMethod

LoadsthespecifiedHTMLdocumentintotheMicrosoftOfficeInfoPath2003customtaskpane.

expression.Navigate(ByValbstrURLAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheHTMLTaskPaneobject.

bstrURLRequiredString.TheUniformResourceLocator(URL)oftheHTMLdocumenttonavigateto.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheNavigatemethodoftheHTMLTaskPaneobjectisoneofthemethodsinheritedbytheTaskPaneobjectwhenthetypeofthetaskpaneis0,whichmeansthatitisthecustomtaskpane.

NoteTheNavigatemethodcannotbecalledduringanOnLoadeventbecausetheviewisnotyetloadedwhenthiseventoccurs,andtaskpanesareassociatedwiththeview.

ExampleInthefollowingexample,theNavigatemethodoftheHTMLTaskPaneobjectisusedtoloadanHTMLdocumentintothecustomtaskpane.TheHTMLdocumentthatitloadsisonethatisincludedintheformfilesoftheformtemplate:

varobjTaskPane;

//Setareferencetothecustomtaskpane.objTaskPane=XDocument.View.Window.TaskPanes(0);objTaskPane.Navigate("taskpane2.htm");

ShowAll

NewMethod(ExternalApplicationObject)

CreatesanewMicrosoftOfficeInfoPath2003formbasedonaspecifiedform.

expression.New(ByValbstrDocumentURIAsString,[ByValdwBehaviorAsLong=1])

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

bstrDocumentURIRequiredString.ThestringvaluethatspecifiestheUniformResourceIdentifier(URI)ofaform.

dwBehaviorOptionalLong.Defaultvalueis1.Alongvaluethatspecifieshowtheformshouldbeopened.ThevaluesarebasedontheXdDocumentVersionModeenumeration.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksTheNewmethodcanbeusedtoonlycreateanewformbasedonanexistingform;itcannotbeusedtocreateanewformbasedonaformtemplate.Tocreateaformfromaformtemplate,usetheNewFromSolutionmethodoftheExternalApplicationobject.

WhenyouusetheNewmethod,InfoPathisopenedandthenewformisreadytobefilledout.

NoteYoucannotusetheClosemethodoftheExternalApplicationobjecttocloseafromthathasbeenopenedwiththeNewmethod.WhentheNewmethodcreatesaform,thenameofthatformisnotyetknown.

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theNewmethodoftheExternalApplicationobjectisusedtocreateanewformbasedonaspecifiedform:

PublicSubCreateFromForm()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.ExternalApplication")

'CreateanInfoPathform.objIP.New("C:\MyForms\Form1.xml")MsgBox("TheInfoPathformhasbeencreated.")

SetobjIP=Nothing

EndSub

NewMethod(Index)

TheNewmethodcreatesanewitembasedonaform.ThismethodisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelcollectionsandobjects.ClickaNewmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheNewmethod.

NewmethodasitappliestotheExternalApplicationobject.

NewmethodasitappliestotheXDocumentscollection.

ShowAll

NewMethod(XDocumentsCollection)

CreatesanewMicrosoftOfficeInfoPath2003formbasedonthespecifiedform.

expression.New(ByValvarURIAsVariant,[ByValdwBehaviorAsLong=1])AsXDocument

expressionRequired.AnexpressionthatreturnsareferencetotheXDocumentscollection.

varURIRequiredVariant.SpecifiestheUniformResourceIdentifier(URI)ofaform.

dwBehaviorOptionalLong.Defaultvalueis1.Alongvaluethatspecifieshowtheformshouldbeopened.ThevaluesarebasedontheXdDocumentVersionModeenumeration.

returnsAreferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheNewmethodcanonlybeusedtocreateanewformbasedonanexistingform;itcannotbeusedtocreateanewformbasedonaformtemplate.Tocreateaformfromaformtemplate,usetheNewFromSolutionmethodoftheXDocumentscollection.

WhenyouusetheNewmethod,thenewformopensinInfoPathandisreadytobefilledout.

NoteIfyouusetheoptionaldwBehaviorargumentintheNewmethod,youcanonlypassthenumericalvalueoftheXdDocumentVersionModeenumeration.BecauseInfoPathusesscriptinglanguagesforworkingwiththeobjectmodel,namedvaluescannotbeused.

ExampleInthefollowingexample,theNewmethodoftheXDocumentscollectionispassedtheURIofanexistingform,andanewformiscreatedanditsassociatedXDocumentobjectreturned:

varobjXDoc;

objXDoc=Application.XDocuments.New("C:\\MyForm.xml");

ShowAll

NewADODBConnectionMethod

CreatesandreturnsareferencetoanemptyActiveXDataObjects(ADO)Connectionobject.

expression.NewADODBConnection()ADODB.Connection

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

returnsAreferencetoanADOConnectionobject.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksIftheformisnotfullytrusted,theNewADODBConnectionmethodwillreturna"permissiondenied"error.

ExampleInthefollowingexample,theNewADODBConnectionmethodoftheApplicationobjectisusedtosetareferencetoanemptyADOConnectionobject:

varobjADOConnection;

objADOConnection=Application.NewADODBConnection();

ShowAll

NewADODBRecordsetMethod

CreatesandreturnsareferencetoanemptyActiveXDataObjects(ADO)Recordsetobject.

expression.NewADODBRecordset()ADODB.Recordset

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

returnsAreferencetoanADORecordsetobject.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksIftheformisnotfullytrusted,theNewADODBRecordsetmethodwillreturna"permissiondenied"error.

ExampleInthefollowingexample,theNewADODBRecordsetmethodoftheApplicationobjectisusedtosetareferencetoanemptyADORecordsetobject:

varobjADORecordset;

objADORecordset=Application.NewADODBRecordset();

ShowAll

NewFromSolutionMethod(ExternalApplicationObject)

CreatesanewMicrosoftOfficeInfoPath2003formbasedonthespecifiedformtemplate.

expression.NewFromSolution(ByValbstrSolutionURIAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

bstrSolutionURIRequiredString.ThestringvaluethatspecifiestheUniformResourceIdentifier(URI)ofaformtemplate.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksTheNewFromSolutionmethodcanbeusedonlytocreateanewformbasedonanexistingformtemplate;itcannotbeusedtocreateanewformbasedonanexistingform.Tocreateaformfromanexistingform,usetheNewmethodoftheExternalApplicationobject.

WhenyouusetheNewFromSolutionmethod,InfoPathisopenedandthenewformisreadytobefilledout.

NoteYoucannotusetheClosemethodoftheExternalApplicationobjecttocloseafromthathasbeenopenedwiththeNewFromSolutionmethod.WhentheNewFromSolutionmethodcreatesaform,thenameofthatformisnotyetknown.

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theNewFromSolutionmethodoftheExternalApplicationobjectisusedtocreateanewformbasedonaspecifiedformtemplate:

PublicSubCreateFromFormTemplate()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.ExternalApplication")

'CreateanInfoPathformfromaformtemplate.objIP.NewFromSolution("C:\MyForms\MyFormTemplate.xsn")MsgBox("TheInfoPathformhasbeencreated.")

SetobjIP=Nothing

EndSub

ShowAll

NewFromSolutionMethod(Index)

TheNewFromSolutionmethodcreatesanewitembasedonaformtemplate.ThismethodisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelcollectionsandobjects.ClickaNewFromSolutionmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheNewFromSolutionmethod.

NewFromSolutionmethodasitappliestotheExternalApplicationobject.

NewFromSolutionmethodasitappliestotheXDocumentscollection.

ShowAll

NewFromSolutionMethod(XDocumentsCollection)

CreatesanewMicrosoftOfficeInfoPath2003formbasedonthespecifiedformtemplate.

expression.NewFromSolution(ByValvarURIAsVariant)AsXDocument

expressionRequired.AnexpressionthatreturnsareferencetotheXDocumentscollection.

varURIRequiredVariant.SpecifiestheUniformResourceIdentifier(URI)ofaform.

returnsAreferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheNewFromSolutionmethodcanonlybeusedtocreateanewformbasedonanexistingformtemplate;itcannotbeusedtocreateanewformbasedonaform.Tocreateaformfromanexistingform,usetheNewmethodoftheXDocumentscollection.

WhenyouusetheNewFromSolutionmethod,thenewformopensinInfoPathandisreadytobefilledout.

ExampleInthefollowingexample,theNewFromSolutionmethodoftheXDocumentscollectionispassedtheURIofanexistingformtemplate,andanewformiscreatedanditsassociatedXDocumentobjectreturned:

varobjXDoc;

objXDoc=Application.XDocuments.NewFromSolution("C:\\MyForm.xsn");

ShowAll

NewFromSolutionWithDataMethod

CreatesanewMicrosoftOfficeInfoPath2003formusingthespecifiedXMLdataandformtemplate.

expression.NewFromSolutionWithData(ByValvarXMLDataAsVariant,ByValvarSolutionURIAsVariant,[ByValdwBehaviorAsLong=1])AsXDocument

expressionAnexpressionthatreturnsareferencetoanXDocumentscollection.

varXMLDataRequiredVariant.ProvidestheXMLdatatobeusedasatemplatefortheform.CanbeastringthatspecifiestheUniformResourceIdentifier(URI)ofanXMLdocument,oranXMLDOMNodethatcontainstheXMLtobeusedastheXMLdocument(template).

varSolutionURIRequiredVariant.StringwhichspecifiestheUniformResourceIdentifier(URI)ofaformtemplatefile(an.xsfor.xsnfile).

dwBehaviorOptionalLong.Reservedforfutureuse.Thisvalueshouldbeomittedorsetto1.

returnsAreferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThefollowingrelatedmethodsoftheXDocumentscollectionarealsoavailable:

TheNewmethodenablescreatinganewinstanceofInfoPathbyusingaspecifiedXMLdocument.TheXMLdocumentmustcorrespondtoanInfoPathform.AnewformisopenedinInfoPath,usingthesuppliedXMLdocumentasinitialdata,anditsassociatedformtemplateasspecifiedintheprocessinginstructionsintheheaderofthedocument.

TheNewFromSolutionmethodenablescreatinganewinstanceofInfoPathusingaspecifiedformtemplate,anditsassociatedXMLform(theinitialtemplatedata).

TheNewFromSolutionWithDatamethodsupportsascenariothatisnotprovidedbytheforegoingtwomethods:specifyingboththeXMLdocumentusedasinitialdataandtheformtemplate.TheXMLdocumentdoesnotneedtohavebeencreatedbyInfoPath.ItcanbesuppliedeitherasaURIorasanXMLDOMNode.

WhenyouusetheNewFromSolutionWithDatamethod,thenewformopensinInfoPathandisreadytobefilledout.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theNewFromSolutionWithDatamethodoftheXDocumentscollectionispassedtheURIsofanexistingXMLdocument,andanexistingformtemplate,andanewformiscreatedanditsassociatedXDocumentobjectisreturned:

varobjXDoc=Application.XDocuments.NewFromSolutionWithData

Inthefollowingexample,theNewFromSolutionWithDatamethodoftheXDocumentscollectionispassedanXMLDOMNodeasinitialdataandtheURIofanexistingform,andanewformiscreatedanditsassociatedXDocumentobjectisreturned:

varobjXMLNode=XDocument.DOM.selectSingleNode("/employees/employee");

varobjXDoc=Application.XDocuments.NewFromSolutionWithData

NowMethod

ReturnsaVariantthatrepresentsthecurrentsystemdateandtimeinISOformat(yyyy-mm-ddThh:mm:ss).

expression.Now()AsVariant

expressionRequired.AnexpressionthatreturnsareferencetoaDateobject.

returnsAVariantthatrepresentsthecurrentsystemdateandtime.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,thevariablecurrentDateTimeissettothecurrentsystemdateandtime:

varcurrentDateTime=XDocument.Util.Date.Now();

NzMethod

ReturnsaVariantthatisidenticaltothenodesetpassedtothefunction,exceptemptyvaluesinthenodelistarereplacedwithzeros(0).

expression.Nz(ByValpxmllistInputAsIXMLDOMNodeList)AsVariant

expressionRequired.AnexpressionthatreturnsareferencetotheMathobject.

pxmllistInputRequired.Thenodesetthatwillhaveitsemptyvaluesreplacedwithzeroes.

returnsAVariantthatrepresentsanodeset.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,thevariablenoZeroissettoanodesetthatisidenticaltothemy:agesnodeset,withallblankvaluesreplacedbyzeros:

varages=XDocument.DOM.selectNodes("//my:ages");varnoZero=XDocument.Util.Math.Nz(ages);

ShowAll

OpenMethod(ExternalApplicationObject)

OpensthespecifiedMicrosoftOfficeInfoPath2003form.

expression.Open(ByValbstrDocumentURIAsString,[ByValdwBehaviorAsLong=1])

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

bstrDocumentURIRequiredString.ThestringvaluethatspecifiestheUniformResourceIdentifier(URI)ofaform.

dwBehaviorOptionalLong.Defaultvalueis1.Alongvaluethatspecifieshowtheformshouldbeopened.ThevaluesarebasedontheXdDocumentVersionModeenumeration.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksTheOpenmethodcanbeusedonlytoopenaform;itcannotbeusedtoopenaformtemplate.Tocreateaformfromaformtemplate,usetheNewFromSolutionmethodoftheExternalApplicationobject.Tocreateaformbasedonanexistingform,usetheNewmethodoftheExternalApplicationobject.

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theOpenmethodoftheExternalApplicationobjectisusedtoopenaspecifiedform:

PublicSubAutomateInfoPathForm()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.ExternalApplication")

'OpenanInfoPathform.objIP.Open("C:\MyForms\Form1.xml")MsgBox("TheInfoPathformhasbeenopened.")

'ClosetheInfoPathform.objIP.Close("C:\MyForms\Form1.xml")MsgBox("TheInfoPathformhasbeenclosed.")

'QuittheInfoPathapplication.objIP.QuitMsgBox("TheInfoPathapplicationhasbeenclosed.")

SetobjIP=Nothing

EndSub

OpenMethod(Index)

TheOpenmethodopensaform.ThismethodisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelcollectionsandobjects.ClickanOpenmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheOpenmethod.

OpenmethodasitappliestotheExternalApplicationobject.

OpenmethodasitappliestotheXDocumentscollection.

ShowAll

OpenMethod(XDocumentsCollection)

OpensthespecifiedMicrosoftOfficeInfoPath2003form.

expression.Open(ByValvarURIAsVariant,[ByValdwBehaviorAsLong=1])AsXDocument

expressionRequired.AnexpressionthatreturnsareferencetotheXDocumentscollection.

varURIRequiredVariant.SpecifiestheUniformResourceIdentifier(URI)ofaform.

dwBehaviorOptionalLong.Defaultvalueis1.Alongvaluethatspecifieshowtheformshouldbeopened.ThevaluesarebasedontheXdDocumentVersionModeenumeration.

returnsAreferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheOpenmethodcanonlybeusedtoopenaform;itcannotbeusedtoopenaformtemplate.Tocreateaformfromaformtemplate,usetheNewFromSolutionmethodoftheXDocumentscollection.Tocreateaformbasedonanexistingform,usetheNewmethodoftheXDocumentscollection.

WhenyouusetheOpenmethod,thespecifiedformopensinInfoPathandisreadytobefilledout.

NoteIfyouusetheoptionaldwBehaviorargumentintheOpenmethod,youcanonlypassthenumericalvalueoftheXdDocumentVersionModeenumeration.BecauseInfoPathusesscriptinglanguagesforworkingwiththeobjectmodel,namedvaluescannotbeused.

ExampleInthefollowingexample,theOpenmethodoftheXDocumentscollectionispassedtheURIofanexistingform,andtheformisopenedanditsassociatedXDocumentobjectreturned:

varobjXDoc;

objXDoc=Application.XDocuments.Open("C:\\MyForm.xml");

PerformSaveOperationMethod

Performsthesaveoperationrequestedbytheuser.

expression.PerformSaveOperation()

expressionRequired.AnexpressionthatreturnsareferencetoaSaveEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThePerformSaveOperationmethodperformsa"save"or"saveas"operationdependingonthevalueoftheIsSaveAspropertyoftheSaveEventobject.Iftheoperationissuccessful,theIsDirtypropertyoftheXDocumentobjectissettoFalseandthePerformSaveOperationmethodreturnsTrue.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,thePerformSaveOperationmethodoftheSaveEventobjectisusedtosavetheformusingtheinternaldefinitionofsave.

eventObj.PerformSaveOperation();

PrintOutMethod

Printstheformcontentasitisrenderedinthewindowcorrespondingtotheform'sactiveview.

expression.PrintOut()

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksThePrintOutmethodusesthecurrentprintersettings.Returnsapermissiondeniederrorifcalledfromaformthatisnotfullytrusted.

Itisrecommendedthatyoudon'tcallthePrintOutmethodfromanOnLoadorOnSwitchVieweventprocedure.YoumayencounteroneormoreofthefollowingbehaviorswhencallingthePrintOutmethodfromanOnLoadorOnSwitchVieweventprocedure:

Theviewmayprintcorrectly.

Ablankdocumentmaybeprinted.

Theincorrectviewmaybeprinted.

Thefollowingexceptionmayoccur:

InvalidcontextfortheOMcall.

ExampleInthefollowingexample,thePrintOutmethodoftheXDocumentobjectisusedtoprintthecurrentview:

XDocument.PrintOut();

QueryMethod(ADOAdapterObject)

Readsdatafromtheassociateddataadapter.

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetoanADOAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheQuerymethodfailsiftheQueryAllowedpropertyoftheADOAdapterobjectisFalse.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

QueryMethod(DataObjectObject)

ReadsdatafromthedataadapterthatisassociatedwiththeDataObjectobjectandrepopulatestheDataObjectobject'sassociatedXMLDocumentObjectModel(DOM).

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetotheDataObjectobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheQuerymethodcanbeusedtorefreshthedatacontainedintheXMLDOMthatisassociatedwithaDataObjectobject.

ExampleInthefollowingexample,theQuerymethodoftheDataObjectobjectisusedtorefreshthedatacontainedintheXMLDOMassociatedwiththeDataObjectobject:

XDocument.DataObjects("CityList").Query();

AfteryouhaverefreshedthedataintheDataObjectobject,youcancalltheForceUpdatemethodoftheViewobjecttosynchronizethedatacontainedintheDataObjectobjectandtheview:

XDocument.View.ForceUpdate();

QueryMethod(DAVAdapterObject)

TheQuerymethodisavailablefortheDAVAdapterobjectbut,becausetheDAVAdapterobjectisavailableforsubmittingdataonly,themethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetotheDAVAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

QueryMethod(EmailAdapterObject)

TheQuerymethodisavailablefortheEmailAdapterobjectbut,becausetheEmailAdapterobjectisavailableforsubmittingdataonly,themethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetotheEmailAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

QueryMethod(HWSAdapterObject)

TheQuerymethodisavailablefortheHWSAdapterobjectbut,becausetheHWSAdapterobjectisavailableforsubmittingdataonly,themethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetotheHWSAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

QueryMethod(Index)

TheQuerymethodretrievesdatafromtheassociateddataadapterandstoresitinanXMLDocumentObjectModel(DOM).ThismethodisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaQuerymethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheQuerymethod.

QuerymethodasitappliestotheADOAdapterobject.

QuerymethodasitappliestotheDataObjectobject.

QuerymethodasitappliestotheDAVAdapterobject.

QuerymethodasitappliestotheHWSAdapterobject.

QuerymethodasitappliestotheEmailAdapterobject.

QuerymethodasitappliestotheSharepointListAdapterobject.

QuerymethodasitappliestotheWebServiceAdapterobject.

QuerymethodasitappliestotheXDocumentobject.

QuerymethodasitappliestotheXMLFileAdapterobject.

QueryMethod(SharePointListAdapterObject)

Readsdatafromtheassociateddataadapter.

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetoaSharepointListAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheQuerymethodfailsiftheQueryAllowedpropertyoftheSharePointListAdapterobjectisFalse.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

QueryMethod(WebServiceAdapterObject)

Readsdatafromtheassociateddataadapter.

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheQuerymethodfailsiftheQueryAllowedpropertyoftheWebServiceAdapterobjectisFalse.

NoteAnADO.NetDataSetcannotbeusedasaqueryparameterfortheWebServiceAdapterobjectoranyotherdataadapter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

QueryMethod(XDocumentObject)

Retrievesdatafromaform'sassociateddataadapterobjectandstoresthedataintheform'sunderlyingXMLDocumentObjectModel(DOM).

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheQuerymethodwillreturnanerroriftheformdoesnothaveanassociateddataadapterobject.

ExampleInthefollowingexample,theQuerymethodoftheXDocumentobjectisusedtoquerytheassociateddataadapter:

XDocument.Query();

QueryMethod(XMLFileAdapterObject)

Readsdatafromtheassociateddataadapter.

expression.Query()

expressionRequired.AnexpressionthatreturnsareferencetoanXMLFileAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheQuerymethodfailsiftheQueryAllowedpropertyoftheXMLFileAdapterobjectisFalse.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

QuitMethod(ApplicationObject)

QuitstheMicrosoftOfficeInfoPath2003application.

expression.Quit([ByValbForceAsBoolean=False])

expressionRequired.AnexpressionthatreturnsareferencetotheApplicationobject.

bForceOptionalBoolean.DefaultvalueisFalse.Determineswhetheropenformswillbesavedduringthequitoperation.IfsettoFalse,allformswillbeclosedwithoutsaving,evenifthedataintheformshasbeenchanged.IfsettoTrue,theuserwillbepromptedtosavetheforms.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksIftheQuitmethodisusedinaformthatisnotfullytrusted,themethodwillreturna"permissiondenied"error.

ExampleInthefollowingexample,theQuitmethodoftheApplicationobjectisusedtoquitInfoPathwithoutsavinganyofthecurrentlyopenforms:

Application.Quit(false);

ShowAll

QuitMethod(ExternalApplicationObject)

QuitstheMicrosoftOfficeInfoPath2003application.

expression.Quit

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksIfyouusetheClosemethodoftheExternalApplicationobjectbeforeusingtheQuitmethod,datathathasbeenchangedintheformwillnotbesaved,norwillusersbepromptedtosaveit.However,ifyoudonotusetheClosemethodbutonlyusetheQuitmethod,userswillbepromptedtosavetheformbeforequittingtheInfoPathapplication.

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theQuitmethodoftheExternalApplicationobjectisusedtoquittheInfoPathapplication:

PublicSubAutomateInfoPathForm()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.ExternalApplication")

'OpenanInfoPathform.objIP.Open("C:\MyForms\Form1.xml")MsgBox("TheInfoPathformhasbeenopened.")

'ClosetheInfoPathform.objIP.Close("C:\MyForms\Form1.xml")MsgBox("TheInfoPathformhasbeenclosed.")

'QuittheInfoPathapplication.objIP.QuitMsgBox("TheInfoPathapplicationhasbeenclosed.")

SetobjIP=Nothing

EndSub

QuitMethod(Index)

TheQuitmethodquitstheapplication.ThismethodisimplementedinanumberofMicrosoftOfficeInfoPath2003objectmodelobjects.ClickaQuitmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheQuitmethod.

QuitmethodasitappliestotheApplicationobject.

QuitmethodasitappliestotheExternalApplicationobject.

ShowAll

RegisterSolutionMethod(ApplicationObject)

InstallsthespecifiedMicrosoftOfficeInfoPathformtemplate.

expression.RegisterSolution(ByValbstrSolutionURLAsString,[ByValbstrBehaviorAsString="overwrite"])

expressionRequired.AnexpressionthatreturnsareferencetoanApplicationobject.

bstrSolutionURLRequiredString.ThestringthatspecifiestheUniformResourceLocator(URL)oftheformtemplate.Thisparametercanbespecifiedasaformdefinition(.xsf)fileoraformtemplate(.xsn)file.

bstrBehaviorOptionalString.Defaultvalueis"overwrite".Thestringthatspecifieshowtheformtemplateistobeinstalled.Theonlyothervalidvalueforthisparameteris"new-only".

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksIftheformtemplatehasalreadybeenregistered,and"new-only"isspecifiedforthebstrBehaviorparameter,theRegisterSolutionmethodwillreturnanerror.If"overwrite"isspecified,theformtemplate'sregistrationrecordwillbeoverwritten.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingVisualBasicforApplications(VBA)example,theRegisterSolutionmethodoftheApplicationobjectisusedtoinstallaformtemplate:

PublicSubInstallForm()

DimobjIPAsObject

'CreateareferencetotheApplicationobject.SetobjIP=CreateObject("InfoPath.Application")

'RegistertheInfoPathformtemplate.objIP.RegisterSolution("C:\\MyForms\\MyFormTemplate.xsn")MsgBox"TheInfoPathformtemplatehasbeenregistered."

SetobjIP=Nothing

EndSub

ShowAll

RegisterSolutionMethod(ExternalApplicationObject)

InstallsthespecifiedMicrosoftOfficeInfoPath2003formtemplate.

expression.RegisterSolution(ByValbstrSolutionURLAsString,[ByValbstrBehaviorAsString="overwrite"])

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

bstrSolutionURLRequiredString.ThestringvaluethatspecifiestheUniformResourceLocator(URL)oftheformtemplate.Thisparametercanbespecifiedasaformdefinition(.xsf)fileoraformtemplate(.xsn)file.

bstrBehaviorOptionalString.Defaultvalueisoverwrite.Thestringvaluethatspecifieshowtheformtemplateistobeinstalled.Theonlyothervalidvalueforthisparameterisnew-only.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksIftheformtemplatehasalreadybeenregistered,andthenew-onlyvalueisusedforthebstrBehaviorparameter,theRegisterSolutionmethodwillreturnanerror.Iftheoverwritevalueisused,theformtemplate'sregistrationrecordwillbeoverwritten.

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theRegisterSolutionmethodoftheExternalApplicationobjectisusedtoinstallaformtemplate:

PublicSubInstallForm()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.ExternalApplication")

'RegistertheInfoPathformtemplate.objIP.RegisterSolution("C:\\MyForms\MyFormTemplate.xsn")MsgBox("TheInfoPathformtemplatehasbeenregistered.")

SetobjIP=Nothing

EndSub

ShowAll

RegisterSolutionMethod(Index)

TheRegisterSolutionmethodinstallsthespecifiedMicrosoftOfficeInfoPath2003formtemplate.ThismethodisimplementedinseveralInfoPathobjectmodelcollections.ClickaRegisterSolutionmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheRegisterSolutionmethod.

RegisterSolutionmethodasitappliestotheApplicationobject.

RegisterSolutionmethodasitappliestotheExternalApplicationobject.

ShowAll

ReportErrorMethod

CreatesanErrorobjectandaddsittotheErrorscollection.

expression.ReportError(ByValvarNodeAsVariant,ByValbstrShortErrorMessageAsString,ByValfSiteIndependentAsBoolean,[ByValbstrDetailedErrorMessageAsString],[ByVallErrorCodeAsLong],[ByValbstrTypeAsString="modeless"])AsError

expressionRequired.ReturnsareferencetotheDataDOMEventobject.

varNodeRequiredVariant.TheXMLDocumentObjectModel(DOM)nodethattheerrorisassociatedwith.

bstrShortErrorMessageRequiredString.Thetexttobeusedfortheshorterrormessage.

fSiteIndependentOptionalBoolean.SetstheconditionforautomaticdeletionoftheErrorobject.IfTrue,theErrorobjectwillbedeletedonchangeforanynodesthatmatchedtheXPathexpressioncorrespondingtotheErrorobject.IfFalse,theErrorobjectwillbedeletedwhenthenodereturnedbytheSitepropertyofagiveneventobjecthasbeenchanged.

bstrDetailedErrorMessageOptionalString.Thetexttobeusedforthedetailederrormessage.

lErrorCodeOptionalLong.Thenumbertobeusedastheerrorcode.

bstrTypeOptionalString.Defaultvalueis"modeless".Determineswhetherthechangeinvaluewillbeautomaticallyrejectedorwhethertheuserwillbepromptedtoacceptorrejectthechange.Theothervalueis"modal".

returnsAreferencetoanErrorobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksWhentheReportErrormethodoftheDataDOMEventobjectiscalled,MicrosoftOfficeInfoPath2003createsanErrorobjectandaddsittotheErrorscollection.Errorsareremovedfromthecollectionwhenthevalidationconstraintisnolongerinvalid,orwhentheyareexplicitlyremovedusingtheDeleteorDeleteAllmethodsoftheErrorscollection.

ErrorscanalsobecreatedusingtheAddmethodoftheErrorscollection.

NoteSite-independenterrorsshouldbeusedwhenyouwanttheerrorstoapplytoallXMLDOMnodesofthesametype.IfyouwanttheerrortoapplytoaspecificXMLDOMnode,usesite-dependenterrors.

ExampleInthefollowingexamplefromtheDataValidationdevelopersampleform,theReportErrormethodoftheDataDOMEventobjectisusedtocreateacustomerrorandaddittotheerrorscollection:

functionmsoxd__total::OnValidate(eventObj){if(parseInt(eventObj.Site.nodeTypedValue,10)>75)eventObj.ReportError(eventObj.Site,"Thetotalistoohigh."+"Thetotalnumberofblockscannotbegreaterthan75.",false);

if(parseInt(eventObj.Site.nodeTypedValue,10)<0)eventObj.ReportError(eventObj.Site,"Thetotalistoolow."+Thetotalnumberofblockscannotbelessthan0.",false);}

ShowAll

SaveMethod

SavestheformtotheUniformResourceLocator(URL)thatitiscurrentlyassociatedwith.

expression.Save()

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksTheSavemethodwillreturnanerrorifcalledfromaformthatisnotfullytrusted.

ExampleInthefollowingexample,theSavemethodoftheXDocumentobjectisusedtosaveaform:

XDocument.Save();

ShowAll

SaveAsMethod

SavestheformtothespecifiedUniformResourceLocator(URL).

expression.SaveAs(ByValbstrFileUrlAsString)

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

bstrFileUrlRequiredString.TheURLaddressthattheformshouldbesavedto.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksTheSaveAsmethodwillreturnanerrorifcalledfromaformthatisnotfullytrusted.

NoteTheURLthattheformissavedtomustbeinthesamedomainastheformthatcallstheSaveAsmethod.

ExampleInthefollowingexample,theSaveAsmethodoftheXDocumentobjectisusedtosaveaform:

XDocument.SaveAs("C:\MyForm.xml");

SaveStateMethod

DefinesamethodthatInfoPathcallswhenitneedstosavethestateofaninstanceofthecontrolinaview.

expression.SaveState()

expressionRequired.AnexpressionthatreturnsareferencetotheInfoPathControlobject.

RemarksTheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

SelectNodesMethod

SelectsarangeofnodesinaviewbasedonthespecifiedstartingXMLDocumentObjectModel(DOM)node,theendingXMLDOMnode,andtheviewcontext.

expression.SelectNodes(ByRefpxnStartNodeAsXMLDOMNode,[ByValvarEndNodeAsVariant],[ByValvarViewContextAsVariant])

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

pxnStartNodeRequiredXMLDOMNode.TheXMLDOMnodethatbeginstherange.

varEndNodeOptionalVariant.TheXMLDOMnodethatendstherange.Ifnotspecified,onlythestartingXMLDOMnodewillbeused.

varViewContextOptionalVariant.TheIDofthecontrolthatisusedforthecontext,whichisanelementwiththespecifiedviewcontextofxd:CtrlId.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIfaviewcontextisspecified,alloftheXMLDOMnodesthataretobeselectedmustbewithinthatcontext.

IfanyoftheargumentstotheSelectNodesmethodarenullorarenotexposedintheview,theSelectNodesmethodwillreturnanerror.Inaddition,iftherearemorethanonesetofviewelementswhichmaptothesamespecifiedXMLDOMnodes,withinthespecifiedviewcontext,thentheSelectNodesmethodwillalsoreturnanerror.

ExampleInthefollowingexample,theSelectNodesmethodoftheViewobjectisusedtosetselectiononasingleitemintheview,correspondingtothespecifiedXMLDOMnodeandthen,usingtheGetSelectedNodesmethodoftheViewobject,determineswhethertheselectionhasbeensuccessfulbydisplayinginformationabouttheXMLDOMnodeinamessagebox:

functionSelectEmployee(){varobjXMLNodes;varobjXMLNode;

objXMLNode=XDocument.DOM.selectSingleNode("/employees/employee");XDocument.View.SelectNodes(objXMLNode);

objXMLNodes=XDocument.View.GetSelectedNodes();if(objXMLNodes.Count>0){XDocument.UI.Alert(objXMLNodes(0).nodeName+"\n\n"+objXMLNodes(0).text);}}

ShowAll

SelectTextMethod

SelectsthetextcontainedinaneditablefieldthatisboundtothespecifiedXMLDocumentObjectModel(DOM)node.

expression.SelectText(ByRefpxnFieldAsXMLDOMNode,[ByValvarViewContextAsVariant)

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

pxnFieldRequiredXMLDOMNode.TheXMLDOMnode.

varViewContextOptionalVariant.TheIDofthecontrolthatisusedforthecontext,whichisanelementwiththespecifiedviewcontextofxd:CtrlId.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIfaviewcontextisspecified,thentheeditablefieldthatistobeselectedmustbewithinthatcontext.

IftherearemorethanonesetofviewelementswhichmaptothesamespecifiedXMLDOMnode,withinthegivenviewcontext,thentheSelectTextmethodwillreturnanerror.Inaddition,ifanyoftheargumentstotheSelectTextmethodarenullorarenotexposedintheview,thentheSelectTextmethodwillalsoreturnanerror.

ExampleInthefollowingexample,theSelectTextmethodoftheViewobjectisusedtoselectafieldthatisboundtoanXMLDOMnode:

varobjXMLNode;

objXMLNode=XDocument.DOM.selectSingleNode("/employees/employee/name");XDocument.View.SelectText(objXMLNode);

ShowAll

SetDataVariableMethod

Setsthevalueofapredefinedvariablestoredasaprocessinginstructionattributeintheform'sunderlyingXMLdocument.

expression.SetDataVariable(ByVallVariableNumberAsLong,ByValbstrVariableValueAsString)

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

lVariableNumberRequiredLong.Thenumberofthevariable.

bstrVariableValueRequiredString.Thevalueofthevariable.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIfthevariablebeingsetisnotavalidprocessinginstructionattribute,theSetDataVariablemethodwillreturnanerror.

Togetthevalueofavariable,usetheGetDataVariablemethodoftheXDocumentobject.

NoteMicrosoftOfficeInfoPath2003onlysupportsusingtheinitialViewvariable,whichisthevariableusedtospecifytheinitialviewdisplayedwhenaformisopened.Thenumberofthisvariableisalways1,anditsvaluemustbethenameofaviewwithintheform.

ExampleInthefollowingexample,theSetDataVariablemethodoftheXDocumentobjectisusedtosetthevalueofthefirstvariable:

XDocument.SetDataVariable(1,"View2");

SetDirtyMethod

SetstheIsDirtypropertyontheXDocumentobjecttoaBooleanvaluethatindicateswhetherthedatainaMicrosoftOfficeInfoPath2003formhasbeenmodifiedsinceitwaslastsaved.

expression.SetDirty(ByValvfIsDirtyAsBoolean)

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

vfIsDirtyRequiredBoolean.Specifieswhethertheformistobemarkedasunmodifiedornot.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheSetDirtymethodcanbeusedfromtheOnSubmitRequesteventhandlertoforceadocumenttobemarkedasunchanged.InfoPathwillthereforenotrequesttheusertosavetheformwhenitisclosed.

TheSetDirtymethodcanalsobeusedfromtheOnSaveRequesteventhandlertoprogrammaticallymarktheformaschangedorunchangedsinceitwaslastsaved.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theIsDirtypropertyofthecurrentformissettoFalsesothatInfoPathwillnotprompttheusertosavetheformwhenitisclosed.

XDocument.SetDirty(false);

SetNamedNodePropertyMethod

SetsthevalueofanamedpropertyforthesuppliedXMLnode,whichmustbeanonattributenodeinthemaindatasource.

expression.SetNamedNodeProperty(ByValpxmlMainDOMNodeAsIXMLDOMNode,ByValbstrPropertyNameAsString,ByValbstrValueAsString)

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

pxmlMainDOMNodeRequiredIXMLDOMNode.AnXMLnodecorrespondingtoanonattributenodeinthemaindatasource,forwhichanamedpropertyistobeset.

bstrPropertyNameRequiredString.Specifiesthenameofthepropertybeingset.

bstrValueRequiredString.Specifiesthevaluetowhichthepropertywillbeset.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNamedpropertiesallowuserstoassociatestringswithuser-definedpropertiesofXMLelementnodesinthemaindatasource.ThevalueofanamedpropertycanbesetbyusingtheSetNamedNodePropertymethod.UsetheGetNamedNodePropertymethodtoreadthevalueofanamedproperty.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,thevalueofanamedproperty(withthename"cost")ofanXMLnode(called"item")issetbyusingtheSetNamedNodePropertymethod:

varobjXMLNode=XDocument.DOM.selectSingleNode("/items/item");XDocument.SetNamedNodeProperty(objXMLNode,'cost','100');varstrTest=XDocument.GetNamedNodeProperty(myNode,'cost','empty');

SetSaveAsDialogFileNameMethod

SetsthedefaultfilenameforaformintheSaveAsdialogbox.

expression.SetSaveAsDialogFileName(ByValstrFileNameAsString)

expressionRequired.AnexpressionthatreturnsareferencetoaUIobject.

strFileNameRequired.ThefilenameoftheformsuppliedtotheSaveAsdialogbox.

Security2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIfthestrFileNameargumentisnull,"Form"isusedasthefilename.TheSetSaveAsDialogFileNamemethodmaybeusedinconjunctionwiththeSetSaveAsDialogLocationmethod.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theSetSaveAsDialogFileNamemethodoftheUIobjectisusedtosetthedefaultfilenamefortheSaveAsdialogbox:

XDocument.UI.SetSaveAsDialogFileName("StatusReport.xml");

SetSaveAsDialogLocationMethod

SetstheinitiallocationatwhichtheSaveAsdialogstartstobrowsewhenitisopened.

expression.SetSaveAsDialogLocation(ByValstrLocationUrlAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheUIobject.

strLocationUrlRequired.Thelocation,expressedasaURL,atwhichtheSaveAsdialogboxstartsbrowsing.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksThelocationspecifiedmustbeanabsolutepathanditshouldnotincludeafilename.InfoPathhandlesinvalidpaths,however,andnoerrormessageisgeneratedifaninvalidpathisspecifiedforthestrLocationUrlargument.TheSetSaveAsDialogLocationmethodmaybeusedinconjunctionwiththeSetSaveAsDialogFileNamemethod.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theSetSaveAsDialogLocationmethodoftheUIobjectisusedtosettheinitiallocationfortheSaveAsdialog:

XDocument.UI.SetSaveAsDialogLocation("\\\\MyShare\\Forms");

ShowMailItemMethod

Createsane-mailmessageinthedefaulte-maileditorandattachesthecurrentlyopenMicrosoftOfficeInfoPath2003formtothemessage.

expression.ShowMailItem(ByValbstrToAsString,ByValbstrCCAsString,ByValbstrBCCAsString,ByValbstrSubjectAsString,ByValbstrBodyAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheUIobject.

bstrToRequiredString.Thee-mailaddresstosendthee-mailmessageto.

bstrCCRequiredString.Thee-mailaddresstocopythee-mailmessageto.

bstrBCCRequiredString.Thee-mailaddresstoblindcopythee-mailmessageto.

bstrSubjectRequiredString.Thesubjectofthee-mailmessage.

bstrBodyRequiredString.Thebodytextofthee-mailmessage.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksAfterthee-mailmessageiscreated,thedefaulte-maileditorwilldisplaythee-mailmessage;userscantheninspectandeditthee-mailmessagebeforesendingit.TheShowMailItemmethodwillreturnanerrorifnoe-maileditingprogramisavailable.

NoteTheShowMailItemmethoddoesnotsendthee-mailmessagesitcreates;usersmustmanuallysendthee-mailmessages.

YoucanalsousetheMailEnvelopeobject,accessedthroughtheMailEnvelopepropertyoftheWindowobject,toprogrammaticallycreatee-mailmessages.

ExampleInthefollowingexample,theShowMailItemmethodoftheUIobjectisusedtocreateacustome-mailmessage:

XDocument.UI.ShowMailItem("someone@example.com","","","UpdatedForm","Hereistheupdatedformthatyourequested.");

ShowAll

ShowModalDialogMethod

DisplaysacustommodaldialogboxinaMicrosoftOfficeInfoPath2003form.

expression.ShowModalDialog(ByValbstrNameAsString,[ByValvarArgumentsAsVariant],[ByValvarHeightAsVariant],[ByValvarWidthAsVariant],[ByValvarTopAsVariant],[ByValvarLeftAsVariant])AsVariant

expressionRequired.AnexpressionthatreturnsareferencetotheUIobject.

bstrNameRequiredString.Thenameofthe.htmlfileusedforthemodaldialogbox.

varArgumentsOptionalVariant.Specifiestheargumentstousewhendisplayingthemodaldialogbox.Canbeanytypeofvalue,includinganarrayofvalues.

varHeightOptionalVariant.Setstheheightofthemodaldialogbox.

varWidthOptionalVariant.Setsthewidthofthemodaldialogbox.

varTopOptionalVariant.Setsthetoppositionofthemodaldialogboxrelativetotheupperleftcornerofthedesktop.

varLeftOptionalVariant.Setstheleftpositionofthemodaldialogboxrelativetotheupperleftcornerofthedesktop.

returnsVariant.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksTheShowModalDialogmethodoftheUIobjectallowsyoutodisplaycustomdialogboxestousersastheyfilloutafullytrustedform.Customdialogboxesareimplementedas.htmlfilescreatedinanytypeofHTMLeditor,suchasMicrosoftFrontPage.YoucanusescriptingcodeinacustomdialogboxthatinteractswiththeInfoPathobjectmodelifyoupassobjectstothecustomdialogboxusingthevarArgumentsparameter.

TouseacustomdialogboxinanInfoPathform,youmustfirstaddthe.htmlfileofthecustomdialogboxtotheform'ssetofresourcefilesbyusingtheResourceManagerdialogbox.TheResourceManagerdialogboxisavailablefromtheToolsmenuindesignmode.Afteryouhaveaddedthecustomdialogboxfiletotheform,youcanusetheShowModalDialogmethodtodisplayit.

NoteAlthoughtheShowModalDialogmethodcanonlybeusedinfullytrustedforms,youcancreateacustomdialogboxinstandardformsusingtheshowModalDialogmethodoftheDynamicHTML(DHTML)objectmodel.

ExampleInthefollowingexample,theShowModalDialogmethodoftheUIobjectisusedtodisplayacustomdialogbox.NotethattheXDocumentobjectispassedtothecustomdialogboxusingthevarArgumentsparameter.

XDocument.UI.ShowModalDialog("SimpleDialog.htm",XDocument);

ThefollowingexampleistheHTMLcodeusedtoimplementasimplecustomdialogbox.NotetheuseofthedialogArgumentspropertyoftheDHTMLwindowobjecttogetthevaluespassedtothecustomdialogbox,whichinthiscaseistheXDocumentobjectoftheInfoPathobjectmodel,fromtheShowModalDialogmethod.WhenauserclickstheShowAlertbuttoninthecustomdialogbox,thesourceXMLoftheform'sunderlyingXMLdocumentappearsinamessagebox.

<html><head><scriptlanguage="jscript">vargobjXDocument=null;

functionInitialize(){//SaveareferencetotheXDocumentobject.if(typeofwindow.dialogArguments=="object")gobjXDocument=window.dialogArguments;}</script>

<title>ASimpleCustomDialogBox</title></head>

<bodystyle="BACKGROUND-COLOR:window"onLoad="Initialize()"><strong>Clickoneofthefollowingbuttons:</strong>

<br/><br/><divid="divButtons"tyle="align:center"><inputid="btnShowAlert"style="WIDTH:106px;HEIGHT:24px"onclick='gobjXDocument.UI.Alert(gobjXDocument.DOM.xml);'type="button"size="21"value="ShowAlert"></input><inputid="btnCancel"style="WIDTH:106px;HEIGHT:24px"onclick="window.close();"type="button"size="21"value="Cancel"></input></div></body></html>

ShowSignatureDialogMethod

DisplaystheMicrosoftOfficeInfoPath2003DigitalSignaturesdialogbox.

expression.ShowSignatureDialog()

expressionRequired.AnexpressionthatreturnsareferencetotheUIobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheShowSignatureDialogmethodcanbeusedonlyinformsthathavebeenenabledfordigitalsigning.Themethodwillreturnanerrorifusedinaformthatisnotenabledfordigitalsigning.

ExampleInthefollowingexample,theShowSignatureDialogmethodoftheUIobjectisusedtodisplaytheInfoPathDigitalSignaturesdialogbox:

XDocument.UI.ShowSignatureDialog();

SignMethod(Index)

ThismethodisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickaSignmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheSignmethod.

SignmethodasitappliestotheSignatureobject.

SignmethodasitappliestotheSignedDataBlockobject.

SignMethod(SignatureObject)

WritestheXMLdigitalsignatureblockandcomputesthecryptographichashforthesigneddata.ThismethodcanonlybecalledfromtheOnSigneventhandler.CallingthismethoddisplaystheDigitalSignaturesdialogbox.

expression.Sign()

expressionRequired.AnexpressionthatreturnsareferencetoaSignatureobject.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksUsetheCreatemethodoftheSignaturescollectiontocreateadigitalsignature.Then,usetheSignmethodtowritethedigitalsignature.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

SignMethod(SignedDataBlockObject)

InvokestheDigitalSignaturesdialogboxtoaddadigitalsignaturetoasetofsigneddatainaMicrosoftOfficeInfoPath2003form.Thenewsignatureusesthedefaultsignaturetemplate,anditisappliedtotheSignedDataBlockobject.

expression.Sign()

expressionRequired.AnexpressionthatreturnsareferencetoaSignedDataBlockobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

SubmitMethod(ADOAdapterObject)

Executesthesubmitoperationontheassociatedadapter.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoaADOAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksFailsiftheSubmitAllowedpropertyoftheADOAdapterobjectisFalse.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

SubmitMethod(DAVAdapterObject)

Executesthesubmitoperationontheassociatedadapter.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoaDAVAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheSubmitmethodoftheDAVAdapterobjectsubmitstheform'sentireunderlyingXMLdocument,whereastheSubmitDatamethodoftheDAVAdapterobjectcansubmitanyXMLDOMelementordocument.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

SubmitMethod(EmailAdapterObject)

Executesthesubmitoperationontheassociatedadapter.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksTheSubmitmethodoftheEmailAdapterobjectsubmitstheform'sentireunderlyingXMLdocument,whereastheSubmitDatamethodoftheEmailAdapterobjectcansubmitanyXMLDOMelementordocument.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

SubmitMethod(HWSAdapterObject)

Executesthesubmitoperationfortheassociatedadapter.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoanHWSAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

SubmitMethod(Index)

TheSubmitmethodexecutesthesubmitoperationontheassociateddataadapter.ThismethodisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickaSubmitmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheSubmitmethod.

SubmitmethodasitappliestotheADOAdapterobject.

SubmitmethodasitappliestotheDAVAdapterobject.

SubmitmethodasitappliestotheEmailAdapterobject.

SubmitmethodasitappliestotheHWSAdapterobject.

SubmitmethodasitappliestotheSharepointListAdapterobject.

SubmitmethodasitappliestotheWebServiceAdapterobject.

SubmitmethodasitappliestotheXDocumentobject.

SubmitmethodasitappliestotheXMLFileAdapterobject.

SubmitMethod(SharePointListAdapterObject)

TheSubmitmethodisavailablefortheSharepointListAdapterobjectbut,becausetheSharePointListAdapterobjectisavailableforreceivingdataonly,themethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoaSharepointListAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

SubmitMethod(WebServiceAdapterObject)

Executesthesubmitoperationontheassociatedadapter.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoaWebServiceAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksFailsiftheSubmitAllowedpropertyoftheWebServiceAdapterobjectisFalse.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

SubmitMethod(XDocumentObject)

ExecutesthepredefinedsubmitoperationinaMicrosoftOfficeInfoPath2003form.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoanXDocumentobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksUsingtheSubmitmethodissimilarto,butnotexactlylike,usingthesubmitoperationfromtheInfoPathuserinterface.CallingtheSubmitmethodsimplyperformsthesubmitoperation,butthesubmitoperationmustfirstbeenabledforaformindesignmode.

NoteYoucanwriteacustomsubmitoperationusingtheOnSubmitRequestevent,andthenyoucanprogrammaticallycalltheeventusingtheSubmitmethod.

ExampleInthefollowingexample,theSubmitmethodoftheXDocumentobjectisusedtosubmittheformusingthepredefinedsubmitoperation:

XDocument.Submit();

SubmitMethod(XMLFileAdapterObject)

TheSubmitmethodisavailablefortheXMLFileAdapterobjectbut,becausetheXMLFileAdapterobjectisavailableforreceivingdataonly,themethodwillalwaysgeneratearun-timeerrorwhenitiscalledonthatobject.

expression.Submit()

expressionRequired.AnexpressionthatreturnsareferencetoaXMLFileAdapterobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

SubmitDataMethod(DavAdapterObject)

SubmitsthespecifiedDOMelementorDOMdocumenttoadataadapter.

expression.SubmitData(ByValpDataAsIXMLDOMNode)

expressionRequired.AnexpressionthatreturnsareferencetoaDAVAdapterobject.

pDataRequiredIXMLDOMNode.TheXMLdatathatistobemergedintothecurrentlyopenform.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

SubmitDataMethod(EmailAdapterObject)

SubmitsthespecifiedDOMelementorDOMdocumenttoadataadapter.

expression.SubmitData(ByValpDataAsIXMLDOMNode)

expressionRequired.AnexpressionthatreturnsareferencetoanEmailAdapterobject.

pDataRequiredIXMLDOMNode.TheXMLdatathatistobemergedintothecurrentlyopenform.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

SubmitDataMethod(Index)

TheSubmitDatamethodexecutesthesubmitoperationfortheassociateddataadapter.ThismethodisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickaSubmitDatamethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheSubmitDatamethod.

SubmitDatamethodasitappliestotheDAVAdapterobject.

SubmitDatamethodasitappliestotheEmailAdapterobject.

SwitchViewMethod

ChangestheactiveviewofaMicrosoftOfficeInfoPath2003formtoaspecifiedview.

expression.SwitchView(ByValbstrNameAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheViewobject.

bstrNameRequiredString.Thenameoftheviewtoswitchto.Ifanemptystringisused,thedefaultviewisdisplayed.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksIfanemptystringisusedasthebstrNameparameter,theviewischangedtothedefaultviewoftheform.

ExampleInthefollowingexample,theSwitchViewmethodoftheViewobjectisusedtochangethecurrentviewtothedefaultview:

XDocument.View.SwitchView("");

TodayMethod

ReturnsaVariantcontainingthecurrentsystemdateinISOformat(yyyy-mm-dd).

expression.Today()AsVariant

expressionRequired.AnexpressionthatreturnsareferencetotheDateobject.

returnsAVariantcontainingthecurrentsystemdate.

SecurityLevel0:Canbeaccessedwithoutrestrictions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,thevariablecurrentDateissettothecurrentsystemdate.

varcurrentDate=XDocument.Util.Date.Today();

UninitMethod

Definesamethodthatmustbeprovidedbythedevelopertoperformanycleanuproutinesthatarerequiredbeforeaninstanceofthecontrolisremovedfromaview.

expression.Uninit()

expressionRequired.AnexpressionthatreturnsareferencetotheInfoPathControlobject.

RemarksInfoPathcallstheUninitmethodimmediatelybeforethecontrolisremovedfromtheviewanddestroyed.NotethatbecauseInfoPathformsmakeuseofXSLtransformstorepresentviews,anychangesinthedataorexplicitcallstotheobjectmodelcancauseInfoPathtoautomaticallysynchronizetheviewwiththedatathatiscontainedinaform'sunderlyingXMLdocument,whichdestroysandrecreatestheview.ThismeansthatActiveXcontrolsarelikelytobecreatedanddestroyedmuchmoreoftenwithinagivensessionthancontrolsinVisualBasicformsorWebforms.ActiveXcontrolswhichneedtopreservestateinformationindependentofthebounddata,suchasthestateofthescrollposition,shouldcreateroutinesintheInitmethodofthecontrolthatusetheSetNamedNodePropertymethodtosavethisinformation,andusetheGetNamedNodePropertymethodtorestorestateinformationduringtheInitmethodcall.

TheInfoPathControlandInfoPathControlSiteobjectsandtheirmethodsandpropertiesaredesignedtobeusedonlyfromtheimplementationofanActiveXcontrol.TheseobjectsandtheirmembersarenotsupportedinInfoPathformcode.FormoreinformationonhowtocreateActiveXcontrolsthatworkwithInfoPath,seetheInfoPathDeveloperCenter.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.AnyformtemplatethatcontainsaviewwithanActiveXcontrolthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

UnregisterSolutionMethod(ApplicationObject)

UninstallsthespecifiedMicrosoftOfficeInfoPath2003formtemplate.

expression.UnregisterSolution(ByValbstrSolutionURIAsString)

expressionRequired.AnexpressionthatreturnsareferencetoanApplicationobject.

bstrSolutionURIRequiredString.ThestringthatspecifiestheUniformResourceIdentifier(URI)oftheformtemplate.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksIftheformtemplatecannotbeunregistered,theUnregisterSolutionmethodwillreturnanerror.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingVisualBasicforApplications(VBA)example,theUnregisterSolutionmethodoftheApplicationobjectisusedtouninstallaformtemplate:

PublicSubUninstallForm()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.Application")

'UnregistertheInfoPathformtemplate.objIP.UnregisterSolution("C:\\MyForms\\MyFormTemplate.xsn")MsgBox("TheInfoPathformtemplatehasbeenunregistered.")

SetobjIP=Nothing

EndSub

ShowAll

UnregisterSolutionMethod(ExternalApplicationObject)

UninstallsthespecifiedMicrosoftOfficeInfoPath2003formtemplate.

expression.UnregisterSolution(ByValbstrSolutionURIAsString)

expressionRequired.AnexpressionthatreturnsareferencetotheExternalApplicationobject.

bstrSolutionURIRequiredString.ThestringvaluethatspecifiestheUniformResourceIdentifier(URI)oftheformtemplate.

SecurityLevel3:Canbeaccessedonlybyfullytrustedforms.

RemarksIftheformtemplatecannotbeunregistered,theUnregisterSolutionmethodwillreturnanerror.

ExampleInthefollowingexample,whichiswrittenintheVisualBasicforApplications(VBA)programminglanguage,theUnregisterSolutionmethodoftheExternalApplicationobjectisusedtouninstallaformtemplate:

PublicSubUninstallForm()

DimobjIPAsObject

'CreateareferencetotheExternalApplicationobject.SetobjIP=CreateObject("InfoPath.ExternalApplication")

'UnregistertheInfoPathformtemplate.objIP.UnregisterSolution("C:\\MyForms\\MyFormTemplate.xsn")MsgBox("TheInfoPathformtemplatehasbeenunregistered.")

SetobjIP=Nothing

EndSub

ShowAll

UnregisterSolutionMethod(Index)

TheUnregisterSolutionmethoduninstallsthespecifiedMicrosoftOfficeInfoPath2003formtemplate.ThismethodisimplementedinseveralMicrosoftOfficeInfoPath2003objectmodelcollections.ClickanUnregisterSolutionmethodlinkbelowtoviewtheHelptopicforaspecificimplementationoftheUnregisterSolutionmethod.

UnregisterSolutionmethodasitappliestotheApplicationobject.

UnregisterSolutionmethodasitappliestotheExternalApplicationobject.

ShowAll

OnAfterChangeEvent

Occursafterchangestoaform'sunderlyingXMLdocumenthavebeenacceptedandaftertheOnValidateeventhasoccurred.

Functionnode::OnAfterChange(ByRefpDataDOMEventAsDataDOMEvent)

pDataDOMEventRequiredDataDOMEvent.AreferencetotheDataDOMEventobject.

RemarksThiseventhandlerdoesnotallowuserstocancelanoperation.

TheOnAfterChangeeventistypicallyusedforchangingdatainaformafterotherchangeshaveoccurred—forexample,makingcalculationsorchangingthestructureofaform'sunderlyingXMLdocument.

NoteInsomecases,eventsrelatedtochangesinaform'sunderlyingXMLdocumentmayoccurmorethanonce.Forexample,whenexistingdataischanged,aninsertanddeleteoperationoccurs.

ExampleInthefollowingexamplefromtheEventsdevelopersampleform,theOnAfterChangeeventhandlerisusedtocallacustomfunctionthatperformscalculations:

functionmsoxd__ContactDates::OnAfterChange(eventObj){if(eventObj.IsUndoRedo){//AnundoorredooperationhasoccurredandtheDOMisread-only.return;}CalculateTotalCampaignCost();}

ShowAll

OnAfterImportEvent

Occursaftertheimport(ormerge)operationhassuccessfullycompleted.

FunctionXDocument::OnAfterImport(ByRefpEventAsDocEvent)

pEventRequiredDocEvent.AreferencetotheDocEventobject.

RemarksThiseventhandlerdoesnotallowuserstocancelanoperation.

Ifthemergeoperationincludesmergingmultipleforms,theOnAfterImporteventoccursonlyafterallformshavebeenmergedandthecompleteoperationissuccessful.

NoteTheOnAfterImporteventhandlercannotbecreatedusingMicrosoftOfficeInfoPath2003designmode;itmustbecreatedmanually.

CreatingtheOnAfterImporteventhandler

ExampleInthefollowingexample,theOnAfterImporteventhandlerisusedtodisplayamessageboxthatinformstheuserthatthemergeoperationcompletedsuccessfully:

functionXDocument::OnAfterImport(eventObj){XDocument.UI.Alert("Mergeoperationwassuccessful.")}

ShowAll

OnBeforeChangeEvent

Occursafterchangestoaform'sunderlyingXMLdocumenthavebeenmadebutbeforethechangesareaccepted.

Functionnode::OnBeforeChange(ByRefpDataDOMEventAsDataDOMEvent)

pDataDOMEventRequiredDataDOMEvent.AreferencetotheDataDOMEventobject.

RemarksThiseventhandlerallowsuserstocancelanoperation.

DuringtheOnBeforeChangeevent,theform'sunderlyingXMLdocumentisplacedinread-onlymode.IftheReturnStatuspropertyoftheDataDOMEventobjectissettoFalse,MicrosoftOfficeInfoPath2003rejectsthechangesthatweremadeandamessageboxisdisplayedtotheuser.IfanerroroccursinthescriptingcodefortheOnBeforeChangeeventhandler,InfoPathrejectsthechangesandrestoresthedatatoitspreviousstate.

Notes

ItisbesttoavoidswitchingviewsduringtheOnBeforeChangeevent;changeshavenotyetbeenaccepted,andswitchingtoanotherviewmayresultinanerror.

Insomecases,eventsrelatedtochangesinaform'sunderlyingXMLdocumentmayoccurmorethanonce.Forexample,whenexistingdataischanged,aninsertanddeleteoperationoccurs.

IfavalidationerrorisencounteredinanyOnBeforeChangeeventhandler,thedocumentfailstoload.Atry-catchblockintheOnLoadeventcanbeusedtocatchthisvalidationfailureandtoloadthedocumentdespitetheerror.

ExampleInthefollowingexamplefromtheEventsdevelopersampleform,theOnBeforeChangeeventhandlerisusedtovalidatethedatainafield.Ifthedataisnotvalid,theReturnStatuspropertyoftheDataDOMEventobjectisusedtorejectthechanges.

functionmsoxd__RepVisitDt::OnBeforeChange(eventObj){varoNode=XDocument.DOM.selectSingleNode("/Customers/CustomerInfo/ContactDates/PhoneContactDt");

if(!oNode.text){eventObj.ReturnMessage="ThePhoneContactStartdatemustbesetpriortotheRepresentativeVisitdate.";eventObj.ReturnStatus=false;return;}

//Ifthedataisvalid,eventObj.ReturnStatus=true.eventObj.ReturnStatus=true;return;}

ShowAll

OnClickEvent

OccurswhenabuttoncontrolisclickedwithinaviewinaMicrosoftOfficeInfoPath2003form.

FunctionScriptID::OnClick(ByRefeventObjAsDocActionEvent)

eventObjRequiredDocActionEvent.AreferencetotheDocActionEventobject.

RemarksThiseventhandlerdoesnotallowuserstocancelanoperation.

NoteTheOnClickeventfortheInfoPathbuttoncontrolistheonlycontroleventthatissupported.

ExampleInthefollowingexamplefromtheEventsdevelopersampleform,theOnClickeventhandlerisusedtoperformdatavalidationonsomeofthefieldscontainedintheNewCustomerviewwhenauserclicksabuttontoswitchtoanotherview:

functionbtnSwitchContact::OnClick(eventObj){if(XDocument.View.Name=="NewCustomer"){if(XDocument.DOM.selectSingleNode('/Customers/CustomerInfo/CustomerName').text==""&&XDocument.DOM.selectSingleNode('/Customers/CustomerInfo/CustomerID').text==""){XDocument.UI.Alert("TheCustomerNameandIDmust"+"befilledinpriortoswitchingtheview.");return;}elseif(XDocument.DOM.selectSingleNode('/Customers/CustomerInfo/CustomerName').text==""){XDocument.UI.Alert("TheCustomerNamemustbefilled"+"inpriortoswitchingtheview.");return;}elseif(XDocument.DOM.selectSingleNode('/Customers/CustomerInfo/CustomerID').text==""){XDocument.UI.Alert("TheCustomerIDmustbefilledin"+"priortoswitchingtheview.");return;

}}XDocument.View.SwitchView('ContactCustomer');}

ShowAll

OnContextChangeEvent

Occursafterthecontextnodechanges.

FunctionXDocument::OnContextChange(ByRefpEventAsDocContextChangeEvent)

pEventRequiredDocContextChangeEvent.AreferencetotheDocContextChangeEventobject.

RemarksThecontextnodeistheXMLDOMnodemappedtotheviewthatcorrespondstothecontainer(oritem)withthecurrentXMLselection.Forexample,ifthecurrentselectionintheviewisinatextbox,thecontextnodeisthenodetowhichthetextboxisbound.Ifthecurrentselectionisarepeatingsection,thecontextnodeisthenodeforthatitem.Iftworepeatingsectionsareselected,thecontextnodeistheancestorXMLDOMforbothitemsmappedtotheview.

TheOnContextChangeeventisasynchronous.Itdoesnotfireoneverychangeinthecontextnode;instead,itfiresaftertheapplicationhasstoppedprocessingotherevents.

Whenthedocumentloads,orwhenaviewchangeoccurs,theOnContextChangeeventwilloccuraftertheOnLoadandOnSwitchVieweventsoccur.

WhentheIsUndoRedopropertyoftheDocContextChangeEventobjectisTrue,thecontextchangewascausedbyauser'sundoorredooperationratherthananexplicitusercontextchange.OperationsperformedwithintheOnContextChangeeventhandlerthatmodifytheXMLDOMshouldbeavoidedinresponsetoundoorredooperations,becausetheymayinterferewiththeuser'sintentiontorevertdatatoapreviousstate.

Forrichtextboxcontrols,theOnContextChangeeventisnotraisedforcontextchangeswithintheXHTMLcontent—thatis,selectionchangestotherichtextinthecontrol.TheGetContextNodesmethodcanbeusedtodeterminetheselectionwithinrichtextboxcontrols.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,instructionsspecifictodifferentcontextnodesinaformareaddedtothebodyofacustomtaskpane:

functionXDocument::OnContextChange(eventObj){varoContextNode=eventObj.Context;

varstrText="";if(oContextNode.nodeName=="my:root")strText="";elseif(oContextNode.nodeName=="my:singleName")strText="Typeyourfullname.";elseif(oContextNode.nodeName=="my:webSite")strText="TypetheWebaddressofyourpersonalwebpage.";

varoTaskPane=XDocument.View.Window.TaskPanes.Item(0);oTaskPane.HTMLDocument.body.innerText=strText;}

ShowAll

OnLoadEvent

OccursafteraMicrosoftOfficeInfoPath2003formhasbeenloaded,butbeforeanyviewshavebeeninitialized.

FunctionXDocument::OnLoad(ByRefpEventAsDocReturnEvent)

pEventRequiredDocReturnEvent.AreferencetotheDocReturnEventobject.

RemarksThiseventhandlerallowsuserstocancelanoperation.

IftheReturnStatuspropertyoftheDocReturnEventobjectissettoFalse,InfoPathcancelstheloadingoftheform.IfanerroroccursinthescriptingcodefortheOnLoadeventhandler,InfoPathignoresitandreliesontheReturnStatuspropertyoftheDocReturnEventobject.IftheReturnStatuspropertyisnotexplicitlyset,thedefaultvalueofTrueisused.

NoteWhentheOnLoadeventoccurs,theviewisnotinitializedandtheXSLTransformation(XSLT)usedfortheviewisnotyetloaded.TheXDocumentobjectisnotaddedtotheXDocumentscollectionuntilaftertheOnLoadeventhasoccurred.However,theXDocumentobjectisavailableduringtheOnLoadevent.

ExampleInthefollowingexamplefromtheSalesReportsampleform,theOnLoadeventhandlerisusedtodeterminewhethertheformhasbeendigitallysigned,andifithasn't,toinitializesomedatevaluesusingacombinationofscriptingfunctionsandcustomfunctions:

functionXDocument::OnLoad(objEvent){//AvoidDOMupdateswhenthedocumenthasbeendigitallysigned.if(XDocument.IsSigned)return;

vartoday=newDate();initializeNodeValue("/sls:salesReport/sls:date",getDateString(today));initializeNodeValue("/sls:salesReport/sls:year",today.getFullYear());}

ThisOnloadeventhandlerexampledependsontwocustomfunctions,whicharealsofromtheSalesReportsampleform:initializeNodeValueandsetNodeValue.

functioninitializeNodeValue(xpath,strValue){varxmlNode=getNode(xpath);

//Setthenodevalue*ONLY*ifthenodeisempty.if(xmlNode.text=="")setNodeValue(xmlNode,strValue);}

functionsetNodeValue(xpath,value){varxmlNode=getNode(xpath);

if(!xmlNode)return;

//Thexsi:nilneedstoberemovedbeforewesetthevalue.if(value!=""&&xmlNode.getAttribute("xsi:nil"))xmlNode.removeAttribute("xsi:nil");

//Settingthevaluewouldmarkthedocumentasdirty.//Let'sdothatifthevaluehasreallychanged.if(xmlNode.text!=value)xmlNode.text=value;}

ShowAll

OnMergeRequestEvent

OccurswhenthemergeoperationisinvokedeitherfromtheMicrosoftOfficeInfoPath2003userinterfaceorfromthecommandlinebyusingthe/aggregateoption.

FunctionXDocument::OnMergeRequest(ByRefpEventAsMergeEvent)

pEventRequiredMergeEvent.AreferencetotheMergeEventobject.

RemarksIftheReturnStatuspropertyoftheMergeEventobjectissettoFalse,InfoPathcancelsthemergeoperation.IfanerroroccursinthecodefortheOnMergeRequesteventhandler,InfoPathignorestheerrorandreliesontheReturnStatuspropertyoftheMergeEventobject.IftheReturnStatuspropertyisnotexplicitlyset,thedefaultvalueofFalseisused.

ForInfoPathformsstoredinaWindowsSharePointServicesformlibrary,theOnMergeRequesteventalsooccurswhentheMergeDocuments2methodoftheOpenXMLDocumentscontrolisexecuted.FormoreinformationontheOpenXMLDocumentscontrol,seetheSharePointProductsandTechnologies2003SoftwareDevelopmentKit,whichisavailableontheMicrosoftSharePointProductsandTechnologiesWebsite.

IfyoucreateaneventhandlerfortheOnMergeRequesteventofaformtemplate,youmustedittheformdefinitionfile(.xsf)tosettheuseScriptHandlerattributeto"yes"beforeitwillrun.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theOnMergeRequesteventhandlerperformsamergeoperation,anditsetsvariablestoindicatethestatusofthemergeoperation:

varg_fMerging=false;

functionXDocument::OnMergeRequest(eventObj){//Setglobalpropertytoindicatethatformsarebeingmerged.if(eventObj.Index==0)g_fMerging=true;

XDocument.ImportDOM(eventObj.DOM);eventObj.ReturnStatus=true;if(eventObj.Index+1==eventObj.Count){g_fMerging=false;XDocument.UI.Alert("Yourrequesttomerge"+eventObj.Count+"filesisnowcomplete.");}}

OnSaveRequestEvent

OccurswhenthesaveoperationisinvokedfromtheMicrosoftOfficeInfoPath2003userinterfaceorbyusingtheSaveorSaveAsmethodoftheXDocumentobjectintheInfoPathobjectmodel.

FunctionXDocument::OnSaveRequest(ByRefpEventAsSaveEvent)

pEventRequiredSaveEvent.AreferencetotheSaveEventobject.

RemarksIftheReturnStatuspropertyoftheSaveEventobjectissettoFalse,InfoPathcancelsthesaveoperation.IfanerroroccursinthecodefortheOnSaveRequesteventhandler,InfoPathignorestheerrorandreliesontheReturnStatuspropertyoftheSaveEventobject.IftheReturnStatuspropertyisnotexplicitlyset,thedefaultvalueofFalseisused.

TheReturnStatuspropertyworksinconjunctionwiththeIsCancelledpropertywhentheInfoPathformisclosing.Ifthedocumenthaschangesthathavenotbeensavedandtheusercancelsthesaveoperation,theIsCancelledpropertycanbesettoTruetoallowInfoPathtoclose.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleInthefollowingexample,theOnSaveRequesteventhandlerisusedtocreateanXMLHTTPobjectfortransportingtheform'sunderlyingXMLdocument:

functionXDocument::OnSaveRequest(eventObj){ //Writethecodetoberunbeforesavinghere.

XDocument.UI.Alert("Beginsavingform.");

eventObj.IsCancelled=eventObj.PerformSaveOperation();

//Writethecodetoberunaftersavinghere.

XDocument.UI.Alert("Formsaved.");

eventObj.ReturnStatus=true;}

OnSignEvent

Occursafterasetofsigneddatahasbeenselectedtosign.

FunctionXDocument::OnSign(ByRefpEventAsSignEvent)

pEventRequiredSignEvent.AreferencetotheSignEventobject.

RemarksYoucanusethiseventtoaddadditionaldatatothedigitalsignature.Forexample,youcanadddatafromatrustedtimestampserver,oraddaserver-sidecountersignatureofthetransaction.Youcanalsousethiseventtoblocksigningifthecurrentuserisnotamemberofaparticulargroup.

NoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ShowAll

OnSubmitRequestEvent

OccurswhenthesubmitoperationisinvokedeitherfromtheMicrosoftOfficeInfoPath2003userinterfaceorbyusingtheSubmitmethodoftheXDocumentobjectintheInfoPathobjectmodel.

FunctionXDocument::OnSubmitRequest(ByRefpEventAsDocReturnEvent)

pEventRequiredDocReturnEvent.AreferencetotheDocReturnEventobject.

RemarksThiseventhandlerallowsuserstocancelanoperation.

IftheReturnStatuspropertyoftheDocReturnEventobjectissettoFalse,InfoPathcancelsthesubmitoperation.IfanerroroccursinthescriptingcodefortheOnSubmitRequesteventhandler,InfoPathignoresitandreliesontheReturnStatuspropertyoftheDocReturnEventobject.IftheReturnStatuspropertyisnotexplicitlyset,thedefaultvalueofFalseisused.

ExampleInthefollowingexample,theOnSubmitRequesteventhandlerisusedtocreateanXMLHTTPobjectfortransportingtheform'sunderlyingXMLdocument:

functionXDocument::OnSubmitRequest(eventObj){//CreateanXMLHTTPobjectfordocumenttransport.try{varobjXmlHttp=newActiveXObject("MSXML2.XMLHTTP");}catch(ex){XDocument.UI.Alert("CouldnotcreateMSXML2.XMLHTTPobject.\r\n"+ex.number+"-"+ex.description);

//ReturnwitheventObj.ReturnStatus==false,//becausenochangewasmadetothisvalue.return;}

//PosttheXMLdocumenttostrUrl.objXmlHttp.open("POST",strUrl,false);try{objXmlHttp.send(XDocument.DOM.xml);}catch(ex){XDocument.UI.Alert("Couldnotpost(ASP)documentto"+

strUrl+"\r\n"+ex.number+"-"+ex.description);

//ReturnwitheventObj.ReturnStatus==false.return;}//Ifhere,thesubmitoperationishasbeensuccessful.eventObj.ReturnStatus=true;}

ShowAll

OnSwitchViewEvent

OccursafteraviewinaMicrosoftOfficeInfoPath2003formhasbeensuccessfullyswitched.

FunctionXDocument::OnSwitchView(ByRefpEventAsDocEvent)

pEventRequiredDocEvent.AreferencetotheDocEventobject.

RemarksThiseventhandlerdoesnotallowuserstocancelanoperation.

NoteTheOnSwitchVieweventalsooccurswhenaformisfirstopened.

ExampleInthefollowingexamplefromtheEventsdevelopersampleform,theOnSwitchVieweventhandlerisusedtocheckthenameofthecurrentview.Iftheviewhasthename"ArchiveCustomer,"dataisaddedtotheform'sunderlyingXMLdocument.

functionXDocument::OnSwitchView(eventObj){varoDate=newDate();

if(XDocument.View.Name=="ArchiveCustomer"){varoNotesNode=XDocument.DOM.selectSingleNode("/Customers/CustomerInfo/Notes");varoDivNode=XDocument.DOM.createNode(1,"div","http://www.w3.org/1999/xhtml");

oDivNode.text="Noterecorded"+oDate.toString();oNotesNode.appendChild(oDivNode);}}

ShowAll

OnValidateEvent

Occursafterchangestoaform'sunderlyingXMLdocumenthavebeenacceptedbutbeforetheOnAfterChangeeventoccurs.

Functionnode::OnValidate(ByRefpDataDOMEventAsDataDOMEvent)

pDataDOMEventRequiredDataDOMEvent.AreferencetotheDataDOMEventobject.

RemarksThiseventhandlerdoesnotallowuserstocancelanoperation.

DuringtheOnValidateevent,theform'sunderlyingXMLdocumentisplacedinread-onlymode.

TheOnValidateeventistypicallyusedforhandlingerrorsandworkingwiththeErrorscollection—forexample,addingnewerrorsordeletingexistingones.

NoteInsomecases,eventsrelatedtochangesinaform'sunderlyingXMLdocumentmayoccurmorethanonce.Forexample,whenexistingdataischanged,aninsertanddeleteoperationoccurs.

ExampleInthefollowingpartialexamplefromtheEventsdevelopersampleform,theOnValidateeventhandlerisusedtovalidatecontactinformation.Ifthedataisinvalid,theReportErrormethodoftheDataDOMEVentobjectisusedtocreateanerror.

functionmsoxd__ContactDates::OnValidate(eventObj){variNumberOfDays=0;varobjEmailDate=XDocument.DOM.selectSingleNode('/Customers/CustomerInfo/ContactDates/EmailCampaignDt');varobjPhoneContactDate=XDocument.DOM.selectSingleNode('/Customers/CustomerInfo/ContactDates/PhoneContactDt');varobjRepVisitDate=XDocument.DOM.selectSingleNode('/Customers/CustomerInfo/ContactDates/RepVisitDt');

//Firstvalidatetheemailandphonecontactdates.if(!objEmailDate||!objPhoneContactDate)return;

varemailDate=newDate(objEmailDate.text.replace(/(.*)-(.*)-(.*)/,"$2-$3-$1"));varphoneContactDate=newDate(objPhoneContactDate.text.replace(/(.*)-(.*)-(.*)/,"$2-$3-$1"));

if(isNaN(emailDate)||isNaN(phoneContactDate))return;

//Getthenumberofdaysbetweenthetwodates.iNumberOfDays=GetElapsedDays(emailDate,phoneContactDate);

if(iNumberOfDays<REQUIRED_PHONE_EMAIL_INTERVAL)

eventObj.ReportError(objPhoneContactDate,"ThePhoneContactStartdatemustoccurafter"+REQUIRED_PHONE_EMAIL_INTERVAL+"daysfromthestartoftheEmailCampaign.",false);...}

ShowAll

OnVersionUpgradeEvent

OccurswhentheversionnumberofaMicrosoftOfficeInfoPath2003formbeingopenedisolderthantheversionnumberoftheformtemplateonwhichitisbased.

FunctionXDocument::OnVersionUpgrade(ByRefpEventAsVersionUpgradeEvent)

pEventRequiredVersionUpgradeEvent.AreferencetotheVersionUpgradeEventobject.

RemarksThiseventhandlerallowsuserstocancelanoperation.

DuringtheOnVersionUpgradeevent,theform'sunderlyingXMLdocumentisplacedinread-onlymode,anditisnotvalidatedagainsttheform'sassociatedXMLSchema.IftheReturnStatuspropertyoftheVersionUpgradeEventobjectissettoFalse,InfoPathcancelstheopeningoftheform.IfanerroroccursinthescriptingcodefortheOnVersionUpgradeeventhandler,InfoPathignoresitandreliesontheReturnStatuspropertyoftheVersionUpgradeEventobject.IftheReturnStatuspropertyisnotexplicitlyset,thedefaultvalueofTrueisused.

ExampleInthefollowingexamplefromtheEventsdevelopersampleform,theOnVersionUpgradeeventhandlerisusedtodeterminewhethertheformwiththeincorrectolderversionnumbercontainsanEmailAddresselement.Ifitdoesnot,oneisadded.

functionXDocument::OnVersionUpgrade(eventObj){if(!XDocument.DOM.selectSingleNode("/Customers/CustomerInfo/EmailAddress")){try{//Createthenewelement.varobjItemNode=XDocument.DOM.selectSingleNode("/Customers/CustomerInfo").ownerDocument.createElement("EmailAddress");

//Addthenew<item>elementtotheXMLdocumentasa//childofthe<order>element.XDocument.DOM.selectSingleNode("/Customers/CustomerInfo").appendChild(objItemNode);eventObj.ReturnStatus=true;}catch(ex){XDocument.UI.Alert("Therewasanerrorinsertingthe"+"<EmailAddress>node.\nDescription:"+ex.description);eventObj.ReturnStatus=false;}}}

ShowAll

XdCertificateStatusEnumeration

TheXdCertificateStatusenumerationisusedtodeterminethestatusofadigitalcertificate.TheseenumeratedvaluesarereturnedbytheStatuspropertyoftheCertificateobject.

Name Value DescriptionxdCertificateStatusError 0 Thestatusofthespecifieddigital

certificatecannotbedetermined.xdCertificateStatusValid 1 Thespecifieddigitalcertificateis

valid.xdCertificateStatusExpired 2 Thespecifieddigitalcertificate

hasexpired.xdCertificateStatusNotTrusted 3 Thespecifieddigitalcertificateis

nottrusted.xdCertificateStatusRevoked 4 Thespecifieddigitalcertificate

hasbeenrevoked.

XdConfirmButtonsEnumeration

TheXdConfirmButtonsenumerationisusedtodeterminethetypeofbuttonstobedisplayedinamessagebox.TheseenumeratedvaluesareusedbytheConfirmmethodoftheUIobject.

Name Value DescriptionxdOKCancel 1 OKandCancelbuttonsaredisplayed.xdYesNoCancel 3 Yes,No,andCancelbuttonsaredisplayed.xdYesNo 4 YesandNobuttonsaredisplayed

XdConfirmChoiceEnumeration

TheXdConfirmChoiceenumerationisusedtodeterminewhichbuttonisclickedinamessagebox.TheseenumeratedvaluesareusedbytheConfirmmethodoftheUIobject.

Name Value DescriptionxdOK 1 TheOKbuttonwasclicked.xdCancel 2 TheCancelbuttonwasclicked.xdYes 6 TheYesbuttonwasclicked.xdNo 7 TheNobuttonwasclicked.

ShowAll

XdDocumentVersionModeEnumeration

TheXdDocumentVersionModeenumerationisusedtodeterminehowaMicrosoftOfficeInfoPath2003formwillbeopened.TheseenumeratedvaluesareusedasargumentstotheNewandOpenmethodsoftheExternalApplicationobject.

Name Value DescriptionxdCanOpenInReadOnlyMode 8 Theformisopenedin

read-onlymode.xdCanTransformSigned 16 Theformisopenedandits

transformapplied,eventhoughithasadigitalsignature.

xdFailOnVersionMismatch 0 Theformiscreatedoropenedonlyifitisaccessibleanditsversionnumbermatchestheversionnumberoftheformtemplate.

xdFailOnVersionOlder 1 Theformiscreatedoropenedonlyifitisaccessibleanditsversionnumberisnotolderthantheversionnumberoftheformtemplate.

xdIgnoreDataAdaptersQueryFailure 64 Theformisopenedevenifthequeryassociatedwithitsdataadapterfailstoreturndata.

xdPromptTransformSigned 32 TheformisopenedandtheDigitalSignaturesdialogboxisdisplayedbeforetheform'stransformisapplied.

xdUseExistingVersion 2 Theformiscreatedoropenedusingtheexisting

versionnumberoftheformtemplate.

XdMachineOnlineStateEnumeration

TheXdMachineOnlineStateenumerationisusedtodeterminethestateoftheconnectionfortheclientcomputer.TheseenumeratedvaluesarereturnedbytheMachineOnlineStatepropertyoftheApplicationobject.

Name Value DescriptionxdOffline 0 Theclientcomputerisnotconnectedtothe

network.xdOnline 1 Theclientcomputerisconnectedtothe

network.xdIEIsInOfflineMode 2 MicrosoftInternetExplorerisinoffline

mode.

XdSignatureRelationEnumeration

TheXdSignatureRelationenumerationisusedtodeterminehowdigitalsignaturescanbeaddedtoaSignedDataBlockobject.Theseenumeratedvaluesareread-only.

Name Value DescriptionxdSignatureRelationCoSign 2 Specifiesthatsignaturesare

independentofeachotherintheSignedDataBlockobject.

xdSignatureRelationCounterSign 3 SpecifiesthateachsignaturesignstheprecedingsignatureintheSignedDataBlockobject.

xdSignatureRelationSingle 1 SpecifiesthatonlyonesignaturecanexistintheSignedDataBlockobject.

ShowAll

XdSignatureStatusEnumeration

TheXdSignatureStatusenumerationisusedtodeterminethestatusofadigitalsignature.TheseenumeratedvaluesarereturnedbytheStatuspropertyoftheSignatureobject.

Name Value DescriptionxdSignatureStatusError 0 Thestatusofthespecified

digitalsignaturecannotbedetermined.

xdSignatureStatusValid 1 Thespecifieddigitalsignatureisvalid.

xdSignatureStatusInvalid 2 Thespecifieddigitalsignatureisinvalid.

xdSignatureStatusUnsupported 3 ThespecifieddigitalsignatureisnotsupportedbyMicrosoftOfficeInfoPath2003.

ShowAll

XdTaskPaneTypeEnumeration

TheXdTaskPaneTypeenumerationisusedtodeterminethetypeofMicrosoftOfficeInfoPath2003taskpanethatiscurrentlydisplayed.TheseenumeratedvaluesarereturnedbytheTypepropertyoftheTaskPaneobject.ThesevaluesarealsousedasthepositionalargumenttotheItempropertyoftheTaskPanescollection.

Name Value DescriptionxdTaskPaneBulletsNumbering 9 TheBulletsandNumbering

taskpane.Usedforapplyingbulletandnumberingstylestoaform.

xdTaskPaneClipArt 5 TheClipArttaskpane.Usedforinsertingclipartintoaform.

xdTaskPaneDesignerNew 2 TheDesignaFormtaskpane.Usedtodesignanewform,openaformindesignmode,orselectaformtofillout.

xdTaskPaneFillOutAForm 1 TheFillOutaFormtaskpane.Usedtoopenaformtofilloutordesign.

xdTaskPaneFind 6 TheFindtaskpane.Usedtosearchfortextinaform.

xdTaskPaneFormatting 8 TheFonttaskpane.Usedtoformattext.

xdTaskPaneHelp 4 TheHelptaskpane.UsedtodisplaytheInfoPathHelpsystem.

xdTaskPaneHTML 0 TheInfoPathcustomtaskpane.Usedbyformdeveloperstoprovideextraformfunctionality.

xdTaskPaneHWSWorkflow 12 TheMicrosoftBizTalkServer2004HumanWorkflowServices(HWS)Workflowtaskpane.

xdTaskPaneParaFormatting 11 TheParagraphtaskpane.Usedtoconfigurepropertiesofparagraphsincludingalignmentandspacing.

xdTaskPaneReplace 7 TheReplacetaskpane.Usedtofindandreplacetextinaform.

xdTaskPaneSearchResults 3 TheSearchResultstaskpane.Usedtodisplaytheresultsofasearch.

xdTaskPaneSpelling 10 TheSpellingtaskpane.Usedtocheckthespellinginaform.

XdWindowStateEnumeration

TheXdWindowStateenumerationisusedtodeterminethestateoftheMicrosoftOfficeInfoPath2003windowthatisrepresentedbytheWindowobject.TheseenumeratedvaluesarereturnedorsetbytheWindowStatepropertyoftheWindowobject.

Name Value DescriptionxdWindowStateMaximize 1 Thewindowismaximized.xdWindowStateNormal 2 Thewindowisnotmaximizedor

minimized.xdWindowStateMinimize 3 Thewindowisminimized.

ShowAll

XdWindowTypeEnumeration

TheXdWindowTypeenumerationisusedtodeterminethetypeofMicrosoftOfficeInfoPath2003windowthatiscurrentlydisplayed.TheseenumeratedvaluesarereturnedbytheTypepropertyoftheWindowobject.

Name Value DescriptionxdDesignerWindow 1 Thecurrentwindowisthewindowthatis

displayedindesignmode.xdEditorWindow 0 Thecurrentwindowisthewindowthatis

displayedwhenfillingoutaform.

InfoPathXSFDiagram

<xDocumentClass>*<applicationParameters> *

<solutionProperties>*<calculations>*<calculatedField>(s)

*<customValidation>*<errorCondition>(s)<errorMessage>

*<dataAdapters>*<davAdapter>(s)<fileName><folderURL>

*<emailAdapter>(s)*<attachmentFileName>*<bcc>*<cc>*<intro>*<subject>*<to>

*<hwsAdapter>(s)*<hwsOperation>

*<input>*<partFragment>(s)

*<webServiceAdapter>(s)<operation>*<input>*<partFragment>(s)

*<dataObjects>

Legend

*OptionalElement

(s)RepeatingElement

*<dataObject>(s)<query>*<adoAdapter>*<webServiceAdapter><operation>*<input>*<partFragment>(s)

*<sharepointListAdapter>*<field>(s)

*<xmlFileAdapter>*<documentSchemas><documentSchema>(s)

*<documentSignatures>*<signedDataBlock>(s)*<message>(s)

*<documentVersionUpgrade> *<useScriptHandler>*<useTransform>

*<domEventHandlers>*<domEventHandler>(s)*<ruleSetAction>(s)

*<extensions>*<extension>(s)

*<externalViews>*<externalView>(s)*<mainpane>

*<featureRestrictions>*<autoRecovery>*<exportToExcel>

*<exportToWeb>*<print>*<save>*<sendMail>

*<fileNew><initialXMLDocument>*<customCategory>(s)

*<hwsWorkflow><allowedActions><action>(s)

<allowedTasks><task>(s)

<location>*<importParameters>*<importSource>(s)

*<listProperties>*<fields>*<field>(s)

*<onLoad><ruleSetAction>

<package><files>*<file>(s)*<fileProperties>*<property>(s)

*<permissions><allowedControl>(s)

*<query>*<adoAdapter>

*<queryAction>*<sharepointListAdapter>

*<field>(s)*<webServiceAdapter>

<operation>*<input>*<partFragment>(s)

*<xmlFileAdapter>*<roles><role>(s)<membership>(s)<getUserNameFromData>(s)<group>(s)<username>(s)

*<ruleSets>*<ruleSet>(s)<rule>(s)*<assignmentAction>(s)*<closeDocumentAction>(s)*<dialogBoxExpressionAction>(s)*<dialogBoxMessageAction>(s)*<exitRuleSet>(s)*<openNewDocumentAction>(s)*<queryAction>(s)*<submitAction>(s)*<switchViewAction>(s)

*<save>*<useScriptHandler>

*<schemaErrorMessages>

*<override>(s)<errorMessage>

*<scripts>*<script>(s)

*<submit>*<davAdapter><fileName><folderURL>

*<emailAdapter>*<attachmentFileName>*<bcc>*<cc>*<intro>*<subject>*<to>

*<errorMessage>*<ruleSetAction>*<submitAction>*<successMessage>*<useHttpHandler>*<useScriptHandler>*<useQueryAdapter>*<webServiceAdapter><operation>*<input>*<partFragment>(s)

<taskpane><views><view>(s)

*<editing>*<xmlToEdit>(s)*<editWith>(s)*<fragmentToInsert><chooseFragment>(s)*<attributeData>

*<masterDetail><mainpane>*<menu>(s)*<button>(s)*<menu>(s)

*<menuArea>(s)*<button>(s)*<menu>(s)

<printSettings>*<footer>*<header>

*<toolbar>(s)*<button>(s)*<menu>(s)

*<unboundControls>*<button>(s)*<ruleSetAction>

ShowAll

InfoPathXSFSchema

TheMicrosoftOfficeInfoPath2003formdefinition(.xsf)fileschemaisanXMLSchema(.xsd)filethatisusedtovalidatethe.xsffilecontainedinanInfoPathformtemplate.

Thefollowingisacompletelistingofthecontentsofthe.xsfschemafile:

<?xmlversion="1.0"encoding="UTF-8"?><xsd:schemaxmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition" targetNamespace="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"elementFormDefault="qualified" attributeFormDefault="unqualified"> <!--xdTitletype--> <xsd:simpleTypename="xdTitle"> <xsd:restrictionbase="xsd:string"> <xsd:minLengthvalue="1"/> <xsd:maxLengthvalue="255"/> <xsd:patternvalue="([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?"/> </xsd:restriction> </xsd:simpleType> <!--xdViewNametype--> <xsd:simpleTypename="xdViewName"> <xsd:restrictionbase="xsd:string"> <xsd:minLengthvalue="1"/> <xsd:maxLengthvalue="255"/> <xsd:patternvalue="([^\p{Z}\p{C}/\\#&amp;&quot;&gt;&lt;])(([^\p{Zl}\p{Zp}\p{C}/\\#&amp;&quot;&gt;&lt;])*([^\p{Z}\p{C}/\\#&amp;&quot;&gt;&lt;]))?"/> </xsd:restriction> </xsd:simpleType> <!--xdRoleNametype--> <!--usesxdViewNameasbase--> <xsd:simpleTypename="xdRoleName"> <xsd:restrictionbase="xsf:xdViewName"></xsd:restriction> </xsd:simpleType> <!--xdYesNotype-->

<xsd:simpleTypename="xdYesNo"> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="yes"/> <xsd:enumerationvalue="no"/> </xsd:restriction> </xsd:simpleType> <!--xdEnabledDisabledtype--> <xsd:simpleTypename="xdEnabledDisabled"> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="enabled"/> <xsd:enumerationvalue="disabled"/> </xsd:restriction> </xsd:simpleType> <!--xdManualAutotype--> <xsd:simpleTypename="xdManualAuto"> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="manual"/> <xsd:enumerationvalue="automatic"/> </xsd:restriction> </xsd:simpleType> <!--xdExpressionLiteraltype--> <xsd:simpleTypename="xdExpressionLiteral"> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="expression"/> <xsd:enumerationvalue="literal"/> </xsd:restriction> </xsd:simpleType> <!--xdFileNametype--> <xsd:simpleTypename="xdFileName"> <xsd:restrictionbase="xsd:string"> <xsd:minLengthvalue="1"/> <xsd:maxLengthvalue="64"/> </xsd:restriction>

</xsd:simpleType> <!--xdScriptLanguagetype--> <xsd:simpleTypename="xdScriptLanguage"> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:patternvalue="(([Jj][Aa][Vv][Aa]|(([Jj])|([Vv][Bb]))([Ss][Cc][Rr][Ii][Pp][Tt]))([.][Ee][Nn][Cc][Oo][Dd][Ee]))|([Jj][Aa][Vv][Aa]|(([Jj])|([Vv][Bb]))([Ss][Cc][Rr][Ii][Pp][Tt]))|([Mm][Aa][Nn][Aa][Gg][Ee][Dd][Cc][Oo][Dd][Ee])"/> </xsd:restriction> </xsd:simpleType> <!--xdSolutionVersiontype--> <xsd:simpleTypename="xdSolutionVersion"> <xsd:restrictionbase="xsd:string"> <xsd:patternvalue="(([0-9]{1,4}.){3}[0-9]{1,4})"/> </xsd:restriction> </xsd:simpleType> <!--xdEmptyStringtype--> <xsd:simpleTypename="xdEmptyString"> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="0"/> </xsd:restriction> </xsd:simpleType> <!--xdErrorMessagetype--> <xsd:simpleTypename="xdErrorMessage"> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="1023"/> </xsd:restriction> </xsd:simpleType> <!--xdDesignModetype--> <xsd:simpleTypename="xdDesignMode"> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="normal"/> <xsd:enumerationvalue="protected"/> </xsd:restriction> </xsd:simpleType> <!--xdTrustLeveltype-->

<xsd:simpleTypename="xdTrustLevel"> <xsd:restrictionbase="xsd:string"> <xsd:enumerationvalue="restricted"/> <xsd:enumerationvalue="domain"/> </xsd:restriction> </xsd:simpleType> <!--xdSignedDataBlockNametype--> <xsd:simpleTypename="xdSignedDataBlockName"> <xsd:restrictionbase="xsd:ID"> <xsd:minLengthvalue="1"/> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> <!--xdSignedDataBlockMessagetype--> <xsd:simpleTypename="xdSignedDataBlockMessage"> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> <!--xdSignatureRelationEnumtype--> <xsd:simpleTypename="xdSignatureRelationEnum"> <xsd:restrictionbase="xsd:string"> <xsd:enumerationvalue="countersign"/> <xsd:enumerationvalue="cosign"/> <xsd:enumerationvalue="single"/> </xsd:restriction> </xsd:simpleType> <!--xdHWSnametype--> <xsd:simpleTypename="xdHWSname"> <xsd:restrictionbase="xsd:NCName"> <xsd:patternvalue="[^-^\.^\\^\[^\]^\|^\+^?^\*^@^\{^\}^\(^\)^&gt;^&lt;^=^;^,]*"/> </xsd:restriction> </xsd:simpleType>

<!--xdHWSCaptiontype--> <xsd:simpleTypename="xdHWSCaption"> <xsd:restrictionbase="xsd:string"> <xsd:minLengthvalue="1"/> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> <!--xDocumentClass--> <xsd:elementname="xDocumentClass"> <xsd:complexType> <xsd:all> <xsd:elementref="xsf:package"minOccurs="1"/> <xsd:elementref="xsf:permissions"minOccurs="0"/> <xsd:elementref="xsf:views"minOccurs="1"/> <xsd:elementref="xsf:hwsWorkflow"minOccurs="0"/> <xsd:elementref="xsf:externalViews"minOccurs="0"/> <xsd:elementref="xsf:scripts"minOccurs="0"/> <xsd:elementref="xsf:schemaErrorMessages"minOccurs="0"/> <xsd:elementref="xsf:documentSchemas"minOccurs="0"/> <xsd:elementref="xsf:applicationParameters"minOccurs="0"/> <xsd:elementref="xsf:featureRestrictions"minOccurs="0"/> <xsd:elementref="xsf:fileNew"minOccurs="0"/> <xsd:elementref="xsf:customValidation"minOccurs="0"/> <xsd:elementref="xsf:domEventHandlers"minOccurs="0"/> <xsd:elementref="xsf:importParameters"minOccurs="0"/> <xsd:elementref="xsf:listProperties"minOccurs="0"/> <xsd:elementref="xsf:taskpane"minOccurs="0"/> <xsd:elementref="xsf:documentSignatures"minOccurs="0"/> <xsd:elementref="xsf:dataObjects"minOccurs="0"/> <xsd:elementref="xsf:dataAdapters"minOccurs="0"/> <xsd:elementref="xsf:query"minOccurs="0"/> <xsd:elementref="xsf:submit"minOccurs="0"/> <xsd:elementref="xsf:save"minOccurs="0"/>

<xsd:elementref="xsf:roles"minOccurs="0"/> <xsd:elementref="xsf:onLoad"minOccurs="0"/> <xsd:elementref="xsf:documentVersionUpgrade"minOccurs="0"/> <xsd:elementref="xsf:extensions"minOccurs="0"/> <xsd:elementref="xsf:ruleSets"minOccurs="0"/> <xsd:elementref="xsf:calculations"minOccurs="0"/> </xsd:all> <xsd:attributename="name"type="xsd:string"use="optional"/> <xsd:attributename="author"type="xsd:string"use="optional"/> <xsd:attributename="description"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="solutionVersion"type="xsf:xdSolutionVersion"use="optional"/> <xsd:attributename="productVersion"type="xsd:string"use="optional"/> <xsd:attributename="solutionFormatVersion"type="xsf:xdSolutionVersion"use="required"/> <xsd:attributename="dataFormSolution"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="requireFullTrust"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="trustLevel"type="xsf:xdTrustLevel"use="optional"/> <xsd:attributename="trustSetting"type="xsf:xdManualAuto"use="optional"/> <xsd:attributename="publishUrl"type="xsd:string"use="optional"/> </xsd:complexType> <xsd:keyname="view_name_key"> <xsd:selectorxpath="./xsf:views/xsf:view"/> <xsd:fieldxpath="@name"/> </xsd:key> <xsd:keyname="externalView_name_key"> <xsd:selectorxpath="./xsf:externalViews/xsf:externalView"/> <xsd:fieldxpath="@name"/> </xsd:key>

<xsd:keyname="view_or_externalView_name_key"> <xsd:selectorxpath="./xsf:views/xsf:view|./xsf:externalViews/xsf:externalView"/> <xsd:fieldxpath="@name"/> </xsd:key> <xsd:keyname="ruleset_name_key"> <xsd:selectorxpath="./xsf:ruleSets/xsf:ruleSet"/> <xsd:fieldxpath="@name"/> </xsd:key> <xsd:keyname="dataObject_name_key"> <xsd:selectorxpath="./xsf:dataObjects/xsf:dataObject"/> <xsd:fieldxpath="@name"/> </xsd:key> <xsd:uniquename="adapter_name_unique"> <xsd:selectorxpath="./xsf:dataObjects/xsf:dataObject/xsf:query/*|./xsf:query/*|./xsf:dataAdapters/*|./xsf:submit/xsf:webServiceAdapter|./xsf:submit/xsf:davAdapter|./xsf:submit/xsf:emailAdapter"/> <xsd:fieldxpath="@name"/> </xsd:unique> <xsd:keyname="adapter_name_key"> <xsd:selectorxpath="./xsf:dataAdapters/*"/> <xsd:fieldxpath="@name"/> </xsd:key> <xsd:uniquename="view_external_name_unique"> <xsd:selectorxpath="./xsf:views/xsf:view|./xsf:externalViews/xsf:externalView"/> <xsd:fieldxpath="@name"/> </xsd:unique> </xsd:element> <!--schemaErrorMessages--> <xsd:elementname="schemaErrorMessages"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:override"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element>

<!--override--> <xsd:elementname="override"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:errorMessage"/> </xsd:sequence> <xsd:attributename="match"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <!--applicationParameters--> <xsd:elementname="applicationParameters"> <xsd:complexType> <xsd:all> <xsd:elementref="xsf:solutionProperties"minOccurs="0"/> </xsd:all> <xsd:attributename="application"use="required"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:enumerationvalue="InfoPathDesignMode"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType> </xsd:element> <!--solutionProperties--> <xsd:elementname="solutionProperties"> <xsd:complexType> <xsd:attributename="allowCustomization"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="lastOpenView"use="optional"/> <xsd:attributename="scriptLanguage"type="xsf:xdScriptLanguage"use="optional"/> <xsd:attributename="automaticallyCreateNodes"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="lastVersionNeedingTransform"type="xsf:xdSolutionVersion"use="optional"/> <xsd:attributename="fullyEditableNamespace"type="xsd:anyURI"use="optional"/>

<xsd:attributename="publishSaveUrl"type="xsd:string"use="optional"/> </xsd:complexType> </xsd:element> <!--featureRestrictions--> <xsd:elementname="featureRestrictions"> <xsd:complexType> <xsd:all> <xsd:elementname="save"minOccurs="0"> <xsd:complexType> <xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementref="xsf:exportToWeb"minOccurs="0"/> <xsd:elementref="xsf:exportToExcel"minOccurs="0"/> <xsd:elementref="xsf:print"minOccurs="0"/> <xsd:elementref="xsf:sendMail"minOccurs="0"/> <xsd:elementref="xsf:autoRecovery"minOccurs="0"/> </xsd:all> </xsd:complexType> </xsd:element> <!--exportToWeb--> <xsd:elementname="exportToWeb"> <xsd:complexType> <xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"/> </xsd:complexType> </xsd:element> <!--exportToExcel--> <xsd:elementname="exportToExcel"> <xsd:complexType> <xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"/> </xsd:complexType> </xsd:element> <!--print-->

<xsd:elementname="print"> <xsd:complexType> <xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"/> </xsd:complexType> </xsd:element> <!--sendMail--> <xsd:elementname="sendMail"> <xsd:complexType> <xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"/> </xsd:complexType> </xsd:element> <!--autoRecovery--> <xsd:elementname="autoRecovery"> <xsd:complexType> <xsd:attributename="feature"type="xsf:xdEnabledDisabled"use="required"/> </xsd:complexType> </xsd:element> <!--query--> <xsd:elementname="query"> <xsd:complexType> <xsd:choice> <xsd:elementref="xsf:queryAction"/> <xsd:elementref="xsf:adoAdapter"/> <xsd:elementref="xsf:webServiceAdapter"/> <xsd:elementref="xsf:xmlFileAdapter"/> <xsd:elementref="xsf:sharepointListAdapter"/> </xsd:choice> </xsd:complexType> </xsd:element> <!--scripts--> <xsd:elementname="scripts"> <xsd:complexType> <xsd:sequence>

<xsd:elementref="xsf:script"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="language"type="xsf:xdScriptLanguage"use="required"/> <xsd:attributename="enforceScriptTimeout"type="xsf:xdYesNo"use="optional"default="yes"/> </xsd:complexType> </xsd:element> <xsd:elementname="script"> <xsd:complexType> <xsd:attributename="src"type="xsf:xdFileName"use="required"/> </xsd:complexType> </xsd:element> <!--dataObjects--> <xsd:elementname="dataObjects"> <xsd:complexType> <xsd:choiceminOccurs="0"maxOccurs="unbounded"> <xsd:elementref="xsf:dataObject"/> </xsd:choice> </xsd:complexType> <xsd:uniquename="dataObjects_name_unique"> <xsd:selectorxpath="./xsf:dataObject"/> <xsd:fieldxpath="@name"/> </xsd:unique> </xsd:element> <xsd:elementname="dataObject"> <xsd:complexType> <xsd:choice> <xsd:elementname="query"> <xsd:complexType> <xsd:choice> <xsd:elementref="xsf:adoAdapter"/> <xsd:elementref="xsf:webServiceAdapter"/> <xsd:elementref="xsf:xmlFileAdapter"/> <xsd:elementref="xsf:sharepointListAdapter"/>

</xsd:choice> </xsd:complexType> </xsd:element> </xsd:choice> <xsd:attributename="name"type="xsf:xdTitle"use="required"/> <xsd:attributename="schema"type="xsd:string"use="optional"/> <xsd:attributename="initOnLoad"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <!--dataAdapters--> <xsd:elementname="adoAdapter"> <xsd:complexType> <xsd:attributename="name"type="xsf:xdTitle"use="optional"/> <xsd:attributename="connectionString"type="xsd:string"use="required"/> <xsd:attributename="commandText"type="xsd:string"use="required"/> <xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="webServiceAdapter"> <xsd:complexType> <xsd:choice> <xsd:elementref="xsf:operation"/> </xsd:choice> <xsd:attributename="name"type="xsf:xdTitle"use="optional"/> <xsd:attributename="wsdlUrl"type="xsd:string"use="required"/> <xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="useDataSet"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="hwsAdapter"> <xsd:complexType>

<xsd:choice> <xsd:elementref="xsf:hwsOperation"/> </xsd:choice> <xsd:attributename="name"type="xsf:xdTitle"use="required"/> <xsd:attributename="wsdlUrl"type="xsd:string"use="required"/> <xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="operation"> <xsd:complexType> <xsd:choice> <xsd:elementref="xsf:input"minOccurs="0"/> </xsd:choice> <xsd:attributename="name"type="xsd:string"use="required"/> <xsd:attributename="soapAction"type="xsd:string"use="required"/> <xsd:attributename="serviceUrl"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="hwsOperation"> <xsd:complexType> <xsd:choice> <xsd:elementref="xsf:input"/> </xsd:choice> <xsd:attributename="type"type="xsd:string"use="required"/> <xsd:attributename="typeID"type="xsd:string"use="required"/> <xsd:attributename="serviceUrl"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="input"> <xsd:complexType> <xsd:choiceminOccurs="0"maxOccurs="unbounded"> <xsd:elementref="xsf:partFragment"/>

</xsd:choice> <xsd:attributename="source"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="partFragment"> <xsd:complexType> <xsd:attributename="match"type="xsd:string"use="required"/> <xsd:attributename="replaceWith"type="xsd:string"use="required"/> <xsd:attributename="sendAsString"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="dataObject"type="xsd:string"use="optional"/> <xsd:attributename="filter"type="xsd:string"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="xmlFileAdapter"> <xsd:complexType> <xsd:attributename="name"type="xsf:xdTitle"use="optional"/> <xsd:attributename="fileUrl"type="xsd:anyURI"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="sharepointListAdapter"> <xsd:complexType> <xsd:sequence> <xsd:elementname="field"minOccurs="0"maxOccurs="unbounded"> <xsd:complexType> <xsd:attributename="sharepointName"type="xsd:string"use="required"/> <xsd:attributename="infopathName"type="xsd:string"use="required"/> <xsd:attributename="isLookup"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> </xsd:sequence> <xsd:attributename="name"type="xsf:xdTitle"use="required"/> <xsd:attributename="siteUrl"type="xsd:string"use="required"/> <xsd:attributename="sharepointGuid"type="xsd:string"use="required"/>

<xsd:attributename="infopathGroup"type="xsd:string"use="required"/> <xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="davAdapter"> <xsd:complexType> <xsd:all> <xsd:elementname="folderURL"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="fileName"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> <xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"/> </xsd:complexType> </xsd:element> </xsd:all> <xsd:attributename="name"type="xsf:xdTitle"use="required"/> <xsd:attributename="overwriteAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="emailAdapter"> <xsd:complexType> <xsd:all> <xsd:elementname="to"minOccurs="0"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> <xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"/>

</xsd:complexType> </xsd:element> <xsd:elementname="cc"minOccurs="0"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> <xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="bcc"minOccurs="0"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> <xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="subject"minOccurs="0"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> <xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="intro"minOccurs="0"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="attachmentFileName"minOccurs="0"> <xsd:complexType> <xsd:attributename="value"type="xsd:string"use="required"/> <xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"/> </xsd:complexType> </xsd:element> </xsd:all> <xsd:attributename="name"type="xsf:xdTitle"use="required"/>

<xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="dataAdapters"> <xsd:complexType> <xsd:choiceminOccurs="0"maxOccurs="unbounded"> <xsd:elementref="xsf:adoAdapter"/> <xsd:elementref="xsf:webServiceAdapter"/> <xsd:elementref="xsf:xmlFileAdapter"/> <xsd:elementref="xsf:sharepointListAdapter"/> <xsd:elementref="xsf:davAdapter"/> <xsd:elementref="xsf:emailAdapter"/> <xsd:elementref="xsf:hwsAdapter"/> </xsd:choice> </xsd:complexType> </xsd:element> <!--documentSchemas--> <xsd:elementname="documentSchemas"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:documentSchema"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="documentSchema"> <xsd:complexType> <xsd:attributename="location"type="xsd:string"use="required"/> <xsd:attributename="rootSchema"type="xsf:xdYesNo"/> </xsd:complexType> </xsd:element> <!--customValidation--> <xsd:elementname="customValidation">

<xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:errorCondition"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="errorCondition"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:errorMessage"/> </xsd:sequence> <xsd:attributename="match"type="xsd:string"use="required"/> <xsd:attributename="expression"type="xsd:string"use="required"/> <xsd:attributename="expressionContext"type="xsd:string"use="optional"/> <xsd:attributename="showErrorOn"type="xsd:string"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="errorMessage"> <xsd:complexType> <xsd:simpleContent> <xsd:extensionbase="xsf:xdErrorMessage"> <xsd:attributename="type"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="modal"/> <xsd:enumerationvalue="modeless"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="shortMessage"use="required"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="127"/>

</xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:extension> </xsd:simpleContent> </xsd:complexType> </xsd:element> <!--domEventHandlers--> <xsd:elementname="domEventHandlers"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:domEventHandler"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:uniquename="domEventHandler_handlerObject_unique"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@handlerObject"/> </xsd:unique> </xsd:element> <xsd:elementname="domEventHandler"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:ruleSetAction"minOccurs="0"maxOccurs="1"/> </xsd:sequence> <xsd:attributename="dataObject"type="xsd:string"use="optional"/> <xsd:attributename="match"type="xsd:string"use="required"/> <xsd:attributename="handlerObject"type="xsd:string"use="optional"/> </xsd:complexType> <xsd:keyrefname="domEventHandler_ruleSetAction"refer="xsf:ruleset_name_key"> <xsd:selectorxpath="./xsf:ruleSetAction"/> <xsd:fieldxpath="@ruleSet"/> </xsd:keyref> </xsd:element>

<!--importParameters--> <xsd:elementname="importParameters"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:importSource"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="enabled"type="xsf:xdYesNo"use="required"/> <xsd:attributename="useScriptHandler"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="importSource"> <xsd:complexType> <xsd:attributename="name"type="xsd:string"use="required"/> <xsd:attributename="schema"type="xsf:xdFileName"use="required"/> <xsd:attributename="transform"type="xsf:xdFileName"use="required"/> <xsd:attributename="authoringOfTransform"type="xsf:xdManualAuto"use="optional"/> </xsd:complexType> </xsd:element> <!--listProperties--> <xsd:elementname="listProperties"> <xsd:complexType> <xsd:all> <xsd:elementref="xsf:fields"/> </xsd:all> </xsd:complexType> </xsd:element> <xsd:elementname="fields"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:field"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element>

<xsd:elementname="field"> <xsd:complexType> <xsd:attributename="type"type="xsd:NMTOKEN"use="required"/> <xsd:attributename="name"type="xsf:xdTitle"use="required"/> <xsd:attributename="columnName"type="xsf:xdTitle"use="required"/> <xsd:attributename="required"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="viewable"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="node"type="xsd:string"use="required"/> <xsd:attributename="maxLength"type="xsd:byte"/> <xsd:attributename="aggregation"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="sum"/> <xsd:enumerationvalue="count"/> <xsd:enumerationvalue="average"/> <xsd:enumerationvalue="min"/> <xsd:enumerationvalue="max"/> <xsd:enumerationvalue="first"/> <xsd:enumerationvalue="last"/> <xsd:enumerationvalue="merge"/> <xsd:enumerationvalue="plaintext"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType> </xsd:element> <!--submit--> <xsd:elementname="submit"> <xsd:complexType> <xsd:all> <xsd:elementname="submitAction"minOccurs="0"> <xsd:complexType> <xsd:attributename="adapter"type="xsf:xdTitle"use="required"/>

</xsd:complexType> <xsd:keyrefname="submitAdapter_name_keyref"refer="xsf:adapter_name_key"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@adapter"/> </xsd:keyref> </xsd:element> <xsd:elementref="xsf:useHttpHandler"minOccurs="0"/> <xsd:elementref="xsf:useScriptHandler"minOccurs="0"/> <xsd:elementref="xsf:ruleSetAction"minOccurs="0"/> <xsd:elementref="xsf:useQueryAdapter"minOccurs="0"/> <xsd:elementref="xsf:webServiceAdapter"minOccurs="0"/> <xsd:elementref="xsf:davAdapter"minOccurs="0"/> <xsd:elementref="xsf:emailAdapter"minOccurs="0"/> <xsd:elementname="successMessage"type="xsd:string"minOccurs="0"/> <xsd:elementname="errorMessage"type="xsd:string"minOccurs="0"/> </xsd:all> <xsd:attributename="caption"type="xsd:string"use="optional"/> <xsd:attributename="onAfterSubmit"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="close"/> <xsd:enumerationvalue="keepOpen"/> <xsd:enumerationvalue="openNew"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="showStatusDialog"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="showSignatureReminder"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="disableMenuItem"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> <xsd:keyrefname="submit_ruleSetAction"refer="xsf:ruleset_name_key"> <xsd:selectorxpath="./xsf:ruleSetAction"/> <xsd:fieldxpath="@ruleSet"/>

</xsd:keyref> </xsd:element> <xsd:elementname="useHttpHandler"> <xsd:complexType> <xsd:attributename="method"use="required"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="POST"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="href"type="xsd:anyURI"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="useScriptHandler"/> <xsd:elementname="useQueryAdapter"/> <!--onLoad--> <xsd:elementname="onLoad"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:ruleSetAction"minOccurs="1"maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <xsd:keyrefname="load_ruleSetAction"refer="xsf:ruleset_name_key"> <xsd:selectorxpath="./xsf:ruleSetAction"/> <xsd:fieldxpath="@ruleSet"/> </xsd:keyref> </xsd:element> <!--save--> <xsd:elementname="save"> <xsd:complexType> <xsd:choiceminOccurs="0"maxOccurs="1"> <xsd:elementref="xsf:useScriptHandler"/>

</xsd:choice> </xsd:complexType> </xsd:element> <!--roles--> <xsd:elementname="roles"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:role"minOccurs="1"maxOccurs="unbounded"/> <xsd:elementref="xsf:membership"minOccurs="0"maxOccurs="1"/> </xsd:sequence> <xsd:attributename="default"type="xsd:string"use="required"/> <xsd:attributename="initiator"type="xsd:string"use="optional"/> <xsd:attributename="hideStatusBarDisplay"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> <!--rolenamesmustbeunique--> <xsd:uniquename="roles_name_unique"> <xsd:selectorxpath="./xsf:role"/> <xsd:fieldxpath="@name"/> </xsd:unique> <!--fieldsmustreferenceexistingrole--> <xsd:keyname="role_name_key"> <xsd:selectorxpath="./xsf:role"/> <xsd:fieldxpath="@name"/> </xsd:key> <xsd:keyrefname="role_default"refer="xsf:role_name_key"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@default"/> </xsd:keyref> <xsd:keyrefname="role_initiator"refer="xsf:role_name_key"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@initiator"/> </xsd:keyref> <xsd:keyrefname="role_membership"refer="xsf:role_name_key">

<xsd:selectorxpath="./xsf:membership/*"/> <xsd:fieldxpath="@memberOf"/> </xsd:keyref> </xsd:element> <xsd:elementname="role"> <xsd:complexType> <xsd:attributename="name"type="xsf:xdRoleName"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="membership"> <xsd:complexType> <xsd:choiceminOccurs="1"maxOccurs="unbounded"> <xsd:elementref="xsf:getUserNameFromData"/> <xsd:elementref="xsf:userName"/> <xsd:elementref="xsf:group"/> </xsd:choice> </xsd:complexType> </xsd:element> <xsd:elementname="getUserNameFromData"> <xsd:complexType> <xsd:attributename="dataObject"type="xsd:string"use="optional"/> <xsd:attributename="select"type="xsd:string"use="required"/> <xsd:attributename="memberOf"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="userName"> <xsd:complexType> <xsd:attributename="name"type="xsd:string"use="required"/> <xsd:attributename="memberOf"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="group"> <xsd:complexType>

<xsd:attributename="name"type="xsd:string"use="required"/> <xsd:attributename="memberOf"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <!--hwsWorkflow--> <xsd:elementname="hwsWorkflow"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:location"minOccurs="1"maxOccurs="1"/> <xsd:elementref="xsf:allowedActions"minOccurs="1"maxOccurs="1"/> <xsd:elementref="xsf:allowedTasks"minOccurs="0"maxOccurs="1"/> </xsd:sequence> <xsd:attributename="taskpaneVisible"type="xsf:xdYesNo"/> </xsd:complexType> <xsd:uniquename="hws_actiontask_name"> <xsd:selectorxpath="./xsf:allowedActions/xsf:action|./xsf:allowedTasks/xsf:task"/> <xsd:fieldxpath="@name"/> </xsd:unique> </xsd:element> <!--location--> <xsd:elementname="location"> <xsd:complexType> <xsd:attributename="url"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <!--allowedActions--> <xsd:elementname="allowedActions"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:action"minOccurs="1"maxOccurs="20"/> </xsd:sequence> </xsd:complexType> <xsd:uniquename="hws_actionTypeID_unique">

<xsd:selectorxpath="./xsf:action"/> <xsd:fieldxpath="@actionTypeID"/> </xsd:unique> </xsd:element> <!--action--> <xsd:elementname="action"> <xsd:complexType> <xsd:attributename="name"type="xsf:xdHWSname"use="required"/> <xsd:attributename="actionTypeID"type="xsd:string"use="required"/> <xsd:attributename="canInitiateWorkflow"type="xsf:xdYesNo"use="required"/> <xsd:attributename="caption"type="xsf:xdHWSCaption"use="optional"/> </xsd:complexType> </xsd:element> <!--allowedTasks--> <xsd:elementname="allowedTasks"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:task"minOccurs="1"maxOccurs="20"/> </xsd:sequence> </xsd:complexType> <xsd:uniquename="hws_taskID_unique"> <xsd:selectorxpath="./xsf:task"/> <xsd:fieldxpath="@taskTypeID"/> </xsd:unique> </xsd:element> <!--task--> <xsd:elementname="task"> <xsd:complexType> <xsd:attributename="name"type="xsf:xdHWSname"use="required"/> <xsd:attributename="taskTypeID"type="xsd:string"use="required"/> <xsd:attributename="caption"type="xsf:xdHWSCaption"use="optional"/> </xsd:complexType> </xsd:element>

<!--fileNew--> <xsd:elementname="fileNew"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:initialXmlDocument"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="initialXmlDocument"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:customCategory"minOccurs="0"/> </xsd:sequence> <xsd:attributename="caption"type="xsf:xdTitle"use="required"/> <xsd:attributename="href"type="xsf:xdFileName"use="required"/> </xsd:complexType> </xsd:element> <!--customCategory--> <xsd:elementname="customCategory"> <xsd:complexType> <xsd:attributename="name"type="xsf:xdTitle"use="required"/> </xsd:complexType> </xsd:element> <!--package--> <xsd:elementname="package"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:files"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="files"> <xsd:complexType>

<xsd:sequence> <xsd:elementref="xsf:file"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="file"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:fileProperties"minOccurs="0"maxOccurs="1"/> </xsd:sequence> <xsd:attributename="name"type="xsf:xdFileName"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="fileProperties"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:property"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="property"> <xsd:complexType> <xsd:attributename="name"type="xsd:string"use="required"/> <xsd:attributename="value"type="xsd:string"use="required"/> <xsd:attributename="type"type="xsd:QName"use="required"/> </xsd:complexType> </xsd:element> <!--permissions--> <xsd:elementname="permissions"> <xsd:complexType> <xsd:choiceminOccurs="0"maxOccurs="unbounded"> <xsd:elementref="xsf:allowedControl"/> </xsd:choice>

</xsd:complexType> </xsd:element> <xsd:elementname="allowedControl"> <xsd:complexType> <xsd:attributename="cabFile"type="xsd:string"use="optional"/> <xsd:attributename="clsid"type="xsd:string"use="required"/> <xsd:attributename="version"type="xsd:string"use="optional"/> </xsd:complexType> </xsd:element> <!--ViewandContext-DrivenEditingdefinitions--> <!--ExternalViews--> <xsd:elementname="externalViews"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:externalView"minOccurs="1"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="default"type="xsd:string"/> </xsd:complexType> <xsd:uniquename="externalViews_name_unique"> <xsd:selectorxpath="./xsf:externalView"/> <xsd:fieldxpath="@default"/> </xsd:unique> <xsd:keyrefname="external_views_printView"refer="xsf:externalView_name_key"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@default"/> </xsd:keyref> </xsd:element> <xsd:elementname="externalView"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:mainpane"/> </xsd:sequence> <xsd:attributename="target"type="xsd:string"/>

<xsd:attributename="name"type="xsf:xdViewName"use="required"/> <xsd:attributename="designMode"type="xsf:xdDesignMode"/> </xsd:complexType> </xsd:element> <!--attributeData--> <xsd:elementname="attributeData"> <xsd:complexType> <xsd:attributename="attribute"type="xsd:string"use="required"/> <xsd:attributename="value"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <!--button--> <xsd:elementname="button"> <xsd:complexType> <xsd:attributename="caption"type="xsf:xdTitle"/> <xsd:attributename="icon"type="xsd:string"/> <xsd:attributename="tooltip"type="xsf:xdTitle"/> <xsd:attributename="name"type="xsd:NMTOKEN"/> <xsd:attributename="xmlToEdit"type="xsd:NMTOKEN"/> <xsd:attributename="action"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="xCollection::insert"/> <xsd:enumerationvalue="xCollection::insertBefore"/> <xsd:enumerationvalue="xCollection::insertAfter"/> <xsd:enumerationvalue="xCollection::remove"/> <xsd:enumerationvalue="xCollection::refreshFilter"/> <xsd:enumerationvalue="xCollection::removeAll"/> <xsd:enumerationvalue="xOptional::insert"/> <xsd:enumerationvalue="xOptional::remove"/> <xsd:enumerationvalue="xReplace::replace"/> <xsd:enumerationvalue="xFileAttachment::attach"/> <xsd:enumerationvalue="xFileAttachment::open"/>

<xsd:enumerationvalue="xFileAttachment::saveAs"/> <xsd:enumerationvalue="xFileAttachment::remove"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="showIf"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="always"/> <xsd:enumerationvalue="enabled"/> <xsd:enumerationvalue="immediate"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType> </xsd:element> <!--chooseFragment--> <xsd:elementname="chooseFragment"> <xsd:complexTypemixed="true"> <xsd:sequence> <xsd:anyminOccurs="0"maxOccurs="unbounded"processContents="skip"/> </xsd:sequence> <xsd:attributename="parent"type="xsd:string"/> <xsd:attributename="followingSiblings"type="xsd:string"use="optional"/> <xsd:attributename="innerFragment"type="xsd:string"use="optional"/> </xsd:complexType> </xsd:element> <!--editWith--> <xsd:elementname="editWith"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:masterDetail"minOccurs="0"maxOccurs="1"/> <xsd:elementref="xsf:fragmentToInsert"minOccurs="0"maxOccurs="1"/>

</xsd:sequence> <xsd:attributename="component"use="required"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="xCollection"/> <xsd:enumerationvalue="xOptional"/> <xsd:enumerationvalue="xReplace"/> <xsd:enumerationvalue="xTextList"/> <xsd:enumerationvalue="xField"/> <xsd:enumerationvalue="xImage"/> <xsd:enumerationvalue="xFileAttachment"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="caption"type="xsf:xdTitle"use="optional"/> <xsd:attributename="autoComplete"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="proofing"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="type"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="plain"/> <xsd:enumerationvalue="formatted"/> <xsd:enumerationvalue="plainMultiline"/> <xsd:enumerationvalue="formattedMultiline"/> <xsd:enumerationvalue="rich"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="useFilter"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:enumerationvalue="yes"/> <xsd:enumerationvalue="no"/>

</xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="widgetIcon"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:enumerationvalue="standard"/> <xsd:enumerationvalue="filter"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="filterDependency"type="xsd:string"use="optional"/> <xsd:attributename="field"type="xsd:string"use="optional"/> <xsd:attributename="removeAncestors"type="xsd:nonNegativeInteger"use="optional"/> <xsd:attributename="maxLength"use="optional"> <xsd:simpleType> <xsd:restrictionbase="xsd:integer"> <xsd:minInclusivevalue="-1"/> <xsd:maxInclusivevalue="9999"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="allowedFileTypes"type="xsd:string"use="optional"/> <xsd:anyAttributenamespace="http://schemas.microsoft.com/office/infopath/2003"processContents="skip"/> </xsd:complexType> </xsd:element> <!--unboundControls--> <xsd:elementname="unboundControls"> <xsd:complexType> <xsd:sequence> <!--button--> <xsd:elementname="button"minOccurs="0"maxOccurs="unbounded"> <xsd:complexType>

<xsd:sequence> <xsd:elementref="xsf:ruleSetAction"minOccurs="0"maxOccurs="1"/> </xsd:sequence> <xsd:attributename="name"use="required"> <xsd:simpleType> <!--typeofnameisnonqualifiedname,butNCNamealsoaccepts'.'and'-', sothesecharactersare disabledbypatternrestriction--> <xsd:restrictionbase="xsd:NCName"> <xsd:patternvalue="[^\.\^-]*"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType> <xsd:keyrefname="button_ruleSetAction"refer="xsf:ruleset_name_key"> <xsd:selectorxpath="./xsf:ruleSetAction"/> <xsd:fieldxpath="@ruleSet"/> </xsd:keyref> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <!--editing--> <xsd:elementname="editing"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:xmlToEdit"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <!--MasterDetail--> <xsd:elementname="masterDetail"> <xsd:complexType> <xsd:attributename="master"type="xsd:string"/>

<xsd:attributename="masterViewContext"type="xsd:string"/> <xsd:attributename="masterKey"type="xsd:string"/> <xsd:attributename="detailKey"type="xsd:string"/> </xsd:complexType> </xsd:element> <!--fragmentToInsert--> <xsd:elementname="fragmentToInsert"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:chooseFragment"minOccurs="1"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <!--mainpane--> <xsd:elementname="mainpane"> <xsd:complexType> <xsd:attributename="transform"type="xsf:xdFileName"use="required"/> </xsd:complexType> </xsd:element> <!--printSettings--> <xsd:elementname="printSettings"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:header"minOccurs="0"maxOccurs="1"/> <xsd:elementref="xsf:footer"minOccurs="0"maxOccurs="1"/> </xsd:sequence> <xsd:attributename="orientation"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="portrait"/> <xsd:enumerationvalue="landscape"/> </xsd:restriction> </xsd:simpleType>

</xsd:attribute> <xsd:attributename="header"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="footer"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="marginUnitsType"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="in"/> <xsd:enumerationvalue="cm"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="rightMargin"> <xsd:simpleType> <xsd:restrictionbase="xsd:float"> <xsd:minInclusivevalue="0"/> <xsd:maxInclusivevalue="100"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="leftMargin"> <xsd:simpleType>

<xsd:restrictionbase="xsd:float"> <xsd:minInclusivevalue="0"/> <xsd:maxInclusivevalue="100"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="topMargin"> <xsd:simpleType> <xsd:restrictionbase="xsd:float"> <xsd:minInclusivevalue="0"/> <xsd:maxInclusivevalue="100"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="bottomMargin"> <xsd:simpleType> <xsd:restrictionbase="xsd:float"> <xsd:minInclusivevalue="0"/> <xsd:maxInclusivevalue="100"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="printerName"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="paperSize"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/>

</xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="paperSource"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="copies"> <xsd:simpleType> <xsd:restrictionbase="xsd:integer"> <xsd:minInclusivevalue="1"/> <xsd:maxInclusivevalue="9999"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="collate"type="xsf:xdYesNo"/> <xsd:attributename="pageRangeStart"> <xsd:simpleType> <xsd:restrictionbase="xsd:integer"> <xsd:minInclusivevalue="1"/> <xsd:maxInclusivevalue="32000"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> <xsd:attributename="pageRangeEnd"> <xsd:simpleType> <xsd:restrictionbase="xsd:integer"> <xsd:minInclusivevalue="1"/> <xsd:maxInclusivevalue="32000"/> </xsd:restriction>

</xsd:simpleType> </xsd:attribute> <xsd:attributename="printerSpecificSettings"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="255"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType> </xsd:element> <xsd:elementname="header"> <xsd:complexTypemixed="true"> <xsd:sequence> <xsd:anyminOccurs="0"maxOccurs="unbounded"processContents="skip"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="footer"> <xsd:complexTypemixed="true"> <xsd:sequence> <xsd:anyminOccurs="0"maxOccurs="unbounded"processContents="skip"/> </xsd:sequence> </xsd:complexType> </xsd:element> <!--toolbar--> <xsd:elementname="toolbar"> <xsd:complexType> <xsd:sequence> <xsd:groupref="xsf:UIItem"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="name"type="xsf:xdTitle"use="required"/> <xsd:attributename="caption"type="xsf:xdTitle"use="required"/>

</xsd:complexType> </xsd:element> <!--menu--> <xsd:elementname="menu"> <xsd:complexType> <xsd:sequence> <xsd:groupref="xsf:UIItem"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="caption"type="xsf:xdTitle"use="required"/> </xsd:complexType> </xsd:element> <!--menuArea--> <xsd:elementname="menuArea"> <xsd:complexType> <xsd:sequence> <xsd:groupref="xsf:UIItem"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="name"use="required"> <xsd:simpleType> <xsd:restrictionbase="xsd:NMTOKEN"> <xsd:enumerationvalue="msoFileMenu"/> <xsd:enumerationvalue="msoEditMenu"/> <xsd:enumerationvalue="msoInsertMenu"/> <xsd:enumerationvalue="msoViewMenu"/> <xsd:enumerationvalue="msoFormatMenu"/> <xsd:enumerationvalue="msoToolsMenu"/> <xsd:enumerationvalue="msoTableMenu"/> <xsd:enumerationvalue="msoHelpMenu"/> <xsd:enumerationvalue="msoStructuralEditingContextMenu"/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType>

</xsd:element> <!--UIContainer--> <xsd:groupname="UIContainer"> <xsd:choice> <xsd:elementref="xsf:toolbar"/> <xsd:elementref="xsf:menu"/> <xsd:elementref="xsf:menuArea"/> </xsd:choice> </xsd:group> <!--UIItem--> <xsd:groupname="UIItem"> <xsd:choice> <xsd:elementref="xsf:button"/> <xsd:elementref="xsf:menu"/> </xsd:choice> </xsd:group> <!--taskpane--> <xsd:elementname="taskpane"> <xsd:complexType> <xsd:attributename="caption"type="xsd:string"use="required"/> <xsd:attributename="href"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <!--views--> <xsd:elementname="views"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:view"minOccurs="1"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="default"type="xsd:string"/> </xsd:complexType> <xsd:uniquename="views_name_unique"> <xsd:selectorxpath="./xsf:view"/>

<xsd:fieldxpath="@name"/> </xsd:unique> <xsd:keyrefname="view_printView"refer="xsf:view_or_externalView_name_key"> <xsd:selectorxpath="./xsf:view"/> <xsd:fieldxpath="@printView"/> </xsd:keyref> <xsd:keyrefname="views_default"refer="xsf:view_name_key"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@default"/> </xsd:keyref> </xsd:element> <!--ViewContent--> <xsd:groupname="ViewContent"> <xsd:choice> <xsd:elementref="xsf:editing"minOccurs="0"/> <xsd:elementref="xsf:mainpane"minOccurs="0"/> <xsd:elementref="xsf:printSettings"minOccurs="0"/> <xsd:groupref="xsf:UIContainer"minOccurs="0"maxOccurs="unbounded"/> <xsd:elementref="xsf:unboundControls"minOccurs="0"/> </xsd:choice> </xsd:group> <!--view--> <xsd:elementname="view"> <xsd:complexType> <xsd:groupref="xsf:ViewContent"minOccurs="0"maxOccurs="unbounded"/> <xsd:attributename="caption"type="xsf:xdViewName"/> <xsd:attributename="name"type="xsf:xdViewName"use="required"/> <xsd:attributename="showMenuItem"type="xsf:xdYesNo"use="optional"/> <xsd:attributename="printView"type="xsd:string"/> <xsd:attributename="designMode"type="xsf:xdDesignMode"/> </xsd:complexType> <xsd:uniquename="toolbar_name_unique"> <xsd:selectorxpath="./xsf:toolbar"/>

<xsd:fieldxpath="@name"/> </xsd:unique> <xsd:uniquename="menuArea_name_unique"> <xsd:selectorxpath="./xsf:menuArea"/> <xsd:fieldxpath="@name"/> </xsd:unique> <xsd:uniquename="xmlToEdit_name_unique"> <xsd:selectorxpath="./xsf:editing/xsf:xmlToEdit"/> <xsd:fieldxpath="@name"/> </xsd:unique> <xsd:keyname="xmlToEdit_name_key"> <xsd:selectorxpath="./xsf:editing/xsf:xmlToEdit"/> <xsd:fieldxpath="@name"/> </xsd:key> <xsd:keyrefname="button_xmlToEdit_reference"refer="xsf:xmlToEdit_name_key"> <xsd:selectorxpath="./xsf:menuArea/xsf:button|./xsf:menu/xsf:button|./xsf:toolbar/xsf:button"/> <xsd:fieldxpath="@xmlToEdit"/> </xsd:keyref> </xsd:element> <!--xmlToEdit--> <xsd:elementname="xmlToEdit"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:editWith"minOccurs="0"maxOccurs="1"/> </xsd:sequence> <xsd:attributename="name"type="xsd:NMTOKEN"use="required"/> <xsd:attributename="item"type="xsd:string"use="required"/> <xsd:attributename="container"type="xsd:string"/> <xsd:attributename="viewContext"> <xsd:simpleType> <xsd:restrictionbase="xsd:string"> <xsd:patternvalue="((\.|\#|[a-zA-Z0-9_])[a-zA-Z0-9_]*)(\s((\.|\#|[a-zA-Z0-9_])[a-zA-Z0-9_]*))*"/> </xsd:restriction>

</xsd:simpleType> </xsd:attribute> </xsd:complexType> </xsd:element> <!--DigitalSignatures--> <xsd:elementname="documentSignatures"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:signedDataBlock"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="signatureLocation"type="xsd:string"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="signedDataBlock"> <xsd:complexType> <xsd:sequence> <xsd:elementname="message"type="xsf:xdSignedDataBlockMessage"minOccurs="0"/> </xsd:sequence> <xsd:attributename="name"type="xsf:xdSignedDataBlockName"use="required"/> <xsd:attributename="data"type="xsd:string"use="required"/> <xsd:attributename="signatureLocation"type="xsd:string"use="required"/> <xsd:attributename="mode"type="xsf:xdSignatureRelationEnum"use="required"/> </xsd:complexType> <xsd:uniquename="signedDataBlock_name_unique"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@name"/> </xsd:unique> </xsd:element> <!--VersionUpgrade--> <xsd:elementname="documentVersionUpgrade"> <xsd:complexType> <xsd:choice> <xsd:elementref="xsf:useScriptHandler"/>

<xsd:elementref="xsf:useTransform"/> </xsd:choice> </xsd:complexType> </xsd:element> <xsd:elementname="useTransform"> <xsd:complexType> <xsd:attributename="transform"use="required"> <xsd:simpleType> <xsd:unionmemberTypes="xsf:xdFileNamexsf:xdEmptyString"/> </xsd:simpleType> </xsd:attribute> <xsd:attributename="minVersionToUpgrade"type="xsf:xdSolutionVersion"use="required"/> <xsd:attributename="maxVersionToUpgrade"type="xsf:xdSolutionVersion"/> </xsd:complexType> </xsd:element> <!--XSFExtensions--> <xsd:elementname="extensions"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:extension"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:elementname="extension"> <xsd:complexTypemixed="true"> <xsd:sequence> <xsd:anyminOccurs="0"maxOccurs="unbounded"processContents="skip"/> </xsd:sequence> <xsd:attributename="name"type="xsd:NMTOKEN"use="required"/> <xsd:anyAttributeprocessContents="skip"/> </xsd:complexType> </xsd:element> <!--Rules-->

<xsd:elementname="ruleSetAction"> <xsd:complexType> <xsd:attributename="ruleSet"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="rule"> <xsd:complexType> <xsd:sequence> <xsd:choiceminOccurs="0"maxOccurs="unbounded"> <xsd:elementref="xsf:dialogBoxMessageAction"/> <xsd:elementref="xsf:dialogBoxExpressionAction"/> <xsd:elementref="xsf:switchViewAction"/> <xsd:elementref="xsf:assignmentAction"/> <xsd:elementref="xsf:queryAction"/> <xsd:elementname="submitAction"> <xsd:complexType> <xsd:attributename="adapter"type="xsf:xdTitle"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementref="xsf:openNewDocumentAction"/> <xsd:elementref="xsf:closeDocumentAction"/> </xsd:choice> <xsd:elementname="exitRuleSet"minOccurs="0"> <xsd:complexType/> </xsd:element> </xsd:sequence> <xsd:attributename="caption"type="xsd:string"use="required"/> <xsd:attributename="condition"type="xsd:string"use="optional"/> <xsd:attributename="isEnabled"type="xsf:xdYesNo"use="optional"default="yes"/> </xsd:complexType> </xsd:element> <xsd:elementname="dialogBoxMessageAction"> <xsd:simpleType>

<xsd:restrictionbase="xsd:string"> <xsd:maxLengthvalue="1024"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:elementname="dialogBoxExpressionAction"type="xsd:string"/> <xsd:elementname="switchViewAction"> <xsd:complexType> <xsd:attributename="view"type="xsf:xdViewName"use="required"/> </xsd:complexType> <xsd:keyrefname="switchViewAction_view_keyref"refer="xsf:view_name_key"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@view"/> </xsd:keyref> </xsd:element> <xsd:elementname="assignmentAction"> <xsd:complexType> <xsd:attributename="targetField"type="xsd:string"use="required"/> <xsd:attributename="expression"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="queryAction"> <xsd:complexType> <xsd:attributename="adapter"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="openNewDocumentAction"> <xsd:complexType> <xsd:attributename="solutionURI"type="xsd:anyURI"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="closeDocumentAction"> <xsd:complexType>

<xsd:attributename="promptToSaveChanges"type="xsf:xdYesNo"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="ruleSet"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:rule"minOccurs="1"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="name"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element> <xsd:elementname="ruleSets"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:ruleSet"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:uniquename="ruleSets_name_unique"> <xsd:selectorxpath="./xsf:ruleSet"/> <xsd:fieldxpath="@name"/> </xsd:unique> </xsd:element> <!--DeclarativeCalculations--> <xsd:elementname="calculations"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:calculatedField"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="treatBlankValueAsZero"type="xsf:xdYesNo"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="calculatedField"> <xsd:complexType>

<xsd:attributename="target"type="xsd:string"use="required"/> <xsd:attributename="expression"type="xsd:string"use="required"/> <xsd:attributename="refresh"type="xsd:string"use="required"/> </xsd:complexType> </xsd:element></xsd:schema>

ShowAll

xsfNamespace

TheMicrosoftOfficeInfoPath2003formdefinition(.xsf)fileconformstoanXSDschemadefinition,andusesacorrespondingnamespace.

NamespaceURI

xmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"

RemarksAlloftheelementswithinthe.xsffilearenamespacequalifiedusingthexsfnamespace.

ShowAll

xdDesignModeType

Specifieswhetheraview(*.xsl)filecanbeopenedindesignmodeinMicrosoftOfficeInfoPath2003.

Typexsd:NMTOKEN

Facets

Name Descriptionenumeration normalenumeration protected

RemarksThexdDesignModetypeisusedforattributesintheformdefinitionfile(.xsf)tospecifywhetheraviewcanbeopenedindesignmode("normal"),orwhethertheviewisnotpermittedtobeopenedindesignmode("protected").

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingexampleisthedeclarationofthexdDesignModetype:

<xsd:simpleTypename="xdDesignMode"><xsd:restrictionbase="xsd:NMTOKEN"><xsd:enumerationvalue="normal"/><xsd:enumerationvalue="protected"/></xsd:restriction></xsd:simpleType>

ShowAll

xdEmptyStringType

Specifiesanemptystring.

Type

xsd:string

Facets

Name DescriptionmaxLength 0

RemarksThexdEmptyStringtypeisusedforattributesintheformdefinition(.xsf)filethatspecifyanemptystring.

ExampleThefollowingexampleisthedeclarationofthexdEmptyStringtype:

<xsd:simpleTypename="xdEmptyString"><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="0"/></xsd:restriction></xsd:simpleType>

xdEnabledDisabledType

Specifieswhetherafeatureisenabledordisabled.

Typexsd:NMTOKEN

Facets

Name Descriptionenumeration enabledenumeration disabled

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingexampleisthedeclarationofthexdEnabledDisabledtype:

<xsd:simpleTypename="xdEnabledDisabled"><xsd:restrictionbase="xsd:NMTOKEN"><xsd:enumerationvalue="enabled"/><xsd:enumerationvalue="disabled"/></xsd:restriction></xsd:simpleType>

ShowAll

xdErrorMessageType

Specifiesanerrormessage.

Type

xsd:string

Facets

Name DescriptionmaxLength 1023

RemarksThexdErrorMessagetypeisusedforattributesintheformdefinition(.xsf)filethatspecifyanerrormessagenogreaterthan1023charactersinlength.

ExampleThefollowingexampleisthedeclarationofthexdErrorMessagetype:

<xsd:simpleTypename="xdErrorMessage"><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="1023"/></xsd:restriction></xsd:simpleType>

ShowAll

xdExpressionLiteralsimpleType

SpecifiesatypeforidentifyingwhetheravalueshouldbeinterpretedasaliteralvalueoranXPathexpressionthatreturnsavalue.

Typexsd:NMTOKEN

RemarksThexdExpressionLiteraltypeisusedforthevalueTypeattributeinthedavAdapterandemailAdapterelements.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingexampleisthedeclarationofthexdExpressionLiteraltype:

<xsd:simpleTypename="xdExpressionLiteral"><xsd:restrictionbase="xsd:NMTOKEN"><xsd:enumerationvalue="expression"/><xsd:enumerationvalue="literal"/></xsd:restriction></xsd:simpleType>

ShowAll

xdFileNameType

Specifiesthenameofafile.

Type

xsd:string

Facets

Name DescriptionminLength 1maxLength 64

RemarksThexdFileNametypeisusedforattributesintheformdefinition(.xsf)filethatspecifyafilenamethatcanbefrom1to64charactersinlength.

ExampleThefollowingexampleisthedeclarationofthexdFileNametype:

<xsd:simpleTypename="xdFileName"><xsd:restrictionbase="xsd:string"><xsd:minLengthvalue="1"/><xsd:maxLengthvalue="64"/></xsd:restriction></xsd:simpleType>

xdHWSCaptionsimpleType

SpecifiesatypeforthecaptionoftheMicrosoftBiztalkServer2004HWS(HumanWorkflowServices)actionortaskelement.

Typexsd:string

Facets

Name DescriptionmaxLength 255charactersminLength 1character

RemarksThelengthofthecaptioncannotbelessthanonecharacterorgreaterthan255characters.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingexampleisthedeclarationofthexdHWSCaptiontype:

<xsd:simpleTypename="xdHWSCaption"><xsd:restrictionbase="xsd:string"><xsd:minLengthvalue="1"/><xsd:maxLengthvalue="255"/></xsd:restriction></xsd:simpleType>

xdHWSnamesimpleType

SpecifiesatypeforauniquenameoftheMicrosoftBiztalkServer2004HWS(HumanWorkflowServices)actionortaskelementasspecifiedbytheHWSworkflowdesigner.

Typexsd:NCName

Facets

Name Descriptionpattern [^-^\.^\\^\[^\]^\|^\+^?^\*^@^\{^\}^\(^\)^&gt;^&lt;^=^;^,]*

RemarksThenamecannotcontainthefollowingcharacters:

\/"[]:<>+=;,?*@

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingexampleisthedeclarationofthexdHWSnametype:

<xsd:simpleTypename="xdHWSname"><xsd:restrictionbase="xsd:NCName"><xsd:patternvalue="[^-^\.^\\^\[^\]^\|^\+^?^\*^@^\{^\}^\(^\)^&gt;^&lt;^=^;^,]*"/></xsd:restriction></xsd:simpleType>

ShowAll

xdManualAutoType

Specifiesa"manual"or"automatic"value.

Typexsd:NMTOKEN

Facets

Name Descriptionenumeration manualenumeration automatic

RemarksThexdTrustManualAutotypeisusedforattributesintheformdefinition(.xsf)filethatrequirea"manual"or"automatic"value.Thedefaultvalueis"manual".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingexampleisthedeclarationofthexdManualAutotype:

<xsd:simpleTypename="xdManualAuto"><xsd:restrictionbase="xsd:NMTOKEN"><xsd:enumerationvalue="manual"/><xsd:enumerationvalue="automatic"/></xsd:restriction></xsd:simpleType>

xdRoleNameType

Specifiestherolename.

Typexsf:xdViewName

RemarksRolenamehasrestrictionsonvaluesitcancontain.Theserestrictionsarethesameastheconstrainingfacetsofthexsf:xdViewNametype.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingexampleisthedeclarationofthexdRoleNametype:

<xsd:simpleTypename="xdRoleName"><xsd:restrictionbase="xsf:xdViewName"></xsd:restriction></xsd:simpleType>

ShowAll

xdScriptLanguageType

Specifiesthenameofascriptinglanguage.

Type

xsd:NMTOKEN

Facets

Name Descriptionpattern ((([Jj][Aa][Vv][Aa])|([Jj])|([Vv][Bb]))([Ss][Cc][Rr][Ii][Pp][Tt]))

RemarksThexdScriptLanguagetypeisusedforattributesintheformdefinition(.xsf)filethatspecifythenameofascriptinglanguage.

ExampleThefollowingexampleisthedeclarationofthexdScriptLanguagetype:

<xsd:simpleTypename="xdScriptLanguage"><xsd:restrictionbase="xsd:NMTOKEN"><xsd:patternvalue="((([Jj][Aa][Vv][Aa])|([Jj])|([Vv][Bb]))([Ss][Cc][Rr][Ii][Pp][Tt]))"/></xsd:restriction></xsd:simpleType>

xdSignatureRelationEnumType

ContainsthesignaturerelationenumerationforthesignedDataBlockelement.

Typexsd:string

Facets

Name Descriptioncountersign Specifiesthateachsignaturesignstheprevioussignaturein

thesignedDataBlock.cosign SpecifiesthateachsignatureinthesignedDataBlockis

independent.single Specifiesthatonlyonesignatureisallowedforthe

signedDataBlock.

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingexampleisthedeclarationofthexdSignatureRelationEnumtype:

<xsd:simpleTypename="xdSignatureRelationEnum"><xsd:restrictionbase="xsd:string"><xsd:enumerationvalue="countersign"/><xsd:enumerationvalue="cosign"/><xsd:enumerationvalue="single"/></xsd:restriction></xsd:simpleType>

xdSignedDataBlockMessageType

Definesthemaximumstringlengthforthesignaturesconfirmationmessageelement.

Typexsd:simpleType

Facets

Name DescriptionmaxLength 255characters

RemarksThesignatureconfirmationmessagehasamaximumlengthof255characters.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingexampleisthedeclarationofthexdSignedDataBlockMessagetype:

<xsd:simpleTypename="xdSignedDataBlockMessage"><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="255"/></xsd:restriction></xsd:simpleType>

xdSignedDataBlockNameType

DefinesthemaximumstringlengthforthenameattributeofthesignedDataBlockelement.

Typexsd:simpleType

Facets

Name DescriptionmaxLength 255charactersminLength 1character

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingexampleisthedeclarationofthexdSignedDataBlockNametype:

<xsd:simpleTypename="xdSignedDataBlockName"><xsd:restrictionbase="xsd:ID"><xsd:minLengthvalue="1"/><xsd:maxLengthvalue="255"/></xsd:restriction></xsd:simpleType>

ShowAll

xdSolutionVersionType

Specifiesaversionnumber.

Type

xsd:string

Facets

Name Descriptionpattern (([0-9]{1,4}.){3}[0-9]{1,4})

RemarksThexdSolutionVersiontypeisusedforattributesintheformdefinition(.xsf)filethatspecifyaversionnumber.

ExampleThefollowingexampleisthedeclarationofthexdSolutionVersiontype:

<xsd:simpleTypename="xdSolutionVersion"><xsd:restrictionbase="xsd:string"><xsd:patternvalue="(([0-9]{1,4}.){3}[0-9]{1,4})"/></xsd:restriction></xsd:simpleType>

ShowAll

xdTitleType

Specifiesatitlestring.

Type

xsd:string

Facets

Name DescriptionminLength 1maxLength 255pattern ([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*

([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

RemarksThexdTitletypeisusedforattributesintheformdefinition(.xsf)filethatareastringofcharactersthatcanbefrom1to255charactersinlength,andthatfollowaprescribedpattern.

ExampleThefollowingexampleisthedeclarationofthexdTitletype:

<xsd:simpleTypename="xdTitle"><xsd:restrictionbase="xsd:string"><xsd:minLengthvalue="1"/><xsd:maxLengthvalue="255"/><xsd:patternvalue="([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?"/></xsd:restriction></xsd:simpleType>

ShowAll

xdTrustLevelType

Specifiesa"restricted"or"domain"value.

Typexsd:string

Facets

Name Descriptionenumeration restrictedenumeration domain

RemarksThexdTrustLeveltypeisusedforattributesintheformdefinition(.xsf)filethatrequirea"restricted"or"domain"value.Thedefaultvalueis"domain".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingexampleisthedeclarationofthexdTrustLeveltype:

<xsd:simpleTypename="xdTrustLevel"><xsd:restrictionbase="xsd:string"><xsd:enumerationvalue="restricted"/><xsd:enumerationvalue="domain"/></xsd:restriction></xsd:simpleType>

ShowAll

xdViewNameType

Specifiesaviewname.

Type

xsd:string

Facets

Name DescriptionminLength 1maxLength 255pattern ([^\p{Z}\p{C}/\\#&amp;&quot;&gt;&lt;])

(([^\p{Zl}\p{Zp}\p{C}/\\#&amp;&quot;&gt;&lt;])*([^\p{Z}\p{C}/\\#&amp;&quot;&gt;&lt;]))?

RemarksThexdViewNametypeisusedforattributesintheformdefinition(.xsf)filethatareastringofcharactersthatcanbefrom1to255charactersinlength,andthatfollowaprescribedpattern.

ExampleThefollowingexampleisthedeclarationofthexdViewNametype:

<xsd:simpleTypename="xdViewName"><xsd:restrictionbase="xsd:string"><xsd:minLengthvalue="1"/><xsd:maxLengthvalue="255"/><xsd:patternvalue="([^\p{Z}\p{C}/\\#&amp;&quot;&gt;&lt;])(([^\p{Zl}\p{Zp}\p{C}/\\#&amp;&quot;&gt;&lt;])*([^\p{Z}\p{C}/\\#&amp;&quot;&gt;&lt;]))?"/></xsd:restriction></xsd:simpleType>

ShowAll

xdYesNoType

Specifiesayesornovalue.

Type

xsd:NMTOKEN

Facets

Name Descriptionenumeration yesenumeration no

RemarksThexdYesNotypeisusedforattributesintheformdefinition(.xsf)filethatrequireayesornovalue.

ExampleThefollowingexampleisthedeclarationofthexdYesNotype:

<xsd:simpleTypename="xdYesNo"><xsd:restrictionbase="xsd:NMTOKEN"><xsd:enumerationvalue="yes"/><xsd:enumerationvalue="no"/></xsd:restriction></xsd:simpleType>

ShowAll

UIContainerGroup

Representsacollectionofuserinterface(UI)elements.

RemarksTheUIContainergroupisusedasanelementoftheViewContentgroup.

ExampleThefollowingexampleistheXMLSchemadeclarationoftheUIContainergroup:

<xsd:groupname="UIContainer"><xsd:choice><xsd:elementref="xsf:toolbar"/><xsd:elementref="xsf:menu"/><xsd:elementref="xsf:menuArea"/></xsd:choice></xsd:group>

ShowAll

UIItemGroup

Representsacollectionofuserinterface(UI)elements.

RemarksTheUIItemgroupisusedasanelementofthetoolbar,menu,andmenuAreaelements.

ExampleThefollowingexampleistheXMLSchemadeclarationoftheUIItemgroup:

<xsd:groupname="UIItem"><xsd:choice><xsd:elementref="xsf:button"/><xsd:elementref="xsf:menu"/></xsd:choice></xsd:group>

ShowAll

ViewContentGroup

Representsacollectionofelementsusedinaview.

RemarksTheViewContentgroupisusedasanelementoftheviewelement.

ExampleThefollowingexampleistheXMLSchemadeclarationoftheViewContentgroup:

<xsd:groupname="ViewContent"><xsd:choice><xsd:elementref="xsf:editing"minOccurs="0"/><xsd:elementref="xsf:mainpane"minOccurs="0"/><xsd:elementref="xsf:printSettings"minOccurs="0"/><xsd:groupref="xsf:UIContainer"minOccurs="0"maxOccurs="unbounded"/><xsd:elementref="xsf:unboundControls"minOccurs="0"/></xsd:choice></xsd:group>

ShowAll

actionElement

ContainstheMicrosoftBiztalkServer2004HumanWorkflowServices(HWS)actioninformationthathasbeenenabledfortheform.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

name xsf:xdHWSname Yes TheuniquenameoftheactionasspecifiedbytheHWSworkflowdesigner,andusedfortheonClickeventofthebuttonintheWorkflowtaskpane.

Cannotcontainthefollowingcharacters:

\/"[]:<>+=;,?*@

actionTypeID xsd:string Yes TheuniqueIDfortheaction.

string

canInitiateWorkflow xsf:xdYesNo Yes Indicateswhethertheactioncanbeusedtostartanactivityflow.

yes

no

caption xsf:xdHWSCaption No ThelabelforthecorrespondingbuttonintheWorkflowtaskpanetostarttheaction.

minLength=1

maxLength=255

Definition

<xsd:elementname="action"><xsd:complexType><xsd:attributename="name"type="xsf:xdHWSname"use="required"></xsd:attribute><xsd:attributename="actionTypeID"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="canInitiateWorkflow"type="xsf:xdYesNo"use="required"></xsd:attribute><xsd:attributename="caption"type="xsf:xdHWSCaption"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

RemarksTheactionelementisanoptionalelementoftheallowedActionselement.

EachactionenabledfortheformmusthaveacorrespondingactionelementintheallowedActionssectionoftheformdefinitionfile(.xsf).

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheactionelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:some/b:thing"dataObject="Aux1"/>

</xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

ShowAll

adoAdapterElement

DefinesanActiveXDataObjects(ADO)dataadapterthatretrievesdatafromanADOdatasourceforthespecifieddataobject.

Type

xsd:complexType

Structure

Name DescriptioncommandText (Requiredattribute)Astringpropertythatcontains

theADOSQLcommandtexttobeusedforqueryingthedatafromthespecifieddatasource.

connectionString (Requiredattribute)AstringpropertythatcontainstheADOconnectionstringtobeusedtoconnecttothedatasource.

name (Optionalattribute)ContainsthenameoftheadoAdapterelement.

queryAllowed (Optionalattribute)SpecifieswhetherdatacanberetrievedfromthedatasourcethroughtheQuerymethodofthedataadapterobject.

submitAllowed (Optionalattribute)SpecifieswhetherdatacanbesubmittedtothedatasourcethroughtheSubmitmethodofthedataadapterobject.

RemarksTheadoAdapterelementisanoptionalelementofthequeryelement.

ExampleThefollowingisanexampleoftheadoAdapterelement:

<xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query>

ShowAll

allowedActionsElement

ContainstheMicrosoftBiztalkServer2004HumanWorkflowServices(HWS)actionsenabledfortheform.

Typexsd:complexType

ChildElements

Element Descriptionaction Containstheinformationforanindividualaction.

AttributesNone.

Definition

<xsd:elementname="allowedActions"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:action"minOccurs="1"maxOccurs="20"/></xsd:sequence></xsd:complexType><xsd:uniquename="hws_actionTypeID_unique"><xsd:selectorxpath="./xsf:action"/><xsd:fieldxpath="@actionTypeID"/></xsd:unique></xsd:element>

RemarksTheallowedActionselementisanoptionalelementofthehwsWorkflowelement.

EachactiontobeenabledfortheformmusthaveacorrespondingactionelementintheallowedActionssectionoftheformdefinitionfile(.xsf).

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheallowedActionselement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:some/b:thing"dataObject="Aux1"/>

</xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

ShowAll

allowedControlElement

SpecifiestheActiveXcontrolsthatareallowedtobeinstantiated.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

cabFile xsd:string No SpecifiesthenameoftheCABfile.

string

clsid xsd:string Yes SpecifiestheCLSID(COMclassID)oftheActiveXcontrol.

string

version xsd:string No SpecifiestheActiveXcontrolversionnumber.

string

Definition

<xsd:elementname="allowedControl"><xsd:complexType><xsd:attributename="cabFile"type="xsd:string"use="optional"></xsd:attribute><xsd:attributename="clsid"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="version"type="xsd:string"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

RemarksWhentheviewcontainsanOBJECTtag,thecontrolwillbeinstantiatedonlyiftheCLSIDislistedasanallowedControlelementinthepermissionselement.ControlsotherthanthosecorrespondingtotheCLSIDslistedinthepermissionselementarenotallowedtobeinstantiatedintheview.

IfanActiveXcontrollistedinthepermissionselementisnotinstalled(thatis,ifaCLSIDofacontrolisnotregistered),orifanearlierversionofthecontrolthanthatversionspecifiedinthepermissionselementistheonlyversioninstalled,thentherequiredCABfileswillbeinstalled.IftheCABfilesarenotincluded,oriftheinstallationisstopped,theformwillnotopen.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheallowedControlelement:

<xsf:permissions><xsf:allowedControlcabFile="{84F32C01-78D8-4B93-8ED4-106DA70224C2}.cab”clsid="{84F32C01-78D8-4B93-8ED4-106DA70224C2}"version=”1,0,0,1”/><xsf:allowedControlclsid="{F08DF954-8592-11D1-B16A-00C0F0283630}"/></xsf:permissions>

ShowAll

allowedTasksElement

ContainstheMicrosoftBiztalkServer2004HumanWorkflowServices(HWS)tasksenabledfortheform.

Typexsd:complexType

ChildElements

Element Descriptiontask Containstheinformationforanindividualtask.

AttributesNone.

Definition

<xsd:elementname="allowedTasks"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:task"minOccurs="1"maxOccurs="20"/></xsd:sequence></xsd:complexType><xsd:uniquename="hws_taskID_unique"><xsd:selectorxpath="./xsf:task"/><xsd:fieldxpath="@taskTypeID"/></xsd:unique></xsd:element>

RemarksTheallowedTaskselementisanoptionalelementofthehwsWorkflowelement.

EachtasktobeenabledfortheformmusthaveacorrespondingtaskelementintheallowedTaskssectionoftheformdefinitionfile(.xsf).

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheallowedTaskselement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:some/b:thing"dataObject="Aux1"/>

</xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

ShowAll

applicationParametersElement

Containsform-specificpropertiesthatdescribehowaformshouldbeusedinMicrosoftOfficeInfoPath2003designmode.

Type

xsd:complexType

Structure

Name Descriptionapplication (Requiredattribute)Identifiesthenameofthe

applicationusedtodesigntheInfoPathform.solutionProperties (Optionalelement)Containsdesign-timeinformation

abouttheInfoPathform.

RemarksTheapplicationParameterselementisanoptionalelementofthexDocumentClasselement.

ExampleThefollowingisanexampleoftheapplicationParameterselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.1.0.10"fullyEditableNamespace="urn:names?pace1:mynames"/></xsf:applicationParameters>

ShowAll

assignmentActionElement

Definesanactiontosetthevalueofafield.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

targetField xsd:string Yes ContainsanXPathexpressionforthetargetnode.

string

expression xsd:string Yes ContainsanXPathexpressiontopopulatethevalueofthetargetField.

string

Definition

<xsd:elementname="assignmentAction"><xsd:complexType><xsd:attributename="targetField"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="expression"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksTheassignmentActionelementisachildelementoftheruleelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheassignmentActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

ShowAll

attachmentFileNameElement

Containsthefilenameofthefileattachmenttobeincludedwiththee-mailmessagewhentheformissubmittedbyusingtheemailAdapterelement.

Typexsd:complexType

ParentElements

Element DescriptionemailAdapter Parentelementthatcontainstheinformationtosubmita

MicrosoftOfficeInfoPathfileasanattachmenttoane-mailmessage,withaspecifiedsetofrecipients,asubject,andanintroduction.

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes ContainsthevalueoftheattachmentFileNameelement.

string

valueType xsf:xdExpressionLiteralNo SpecifieswhetherthevalueattributeisinterpretedasanXPathexpressionoraliteralstring.

expression

literal

Definition

<xsd:elementname="attachmentFileName"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

RemarksTheattachmentFileNameelementisachildelementoftheemailAdapterelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheattachmentFileNameelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="prst@foo.com"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="john@bar.com"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

attributeDataElement

Specifiesthename,andassociatedvalue,ofanattributethatwillbeinserted,ormodifiedifitalreadyexists,bytheinsertactionofthexCollectionorxOptionaleditingcomponents.

Type

xsd:complexType

Structure

Name Descriptionattribute (Requiredattribute)Specifiesthenameoftheattributetobe

inserted.value (Requiredattribute)Specifiesthevalueoftheattributetobe

inserted.

RemarksTheattributeDataelementisanoptionalelementofthechooseFragmentelement.

ExampleThefollowingisanexampleoftheattributeDataelement:

<xsf:editWithcomponent="xOptional"><xsf:fragmentToInsert><xsf:chooseFragmentparent="report"><xsf:attributeDataattribute="author"value="authorname"/></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith>

autoRecoveryElement

SpecifieswhethertheformwillsaveAutoRecoverinformationandwhethertheAutoRecoversettingcanbechangedbytheuser.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

feature xsf:xdEnabledDisabled required SetswhethertheAutoRecoverfeatureisenabled.

enabled

disabled

Definition

<xsd:elementname="autoRecovery"><xsd:complexType><xsd:attributename="feature"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksTheautoRecoveryelementisanoptionalelementofthefeatureRestrictionselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheautoRecoveryelement:

<xsf:featureRestrictions><xsf:saveui="disabled"/><xsf:sendMailui="disabled"/><xsf:exportToWebui="disabled"/><xsf:exportToExcelui="disabled"/><xsf:printui="enabled"/><xsf:autoRecoveryfeature="disabled"/></xsf:featureRestrictions>

ShowAll

bccElement

ContainsinformationrelatedtotheBCCrecipientsofthee-mailmessagewhentheformissubmittedusingtheemailAdapterelement.

Typexsd:complexType

ParentElements

Element DescriptionemailAdapter Parentelementthatcontainstheinformationneededto

submitaMicrosoftOfficeInfoPath2003SP1fileasanattachmenttoane-mail,withaspecifiedsetofrecipients,asubject,andanintroduction.

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes Containsthevalueofthebccelement.

string

valueType xsf:xdExpressionLiteralNo SpecifieswhetherthevalueattributeisinterpretedasanXPathexpressionorasaliteralstring.

expression

literal

Definition

<xsd:elementname="bcc"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

RemarksIfmultipleaddressesarespecifedforthevalueofthebccelement,theaddressesmustbeseparatedbysemicolons.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthebccelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="someone@example.com""valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="someoneelse@example.com"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

ShowAll

buttonElement

Definesabuttonthathasanassociatedaction.

Type

xsd:complexType

Structure

Name Descriptionaction (Optionalattribute)Specifiesanactionofanediting

component,usingthesyntax"NameOfEditingComponent::NameOfAction".

caption (Optionalattribute)Providesthecaptiondisplayedonthebutton.

icon (Optionalattribute)ProvidesaUniformResourceLocator(URL)toabitmap(.bmp)orgraphicsinterchangeformat(.gif)file,whichisusedforthebuttonormenuitem.

name (Optionalattribute)UsedtoassociatetheOnClickeventhandlerofthebuttonwithascriptingfunction.

showIf (Optionalattribute)Specifiestheeditingcontextofthebutton.tooltip (Optionalattribute)ProvidestheScreenTiptexttobeusedfor

thebutton.xmlToEdit (Optionalattribute)SpecifiesthenameofanxmlToEdit

element,forwhichthebuttonisused.

RemarksThebuttonelementisanoptionalelementofthetoolbar,menu,andmenuAreaelements.Eachbuttonelementdeclarationcorrespondstoabuttononatoolbar,menu,ormenuareaitem,andeachbuttonhasanaction(orcommand)associatedwithit.

ExampleThefollowingisanexampleofthebuttonelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

ShowAll

calculatedFieldElement

Definesanindividualcalculation,includingtheformula,whenthecalculationistobeperformed,andwheretheresultwillbestored.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

target xsd:string Yes ContainstheXPathlocationwheretheresultoftheexpressionwillbestored.

string

expression xsd:string Yes Containstheformula,intheformofanXPathexpression,tobeevaluated.Theresultisstoredinthetargetlocation.

string

refresh xsd:string Yes Specifieswhentheexpressionwillbeevaluated.

onInit

onChange

Definition

<xsd:elementname="calculatedField"><xsd:complexType><xsd:attributename="target"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="expression"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="refresh"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthecalculatedFieldelement:

<xsf:calculations><xsf:calculatedFieldtarget="/my:myFields/my:average"expression="xdMath:Avg(../my:expenses/my:expense/my:amount)"refresh="onChange"/></xsf:calculations>

ShowAll

calculationsElement

Containsdefinitionsforcalculationsperformedintheformandspecifieshowblankvaluesarehandled.

Typexsd:complexType

ChildElements

Element DescriptioncalculatedField Definesanindividualcalculation,includingtheformula,

whenthecalculationistobeperformed,andwheretheresultwillbestored.

Attributes

Attribute Type Required DescriptionPossibleValues

treatBlankValueAsZero xsf:xdYesNo No Specifieswhetherablankfieldshouldbecalculatedwithavalueofzero.Defaultisyes.

yes

no

Definition

<xsd:elementname="calculations"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:calculatedField"minOccurs="0"maxOccurs="unbounded"/></xsd:sequence><xsd:attributename="treatBlankValueAsZero"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

RemarksEverycalculationintheformwillhaveacalculatedFieldelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthecalculationselement:

<xsf:calculations><xsf:calculatedFieldtarget="/my:myFields/my:average"expression="xdMath:Avg(../my:expenses/my:expense/my:amount)"refresh="onChange"/></xsf:calculations>

ShowAll

ccElement

ContainsinformationrelatedtotheCCrecipientsofthee-mailmessagewhentheformissubmittedusingtheemailAdapterelement.

Typexsd:complexType

ParentElements

Element DescriptionemailAdapter Parentelementthatcontainstheinformationneededto

submitaMicrosoftOfficeInfoPath2003SP1fileasanattachmenttoane-mail,withaspecifiedsetofrecipients,asubject,andanintroduction.

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes Containsthevalueoftheccelement.

string

valueType xdExpressionLiteral No SpecifieswhetherthevalueattributeisinterpretedasanXPathexpressionoraliteralstring.

expression

literal

Definition

<xsd:elementname="cc"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

RemarksIfmultipleaddressesarespecifedforthevalueoftheccelement,theaddressesmustbeseparatedbysemicolons.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheccelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="someone@example.com"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="someoneelse@example.com"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

ShowAll

chooseFragmentElement

SpecifiesanXMLfragment.

Type

xsd:complexType

Structure

Name DescriptionattributeData (Optionalelement)Specifiesthename,and

associatedvalue,ofanattributethatwillbeinserted,ormodifiedifitalreadyexists,bytheinsertactionofthexCollectionorxOptionaleditingcomponents.

followingSiblings (Optionalattribute)SpecifiesarelativeXPathexpressionfromtheparentnodethatspecifiestheXMLDocumentObjectModel(DOM)nodespriortowhichtheinsertionoftheXMLfragmentshouldoccur.

NoteThisisnotnecessaryinMicrosoftOfficeInfoPath2003ServicePack1andwillnotbeautomaticallygeneratedbyInfoPath.

parent (Optionalattribute)SpecifiesarelativeXPathexpressionfromthecontainernodethatspecifiestheXMLDOMnodeunderwhichtheXMLfragmentisinserted.

innerFragment (Optionalattribute)SpecifiesarelativeXPathexpressionfromtheparentnodetothesmallestfragmenttobeinserted.

NoteUseofthisattributerequiresMicrosoftOfficeInfoPath2003ServicePack1.

RemarksThechooseFragmentelementisarequiredelementofthefragmentToInsertelement.

ThechooseFragmentelementhasanopencontentmodel.Itmaycontaintext,oroneormoreelementnodes,ormixedcontent(bothelementnodesandtextnodes).InadditiontoorinsteadofXMLdatatobeinserteddirectlyasafragment,itcancontainoneormoreattributeDataelements.InthiscasetheattributeDataelementsarenotincludedasinsertedcontent,butareeachusedtospecifysettinganattributevalue.

ThechooseFragmentelementsaretypicallyorderedinincreasingsize.ThefirstwillbethedatafragmenttobeinsertedbytheinsertBeforeandinsertAfteractions,whenthereisalreadyatleastoneiteminthecollection.Theinsertaction,ontheotherhand,canbeinvokedwhenthereiscurrentlyanodeintheXMLtreecorrespondingtoacontainer,butnonodecorrespondingtoanitem(inotherwords,itcanbeusedtoinsertthefirstitem).

NoteMicrosoftOfficeInfoPath2003ServicePack1willgenerateonlyonechooseFragmentnode.Formoreinformation,seetheinnerFragmentattribute.

NoteAnyelementcontentwithintheXMLfragment,otherthanattributedata,correspondstonewcontenttobeinsertedintotheform'sunderlyingXMLdocument,andshouldbeintheappropriatenamespace.

ExampleThefollowingisanexampleofthechooseFragmentelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

ShowAll

closeDocumentActionElement

Definesaformcloseaction.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

promptToSaveChanges xdYesNo Yes Specifieswhethertheuserispromptedtosavechangestotheformbeforetheactioncompletes.Defaultis"yes".

yes

no

Definition

<xsd:elementname="closeDocumentAction"><xsd:complexType><xsd:attributename="promptToSaveChanges"type="xsf:xdYesNo"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksThecloseDocumentActionelementisachildelementoftheruleelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthecloseDocumentActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

ShowAll

customCategoryElement

SpecifiesthecategorythattheformtemplateappearsunderintheFillOutaFormtaskpane.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required Description PossibleValuesname xsf:xdTitle required Specifies

thenameofthecustomcategory.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

Definition

<xsd:elementname="customCategory"><xsd:complexType><xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksThecustomCategoryelementisanoptionalelementoftheinitialXmlDocumentelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthecustomCategoryelement:

<xsf:fileNew><xsf:initialXmlDocumentcaption="TravelReport"href="TravelReportTemplate.xml"><xsf:customCategoryname="Reports"/></xsf:initialXmlDocument></xsf:fileNew>

ShowAll

customValidationElement

Definesrule-basedcustomvalidationontopofallvalidationenforcedthroughtheXMLSchema.

Type

xsd:complexType

Structure

Name DescriptionerrorCondition (Optionalelement)Definesacustomvalidation(orerror

condition)foraspecificXMLDocumentObjectModel(DOM)nodeinaform'sunderlyingXMLdocument.

RemarksThecustomValidationelementisanoptionalelementofthexDocumentClasselement.

NoteItispossibletocreatemultipleerrorconditionsonafieldinaformusingmultipleerrorConditionelements,buttheywillnotappearintheDataValidationdialogboxwhileindesignmode.

ExampleThefollowingisanexampleofthecustomValidationelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

ShowAll

dataAdaptersElement

Containsinformationaboutsubmitadaptersthatareusedasthemainsubmitadaptersfortheformandthatthereforearenotdeclaredinlinewithinthesubmitelement.

Typexsd:complexType

ChildElements

Element DescriptionwebServiceAdapter ContainsinformationtoenableInfoPathformsto

besubmittedtoanXMLWebservice.davAdapter ContainsinformationtoenableInfoPathformsto

besubmittedtoaserverrunningMicrosoftWindowsSharePointServicesortoaWeb-basedDistributedAuthoringandVersioning(WebDAV)server.

emailAdapter ContainsinformationtoenablesubmissionofanInfopathformasanattachmenttoane-mail,withaspecifiedsetofrecipients,asubject,andanintroduction.

hwsAdapter DefinestheMicrosoftBiztalk2004HumanWorkflowServices(HWS)dataadapterthatisusedtostartorextendanactivityflowandrespondtoatask.

AttributesNone.

Definition

<xsd:elementname="dataAdapters"><xsd:complexType><xsd:choiceminOccurs="0"maxOccurs="unbounded"><xsd:elementref="xsf:webServiceAdapter"/><xsd:elementref="xsf:davAdapter"/><xsd:elementref="xsf:emailAdapter"/><xsd:elementref="xsf:hwsAdapter"/></xsd:choice></xsd:complexType></xsd:element>

RemarksThedataAdapterselementisanoptionalelementofthexDocumentClasselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthedataAdapterselement:

<xsf:dataAdapters><xsf:webServiceAdaptername="submit2"...submitAllowed="yes">...</xsf:webServiceAdapter><xsf:emailAdaptername="submit4"…submitAllowed="yes"/></xsf:dataAdapters>

ShowAll

dataObjectElement

DefinesasecondarydataobjectthatisusedinaMicrosoftOfficeInfoPath2003form.

Type

xsd:complexType

Structure

Name DescriptioninitOnLoad (Optionalattribute)Specifieswhetherthedataobjectshould

beinitializedondocumentload.name (Requiredattribute)Theuniquenameforthedataobject.schema (Optionalattribute)ThenameofanXMLSchemafile.query (Requiredelement)Associatesthedataadapterwiththe

dataobjectoraform'sunderlyingXMLdocument.

RemarksThedataObjectelementisanoptionalelementofthedataObjectselement.

MultipledataObjectelementsareallowedwithinaform.EachdataobjectisanXMLDocumentObjectModel(DOM)populatedfromanexternaldatasourcethatcanbeaccesseddirectly(byname)fromtheXSLTransformation(XSLT)–basedviewcodeandanyscript-basedbusinesslogiccodeintheform.

ExampleThefollowingisanexampleofthedataObjectelement:

<xsf:dataObjects><xsf:dataObjectname="EmployeeNames"schema="EmployeeNames.xsd"initOnLoad="yes"><xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter> </xsf:query> </xsf:dataObject> </xsf:dataObjects>

ShowAll

dataObjectsElement

DefinesallsecondarydataobjectsusedinaMicrosoftOfficeInfoPath2003form.

Type

xsd:complexType

Structure

Name DescriptiondataObject (Optionalelement)Definesasecondarydataobjectthatis

usedinanInfoPathform.

RemarksThedataObjectselementisanoptionalelementofthexDocumentClasselement.

ThedataObjectselementcontainsacollectionofdataobjectsthatareusedtopopulatevariousXMLDocumentObjectModels(DOMs)fromexternaldatasources.Thesedataobjectscanbeaccesseddirectly(byname)fromtheXSLTransformation(XSLT)–basedviewcodeandanyscript-basedbusinesslogiccodeintheform.

ExampleThefollowingisanexampleofthedataObjectselement:

<xsf:dataObjects><xsf:dataObjectname="EmployeeNames"schema="EmployeeNames.xsd"initOnLoad="yes"><xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter> </xsf:query> </xsf:dataObject> </xsf:dataObjects>

ShowAll

davAdapterElement

ContainsinformationtoenableInfoPathformstobesubmittedtoaserverrunningMicrosoftWindowsSharePointServicesortoaWeb-basedDistributedAuthoringandVersioning(WebDAV)server.

Typexsd:complexType

ChildElements

Element DescriptionfolderURL ContainstheUniformResourceLocator(URL)oftheserver

towhichthefileissubmitted.fileName ContainsthenameofthefileasaliteralstringorXPath

expression.

Attributes

Attribute Type Required Description PossibleValuesname xdTitle Yes Thenameof

theadapter.UsedwheninvokingthedavAdapterfromcode.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

overwriteAllowed xdYesNo No Specifieswhethertheadaptercanoverwriteanexistingfile.

yes

no

queryAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforqueryingthedatasource.OmittedforthedavAdapter,correspondingtoadefaultvalueof"no".

yes

no

submitAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforsubmittingtothedatasource.Alwayssetto

yes

no

"yes"forthedavAdapter.

Definition

<xsd:elementname="davAdapter"><xsd:complexType><xsd:all><xsd:elementname="folderURL"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementname="fileName"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element></xsd:all><xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute><xsd:attributename="overwriteAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute><xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute><xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthedavAdapterelement:

<xsf:davAdaptername="SubmitToSharePoint"overwriteAllowed="yes"submitAllowed="yes"><xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/><xsf:folderURLvalue="http://some_server/some_doc_lib"/></xsf:davAdapter>

ShowAll

dialogBoxExpressionActionElement

DefinesanXPathexpressiontobedisplayedinadialogbox.

Typexsd:string

ChildElementsNone.

AttributesNone.

Definition

<xsd:elementname="dialogBoxExpressionAction"type="xsd:string"></xsd:element>

RemarksThedialogBoxExpressionActionelementisachildelementoftheruleelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthedialogBoxExpressionActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

dialogBoxMessageActionElement

Definesaliteralmessagetobedisplayedinadialogbox.

Typexsd:simpleType

ChildElementsNone.

AttributesNone.

Definition

<xsd:elementname="dialogBoxMessageAction"><xsd:simpleType><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="1024"/></xsd:restriction></xsd:simpleType></xsd:element>

RemarksThedialogBoxMessageActionelementisachildelementoftheruleelement.

Themaximumlengthofthemessageis1,024characters.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthedialogBoxMessageActionelement:

<<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

ShowAll

documentSchemaElement

DefinesanXMLSchemaforaform.

Type

xsd:complexType

Structure

Name Descriptionlocation (Requiredattribute)ContainsthenamespaceUniform

ResourceIdentifier(URI)andlocation(aUniformResourceLocator(URL),relativetotheformdefinition(.xsf)file),anddelimitedbyawhitespace,ofthe.xsdfiledefiningtheXMLSchema.

rootSchema (Optionalattribute)IdentifiesanXMLSchemaasthetop-levelschemaoftheformbeingfilledout.

RemarksThedocumentSchemaelementisarequiredelementofthedocumentSchemaselement.OnedocumentSchemaelementispresentforeachdeclaredXMLSchemaintheform.

MicrosoftOfficeInfoPath2003includesallXMLSchemasintheformtemplateandmodifiestheschemareferencesinthe.xsdfilestoberelativepathnames.Ifaform'sunderlyingXMLdocumentcontainsreferencestomultipleXMLSchemas,theyarelistedwithseparatedocumentSchemaelementsandthetop-levelXMLSchemahasitsrootSchemaattributesetto"yes".

IfanXMLSchemafilecontainsreferencestootherXMLSchemafilesusingtheincludeorimportsettings,thosereferencedfilesdonothavetobelistedinthedocumentSchemaselement.However,theymustbeincludedintheformtemplatewiththeirreferenceschangedtorelativefilenames.

ExampleThefollowingisanexampleofthedocumentSchemaelement:

<xsf:documentSchemas><xsf:documentSchemalocation="urn:schema:custom:NamespacecustomFilename.xsd"rootSchema="yes"/></xsf:documentSchemas>

ShowAll

documentSchemasElement

DefinestheXMLSchemasthattheMicrosoftOfficeInfoPath2003formisdesignedtohandle.

Type

xsd:complexType

Structure

Name DescriptiondocumentSchema (Requiredelement)DefinesanXMLSchemafora

form.OnedocumentSchemaelementispresentforeachdeclaredXMLSchemaintheform.

RemarksThedocumentSchemaselementisanoptionalelementofthexDocumentClasselement.ItdefinesallofthetargetXMLSchemasthatareusedintheform.

ExampleThefollowingisanexampleofthedocumentSchemaselement:

<xsf:documentSchemas><xsf:documentSchemalocation="urn:schema:custom:NamespacecustomFilename.xsd"rootSchema="yes"/></xsf:documentSchemas>

ShowAll

documentSignaturesElement

ContainsthesignedDataBlockelement,whichdefineshowdigitalsignaturesareappliedtoaformorsectionofaform.

Type

xsd:complexType

Structure

Name DescriptionsignatureLocation (Optionalattribute)ContainsanXPathexpression

thatpointstotheXMLDOMnodewithintheform'sunderlyingXMLdocumentthatisusedforstoringthedigitalsignature.

ChildElements

Element DescriptionsignedDataBlock Definesanodesetintheform'sunderlyingXML

documenttowhichadigitalsignaturecanbeapplied.

Definition

<xsd:elementname="documentSignatures"> <xsd:complexType> <xsd:sequence> <xsd:elementref="xsf:signedDataBlock"minOccurs="0"maxOccurs="unbounded"/> </xsd:sequence> <xsd:attributename="signatureLocation"type="xsd:string"use="optional"/> </xsd:complexType> </xsd:element> <xsd:elementname="signedDataBlock"> <xsd:complexType> <xsd:sequence> <xsd:elementname="message"type="xsf:xdSignedDataBlockMessage"minOccurs="0"/> </xsd:sequence> <xsd:attributename="name"type="xsf:xdSignedDataBlockName"use="required"/> <xsd:attributename="data"type="xsd:string"use="required"/> <xsd:attributename="signatureLocation"type="xsd:string"use="required"/> <xsd:attributename="mode"type="xsf:xdSignatureRelationEnum"use="required"/> </xsd:complexType> <xsd:uniquename="signedDataBlock_name_unique"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@name"/> </xsd:unique> </xsd:element>

RemarksThesignedDataBlockelementisanewXSFelementadditioninMicrosoftOfficeInfoPath2003ServicePack1.Seebelowforbackwardcompatibilityinformationwith1.0formsolutions.

Forbackwardcompatibility,thedocumentsignatureselementdefinesthelocationofthedigitalsignatureXMLDocumentObjectModel(DOM)nodewithintheform'sunderlyingXMLdocument.

ThedocumentSignatureselementisanoptionalelementofthexDocumentClasselement.

ExampleThefollowingisanexampleofthedocumentSignatureselement:

<xsf:documentSignaturessignatureLocation=”my:myfields/my:subtree1|my:myfields/my:subtree2”/>

ThefollowingisanexampleofthedocumentSignatureselementusedinMicrosoftOfficeInfoPath2003ServicePack1:

<xsf:documentSignatures><xsf:signedDataBlockname="main"data="my:myfields/my:subtree1|my:myfields/my:subtree2"signatureLocation="my:mifields/sig:signatures/main"mode="countersign"><xsf:message>Bypressingthe&quot;Sign&quot;buttonbelow,Iagreetobeboundtothetermsofthisdocument.</xsf:message></xsf:signedDataBlock></xsf:documentSignatures>

ShowAll

documentVersionUpgradeElement

Defineshowformscreatedwithanolderversionoftheformtemplatecanbeupgradedtothelatestversionoftheformtemplate.

Type

xsd:complexType

Structure

Name DescriptionuseScriptHandler (Optionalelement)Specifiesthattheupgradewillbe

handledusingscriptingcode.useTransform (Optionalelement)Specifiesthattheupgradewillbe

handledbyanXSLTransformation(XSLT)suppliedbythenewerversionoftheformtemplate.

RemarksThedocumentVersionUpgradeelementisanoptionalelementofthexDocumentClasselement.

ExampleThefollowingisanexampleofthedocumentVersionUpgradeelement:

<xsf:documentVersionUpgrade><xsf:useTransformtransform="upgrade.xsl"minVersionToUpgrade="0.0.0.0"maxVersionToUpgrade="1.0.0.5"/></xsf:documentVersionUpgrade>

ShowAll

domEventHandlerElement

DefinesaneventhandlerforoneormorespecificXMLDocumentObjectModel(DOM)nodes.

Type

xsd:complexType

Structure

Name DescriptionhandlerObject (Requiredattribute)Identifiestheuniquenameofthe

eventhandlerinthescriptingcode.match (Requiredattribute)IdentifiestheXMLDOMnodefor

whichtheeventhandlerisdeclared.ValuemustbeavalidXPathexpressionthatidentifiestheXMLnode.

dataObject (Optionalattribute)ContainsthenameofthedataObjecttobeusedintheeventhandler.

NoteUseofthisattributerequiresMicrosoftOfficeInfoPath2003ServicePack1.

RemarksThedomEventHandlerelementisanoptionalelementofthedomEventHandlerselement.

ExampleThefollowingisanexampleofthedomEventHandlerelement:

<xsf:domEventHandlers><xsf:domEventHandlermatch="TravelReport/Expenses"handlerObject="TravelExpenses"/></xsf:domEventHandlers>

ShowAll

domEventHandlersElement

Containspointerstovariousscript-basedeventhandlersthatreacttochangesinXMLDocumentObjectModel(DOM)nodesofaform'sunderlyingXMLdocumentwhentheformisbeingfilledout.

Type

xsd:complexType

Structure

Name DescriptiondomEventHandler (Optionalelement)Definesaneventhandlerobject

foroneormorespecificXMLDOMnodes.

RemarksThedomEventHandlerselementisanoptionalelementofthexDocumentClasselement.

ExampleThefollowingisanexampleofthedomEventHandlerselement:

<xsf:domEventHandlers><xsf:domEventHandlermatch="TravelReport/Expenses"handlerObject="TravelExpenses"/></xsf:domEventHandlers>

ShowAll

editingElement

Containsinformationabouttheeditingcomponentsusedintheview.

Type

xsd:complexType

Structure

Name DescriptionxmlToEdit (Optionalelement)Specifiesaninstanceofanediting

component.

RemarksTheeditingelementisanoptionalelementoftheviewelement.

TheeditingcomponentssectionoftheMicrosoftOfficeInfoPath2003formdefinition(.xsf)filedefineshowandwhenusersareabletoeditspecifiedXMLDocumentObjectModel(DOM)nodesofaform'sunderlyingXMLdocument.Onlyoneeditingelementisallowedperview.EacheditingelementcancontainzeroormorexmlToEditelements.

ExampleThefollowingisanexampleoftheeditingelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

ShowAll

editWithElement

Specifiesaninstanceofaneditingcomponent,andprovidesthecorrespondingparameterstodetermineitsexactbehavior.

Type

xsd:complexType

Structure

Name DescriptionallowedFileTypes (Optionalattribute)Specifiesthefileextensionsof

filesthatcanbeattachedtotheform.autoComplete (Optionalattribute)Switchestheauto-completionof

fieldsonoroff.caption (Optionalattribute)Specifiesanidentifierfor

alternateformsofXMLdatatobeusedintheeditingcomponent.

component (Requiredattribute)Specifiesthenameoftheeditingcomponentthatwillbereferencedwithintheactionattributeofabuttonelement.

field (Optionalattribute)SpecifiesarelativeXPathexpressionfromtheXMLDocumentObjectModel(DOM)nodespecifiedbytheitemattributeofthexmlToEditelement.

fragmentToInsert (Optionalelement)ContainsalternateversionsofXMLdata(fragments).

proofing (Optionalattribute)Switchestheproofingfeatures,suchasthespellingchecker,onoroff.

removeAncestors (Optionalattribute)Specifiesthenumberofancestor(parent)elementstoberemovedwhenthelastitemisremoved.

type (Optionalattribute)SpecifiesthetypeofeditingforthefieldsthatmatchtheXPathexpressionspecifiedbytheitemattributeofthexmlToEditelement.

widgetIcon (Optionalattribute)Specifieswhetherornotamodifiedwidgeticonwillbeshownforfiltereditems.

useFilter (Optionalattribute)Indicatestheuserwantsafilterwidget.

filterDependency (Optionalattribute)Specifiesautomaticreapplicationofthefilterwhenfilterfieldschange.

maxLength (Optionalattribute)Specifiesthemaximumnumberofcharactersallowedfortextboxes.

RemarksTheeditWithelementisanoptionalelementofthexmlToEditelement.

IftheviewContextattributeofthexmlToEditelementisdefined,theparametersoftheeditWithelementareassociatedwiththespecifiedviewcontext.

ExampleThefollowingisanexampleoftheeditWithelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

emailAdapterElement

ContainstheinformationneededtosubmitanInfoPathformasanattachmenttoane-mail,withaspecifiedsetofrecipients,asubject,andanintroduction.

Typexsd:complexType

ChildElements

Element Descriptionto Containsalistofaddresses,separatedby

semicolons,tobeaddedtothetolineofthesubmittede-mail.

cc Containsalistofaddresses,separatedbysemicolons,tobeaddedtothecclineofthesubmittede-mail.

bcc Containsalistofaddresses,separatedbysemicolons,tobeaddedtothebcclineofthesubmittede-mail.

subject Containsthesubjectofthesubmittede-mail.intro Containstheintroductionofthesubmittede-mail.attachmentFileName Containsthefilenameoftheattachmenttobe

submittedwiththee-mail.

Attributes

Attribute Type Required Description PossibleValuesname xdTitle Yes Containsthe

nameoftheemailAdapter.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

queryAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforqueryingthedatasource.OmittedfortheemailAdapter,correspondingtoadefaultvalueof"no".

yes

no

submitAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforsubmittingtothedatasource.Alwayssetto"yes"fortheemailAdapter.

yes

no

Definition

<xsd:elementname="emailAdapter"><xsd:complexType><xsd:all><xsd:elementname="to"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementname="cc"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementname="bcc"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementname="subject"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementname="intro"minOccurs="0"><xsd:complexType>

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementname="attachmentFileName"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element></xsd:all><xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute><xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute><xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheemailAdapterelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="someone@example.com"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="someoneelse@example.com"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

ShowAll

errorConditionElement

Definesacustomvalidation(orerrorcondition)foraspecificXMLDocumentObjectModel(DOM)nodeinaform'sunderlyingXMLdocument.

Type

xsd:complexType

Structure

Name Descriptionexpression (Requiredattribute)AnXPathexpression(relative

totheexpressionContextattribute,ifspecified)thatmustbeevaluatedtovalidatetheXMLDOMnodespecifiedinthematchattribute.

expressionContext (Optionalattribute)SpecifiestheXMLDOMnodeonwhichtheexpressionspecifiedintheexpressionattributeisrooted.

match (Requiredattribute)IdentifiestheXMLDOMnodesonwhichthecustomvalidationisdeclared.

showErrorOn (Optionalattribute)IdentifiesXMLDOMnodes(withinthecontextoftheexpressioncontextXMLDOMnode)onwhichtheerrorshouldbedisplayedwhentheformisfilledout.

errorMessage (Requiredelement)SpecifiestheerrormessagetobereturnedifthevalueofthespecifiedXMLDOMnodeisconsideredtobeinvalid.

RemarksTheerrorConditionelementisanoptionalelementofthecustomValidationelement.

ExampleThefollowingisanexampleoftheerrorConditionelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

ShowAll

errorMessageElement

SpecifiestheerrormessagethatshouldbereturnedifthevalueofthespecifiedXMLDocumentObjectModel(DOM)nodeisconsideredtobeinvalid.

Type

xsf:xdErrorMessage

Structure

Name DescriptionshortMessage (Requiredattribute)Identifiestheshorterrormessageto

returnincaseofinvaliddata.type (Optionalattribute)Identifiesthetypeoferrormessage

toreturn.

RemarksTheerrorMessageelementisarequiredelementoftheerrorCondition,override,andsubmitelements.

YoucansupplyadetailederrormessageasthevalueoftheerrorMessageelement.Thedetailederrormessageisdisplayedbyclickingtheshortcutmenu'sFullerrordescriptionbuttonwhenerrorinformationisdisplayedandwhentheerrormessagetypeattributeissetto"modal".

ExampleThefollowingisanexampleoftheerrorMessageelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

ShowAll

exitRuleSetElement

AnelementthatstopsfurtherruleprocessingoftheentireruleSet.

Typexsd:complexType

ParentElements

Element Descriptionrule Definesanactioninvokedafteraneventhasoccurredinthe

form.

ChildElementsNone.

AttributesNone.

Definition

<xsd:elementname="exitRuleSet"minOccurs="0"><xsd:complexType/></xsd:element>

RemarksTheexitRuleSetelementmustbethelastchildelementoftheruleelement.TheruleSetelementprocessingwillbehaltedonlyiftheruleelementisexecuted.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheexitRuleSetelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

ShowAll

exportToExcelElement

Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstoexporttheformtoaMicrosoftOfficeExcel2003workbook.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

ui xsf:xdEnabledDisabled required SetswhethertheusercanexportthecontentsoftheformtoanExcelworkbook.

enabled

disabled

Definition

<xsd:elementname="exportToExcel"><xsd:complexType><xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksTheexportToExcelelementisanoptionalelementofthefeatureRestrictionselement.Ifthiselementisnotincludedintheformdefinitionfile(.xsf),theusercanusetheform'smenus,toolbars,orkeyboardshortcutstoexporttheformtoanExcelworkbook.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheexportToExcelelement:

<xsf:featureRestrictions><xsf:saveui="disabled"/><xsf:sendMailui="disabled"/><xsf:exportToWebui="disabled"/><xsf:exportToExcelui="disabled"/><xsf:printui="enabled"/><xsf:autoRecoveryfeature="disabled"/></xsf:featureRestrictions>

ShowAll

exportToWebElement

Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstoexporttheformtoaWebpage.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

ui xsf:xdEnabledDisabled required SetswhethertheusercanexportthecontentsoftheformtoaWebpage.

enabled

disabled

Definition

<xsd:elementname="exportToWeb"><xsd:complexType><xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksTheexportToWebelementisanoptionalelementofthefeatureRestrictionselement.Ifthiselementisnotincludedintheformdefinitionfile(.xsf),theusercanusetheform'smenus,toolbars,orkeyboardshortcutstoexporttheformtoaWebpage.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheexportToWebelement:

<xsf:featureRestrictions><xsf:saveui="disabled"/><xsf:sendMailui="disabled"/><xsf:exportToWebui="disabled"/><xsf:exportToExcelui="disabled"/><xsf:printui="enabled"/><xsf:autoRecoveryfeature="disabled"/></xsf:featureRestrictions>

ShowAll

extensionElement

Containsopencontentmodelinformation.

Type

xsd:complexType

Structure

Name Descriptionname (Requiredattribute)Auniquenameidentifyingtheextension

beingspecified.

RemarksTheextensionelementisanoptionalelementoftheextensionselement.

NoteUseoftheextensionelementisreserved.MicrosoftOfficeInfoPath2003ignoresanycontentwithintheextensionelement.

ExampleThefollowingisanexampleoftheextensionelement:

<xsf:extensions><xsf:extensionname="someValue"anyAttributesHere="someValue">...opencontentmodelhere...</xsf:extension><xsf:extensions>

ShowAll

extensionsElement

IncludesminorupgradestotheMicrosoftOfficeInfoPath2003formdefinition(.xsf)filethatcanbeusedbyspecificfutureversionsofInfoPathorbyspecificforms.

Type

xsd:complexType

Structure

Name Descriptionextension (Optionalelement)Containsopencontentmodelinformation.

RemarksTheextensionselementisanoptionalelementofthexDocumentClasselement.

Theextensionselementcontainszeroormoreextensionelements,eachofwhichhasanopencontentmodel.

NoteUseoftheextensionelementisreserved.MicrosoftOfficeInfoPath2003ignoresanycontentwithintheextensionelement.

ExampleThefollowingisanexampleoftheextensionselement:

<xsf:extensions><xsf:extensionname="someValue"anyAttributesHere="someValue">...opencontentmodelhere...</xsf:extension><xsf:extensions>

ShowAll

externalViewElement

DefinesaviewthatcannotbeeditedinMicrosoftOfficeInfoPath.

Typexsd:complexType

ChildElements

Element Descriptionmainpane SpecifiestheXSLTransformation(XSLT)tobeappliedtothe

view.

Attributes

Attribute Type Required Description PossibleValuesname xsf:xdViewName Yes Containsthe

nameoftheexternalViewelement.

minlength=1

maxlength=255

pattern=([^\p{Z}\p{C}/\\#&"><])(([^\p{Zl}\p{Zp}\p{C}/\\#&"><])*([^\p{Z}\p{C}/\\#&"><]))?

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

Definition

<xsd:elementname="externalView"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:mainpane"/></xsd:sequence><xsd:attributename="name"type="xsf:xdViewName"use="required"/></xsd:complexType></xsd:element>

ExampleThefollowingisanexampleoftheexternalViewelement:

<xsf:externalViews><xsf:externalViewname="SalesDoc"><xsf:mainpanetransform="myWordView.xsl"/></xsf:externalView><xsf:externalViews>

ShowAll

externalViewsElement

ContainsoneormoreexternalViewelements.

Typexsd:complexType

ChildElements

Element DescriptionexternalViewDefinesaviewthatcannotbeeditedinMicrosoftOffice

InfoPath.

AttributesNone.

Definition

<xsd:elementname="externalViews"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:externalView"minOccurs="1"maxOccurs="unbounded"/></xsd:sequence></xsd:complexType><xsd:uniquename="externalViews_name_unique"><xsd:selectorxpath="./xsf:externalView"/><xsd:fieldxpath="@default"/></xsd:unique><xsd:keyrefname="external_views_printView"refer="xsf:externalView_name_key"><xsd:selectorxpath="."/><xsd:fieldxpath="@default"/></xsd:keyref></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheexternalViewselement:

<xsf:externalViews><xsf:externalViewname="SalesDoc"><xsf:mainpanetransform="myWordView.xsl"/></xsf:externalView><xsf:externalViews>

ShowAll

featureRestrictionsElement

Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstosavetheform,exporttheform,printtheform,orsendtheformasane-mailattachment.

Typexsd:complexType

ChildElements

Element Descriptionsave (Optionalelement)Specifieswhethertheusercanuse

theform'smenus,toolbars,orkeyboardshortcutstosavetheform.

exportToWeb (Optionalelement)Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstoexporttheformtoaWebpage.

exportToExcel (Optionalelement)Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstoexporttheformtoanMicrosoftOfficeExcel2003workbook.

print (Optionalelement)Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstoprinttheform.

sendMail (Optionalelement)Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstosendtheformasane-mailattachment.

autoRecovery (Optionalelement)SpecifieswhethertheformwillsaveAutoRecoverinformationandwhethertheAutoRecoversettingcanbechangedbytheuser.

AttributesNone.

Definition

<xsd:elementname="featureRestrictions"><xsd:complexType><xsd:all><xsd:elementname="save"minOccurs="0"><xsd:complexType><xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementref="xsf:exportToWeb"minOccurs="0"/><xsd:elementref="xsf:exportToExcel"minOccurs="0"/><xsd:elementref="xsf:print"minOccurs="0"/><xsd:elementref="xsf:sendMail"minOccurs="0"/><xsd:elementref="xsf:autoRecovery"minOccurs="0"/></xsd:all></xsd:complexType></xsd:element>

RemarksDisablinganyofthefeatureRestrictionselement'schildelementsdoesnotdisabletheuseofformcodetosavetheform,exporttheform,printtheform,orsendtheformasanemailattachment.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthefeatureRestrictionselement:

<xsf:featureRestrictions><xsf:saveui="disabled"/><xsf:sendMailui="disabled"/><xsf:exportToWebui="disabled"/><xsf:exportToExcelui="disabled"/><xsf:printui="enabled"/><xsf:autoRecoveryfeature="disabled"/></xsf:featureRestrictions>

ShowAll

fieldElement

Definesonefieldforformlibrarycolumns.

Type

xsd:complexType

Structure

Name Descriptionaggregation (Optionalattribute)SpecifieshowtheXMLDocument

ObjectModel(DOM)nodesreturnedfromanXPathexpressioninthenodeattributeshouldbeaggregatedtoobtainasinglevalueforthedocument.Caneitherbeanaggregationactionoranindicationoftheparticularelementinthecollection.

columnName (Requiredattribute)IdentifiesthecolumnnameintheSQLtable(underlyingtheformlistview).

maxLength (Optionalattribute)Definesthelengthofthefieldinnumberofbytes.

name (Requiredattribute)Identifiesthefriendlynameofthefieldtobeusedontheformlistview.

node (Requiredattribute)DefinestheXPathexpressionneededtoextractthevalueofthespecifiedpropertyfromtheform'sunderlyingXMLdocument.

required (Optionalattribute)Specifieswhetherthisfieldacceptsnullvalues.

type (Requiredattribute)IdentifiesthestandardXMLSchemadatatype.

viewable (Optionalattribute)Specifieswhetherthisfieldshouldbeaddedtothedefaultview.Possiblevalues"yes"and"no".Thedefaultvalueis"no".

RemarksThefieldelementisanoptionalelementofthefieldselement.

ExampleThefollowingisanexampleofthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

fieldElement(sharepointListAdapterElement)

ContainsfieldmappinginformationforeachfieldinaSharePointlistandthecorrespondingnameusedinInfoPath.

Typexsd:ComplexType

ParentElements

Element DescriptionsharepointListAdapter Containsthedataadapterinformationtoquery

aSharePointlistorlibrary.

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

sharepointName xsd:string Yes ContainsthenameofafieldinaSharePointlist.

string

infopathName xsd:string Yes ContainsthecorrespondingInfoPathfieldnameforthesharepointName.

string

isLookup xdYesNo No SpecifieswhetherafieldinaSharePointlistisalookupfield.Thedefaultis"no".

yes

no

Definition

<xsd:elementname="field"minOccurs="0"maxOccurs="unbounded"><xsd:complexType><xsd:attributename="sharepointName"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="infopathName"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="isLookup"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

RemarksEachfieldreturnedfromaSharePointlistorlibrarybythesharepointListAdapterdataadapterwillhaveafieldelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthefieldelement:

<xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"isLookup="no"></xsf:field>

fieldsElement

Definesasetofoneormorefieldelements.

Type

xsd:complexType

Structure

Name Descriptionfield (Optionalelement)Definesonefieldforformlibrarycolumns.

RemarksThefieldselementisanoptionalelementofthelistPropertieselement.

ExampleThefollowingisanexampleofthefieldselement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

fileElement

IdentifiesafileaspartofaMicrosoftOfficeInfoPath2003form.

Type

xsd:complexType

Structure

Name Descriptionname (Requiredattribute)Specifiesthenameofthefile.fileProperties (Optionalelement)Definesthepropertiesofafile.

RemarksThefileelementisanoptionalelementofthefileselement.

ExampleThefollowingisanexampleofthefileelement:

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

ShowAll

fileNameElement

SpecifiesthefilenameoranexpressionthatreturnsafilenamewhentheformissubmittedusingthedavAdapter.

Typexsd:complexType

ParentElements

Element DescriptiondavAdapter Theparentelementthatcontainsalltheinformation

necessarytosubmitfilestoaserverthatisrunningMicrosoftWindowsSharePointServicesoraWebbasedDistributedAuthoringandVersioning(WebDAV)server.

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes Containsthenameofthefile,oncesubmittedtotheserver.

string

valueType xsf:xdExpressionLiteralNo SpecifieswhetherthenameofthefileshouldbeinterpretedasanXPathexpressionorasaliteralstring.

expression

literal

Definition

<xsd:elementname="fileName"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

RemarksTheextension".xml"isappendedtothefilenameifafilenameextensionisnotspecified.

Thefollowingsystemreservedcharacterswillbereplacedbyanunderscore("_")characterwhenaformissubmitted:

\/:*?"<>|

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthefileNameelement:

<xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/>

ShowAll

fileNewElement

Providesareferencetoan.xmlfilecontainingsampledatatobeloadedwhenauserchoosestocreateanewformbasedontheformtemplate.

Type

xsd:complexType

Structure

Name DescriptioninitialXmlDocument (Requiredelement)Containsareferencetothe

XMLtemplatefilethatisusedforthecreationofanewformbasedontheformtemplate.

RemarksThefileNewelementisanoptionalelementofthexDocumentClasselement.

ThefileNewelementoftheMicrosoftOfficeInfoPath2003formdefinition(.xsf)filedefinesthenameandlocationofanXMLtemplatefilethatisusedwhenauserclicksFillOutaFormontheFilemenu.TheXMLtemplatefilecontainsthesampledatathatisloadedwhentheuserchoosestocreateanewformbasedontheformtemplate.

ExampleThefollowingisanexampleofthefileNewelement:

<xsf:fileNew><xsf:initialXmlDocumentcaption="TravelReport"href="TravelReportTemplate.xml"/></xsf:fileNew>

filePropertiesElement

Definesthepropertiesofafile.

Type

xsd:complexType

Structure

Name Descriptionproperty (Optionalelement)Definesonespecificpropertyforthe

specifiedfile.

RemarksThefilePropertieselementisanoptionalelementofthefileelement.

ExampleThefollowingisanexampleofthefilePropertieselement:

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

filesElement

IdentifiesalistoffilesthatareusedbyaMicrosoftOfficeInfoPath2003form.

Type

xsd:complexType

Structure

Name Descriptionfile (Optionalelement)IdentifiesafileaspartofanInfoPathform.

RemarksThefileselementisarequiredelementofthepackageelement.

Thefileselementmayincludespecificpropertynamesandvaluesforeachfile.

ExampleThefollowingisanexampleofthefileselement:

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

ShowAll

folderURLElement

SpecifiestheUniformResourceLocator(URL)ofaWeb-basedDistributedAuthoringandVersioning(WebDAV)serveroraserverthatisrunningMicrosoftWindowsSharePointServices.

Typexsd:complexType

ParentElements

Element DescriptiondavAdapter Theparentelement,whichcontainsallinformation

necessarytosubmitInfopathformstoaWeb-basedDistributedAuthoringandVersioning(WebDAV)serveroraserverthatisrunningSharePointServices.

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes TheURLoftheWeb-basedDistributedAuthoringandVersioning(WebDAV)serverortheserverthatisrunningSharePointServices.

string

Definition

<xsd:elementname="folderURL"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksTheURLmustbeginwith"http://"or"https://".Othercommonprotocolswillcauseanerror.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthefolderURLelement:

<folderURLvalue="http://some_server/some_doc_lib"/>

footerElement

Specifiesthefootertext.

Typexsd:simpleType

ChildElementsNone.

AttributesNone.

Definition

<xsd:elementname="footer"><xsd:complexTypemixed="true"><xsd:sequence><xsd:anyminOccurs="0"maxOccurs="unbounded"processContents="skip"/></xsd:sequence></xsd:complexType></xsd:element>

RemarksThefooterelementisachildelementoftheprintSettingselement.Thefootertextshouldnotexceed255characters.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthefooterelement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

fragmentToInsertElement

ContainsalternateversionsofXMLdata(fragments).

Type

xsd:complexType

Structure

Name DescriptionchooseFragment (Requiredelement)SpecifiesanXMLfragment.

RemarksThefragmentToInsertelementisanoptionalelementoftheeditWithelement.

XMLfragmentsaresourcesofXMLdatathatcanbeusedwithinanassociatededitingcomponent.MorethanonechooseFragmentelementcanbedefinedwithinafragmentToInsertelement.

ThefragmentToInsertelementisusedbythexCollection,xOptional,andxReplaceeditingcomponents.

ExampleThefollowingisanexampleofthefragmentToInsertelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

ShowAll

getUserNameFromDataElement

AllowsusernamestobedeterminedbyanXPathqueryintothedatainthemaindatasourceorasecondarydatasourceandtobeassociatedwitharole.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

dataObject xsd:string No Thenameofthesecondarydatasourcewheretheusernamecanbefound.

string

select xsd:string Yes AnXPathqueryexpressionreturningoneormoredatanodescontainingtheusernames.

string

memberOf xsd:string Yes SpecifiestheroletobeassociatedwithauserwhoseusernameisreturnedbytheXPathquery.

string

Definition

<xsd:elementname="getUserNameFromData"><xsd:complexType><xsd:attributename="dataObject"type="xsd:string"use="optional"></xsd:attribute><xsd:attributename="select"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="memberOf"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthegetUserNameFromDataelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="Domain\username1"memberOf="A"/><xsf:userNamename="Domain\username2"memberOf="B"/><xsf:groupname="Domain\username3"memberOf="C"/></xsf:membership></xsf:roles>

groupElement

Associatesagroupwithaparticularrole.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

name xsd:string Yes Specifiesusersintheformof"domain\groupname"or"groupname".

string

memberOf xsd:string Yes Specifiestheroletobeassociatedwiththegroup.

string

Definition

<xsd:elementname="group"><xsd:complexType><xsd:attributename="name"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="memberOf"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksUserscanbeassignedrolesthroughgroupingthatcanbemanagedexternally,withoutrequiringaformupdate.GroupscanbesetupthroughtheActiveDirectorydirectoryservice.Permissionsspecifyingwhocanaccessthemembershipinformationcanbesetforgroups.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthegroupelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="Domain\username1"memberOf="A"/><xsf:userNamename="Domain\username2"memberOf="B"/><xsf:groupname="Domain\username3"memberOf="C"/></xsf:membership></xsf:roles>

headerElement

Specifiestheheadertext.

Typexsd:simpleType

ChildElementsNone.

AttributesNone.

Definition

<xsd:elementname="header"><xsd:complexTypemixed="true"><xsd:sequence><xsd:anyminOccurs="0"maxOccurs="unbounded"processContents="skip"/></xsd:sequence></xsd:complexType></xsd:element>

RemarksTheheaderelementisachildelementoftheprintSettingselement.Theheadertextshouldnotexceed255characters.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheheaderelement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

ShowAll

hwsAdapterElement

DefinestheMicrosoftBizTalk2004HumanWorkflowServices(HWS)dataadapter,whichcanbeusedtostartorextendanactivityflowandrespondtoatask.

Typexsd:complexType

ChildElements

Element DescriptionhwsOperation DefinestheHWSoperationtype,suchasaddingan

actiontoanewactivityflow,addinganactiontoanexistingactivityflow,andrespondingtoatask.

Attributes

Attribute Type Required Description PossibleValuesname xdTitle Yes Containsthe

nameofthedataadapter.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

wsdlUrl xsd:string Yes ContainstheUniformResourceLocator(URL)oftheHWSWebservice.

string

queryAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforqueryingthedatasource.CanbeomittedforthehwsAdapter,correspondingtoadefaultvalueof"no".

yes

no

submitAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforsubmittingtothedata

yes

no

source.Alwayssetto"yes"forthehwsAdapter.

Definition

<xsd:elementname="hwsAdapter"><xsd:complexType><xsd:choice><xsd:elementref="xsf:hwsOperation"/></xsd:choice><xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute><xsd:attributename="wsdlUrl"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute><xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

RemarksUponsubmit,thehwsAdapterautomaticallycreatesagloballyuniqueidentifier(GUID),asrequiredbytheHWSWebservice;encodestheXMLfile;andupdatestheprocessinginstructionsoftheXMLinstancefile.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthehwsAdapterelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:some/b:thing"dataObject="Aux1"/>

</xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

ShowAll

hwsOperationElement

DefinestheMicrosoftBizTalk2004HumanWorkflowServices(HWS)operationtype,suchasaddinganactiontoanewactivityflow,addinganactiontoanexistingactivityflow,andrespondingtoatask.

Typexsd:complexType

ChildElements

Element Descriptioninput SpecifiestheXMLformfile,whichisencodedandsubmitted

withtheHWSoperation.

Attributes

Attribute Type Required Description PossibleValuestype xsd:string Yes Specifies

theHWSoperationtype.

addActionToNewActivityFlow

addActionToActivityFlow

sendTaskResponse

typeID xsd:string Yes Containsthegloballyuniqueidentifier(GUID)fortheoperation.

string

serviceUrl xsd:string Yes SpecifiestheUniformResourceLocator(URL)locationoftheHWSWebservice.

string

Definition

<xsd:elementname="hwsOperation"><xsd:complexType><xsd:choice><xsd:elementref="xsf:input"/></xsd:choice><xsd:attributename="type"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="typeID"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="serviceUrl"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksUponsubmit,thehwsAdapterelementautomaticallycreatesagloballyuniqueidentifier(GUID),asrequiredbytheHWSWebservice;encodestheXMLfile;andupdatestheprocessinginstructionsoftheXMLinstancefilewiththenewGUID.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthehwsOperationelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:some/b:thing"dataObject="Aux1"/>

</xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

ShowAll

hwsWorkflowElement

ContainstheinformationtoenabletheWorkflowtaskpaneandtoenableindividualactionsandtasksassociatedwithaMicrosoftBizTalk2004HumanWorkflowServices(HWS)server.

Typexsd:complexType

ChildElements

Element Descriptionlocation (Required)ContainstheUniformResourceLocator

(URL)oftheHWSWebservice.allowedActions ContainstheHWSactionsenabledfortheform.allowedTasks ContainstheHWStasksenabledfortheform.

Attributes

Attribute Type Required DescriptionPossibleValues

taskpaneVisible xdYesNo No SpecifieswhethertheWorkflowtaskpaneisvisible.Defaultvalueis"yes".

yes

no

Definition

<xsd:elementname="hwsWorkflow"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:location"minOccurs="1"maxOccurs="1"/><xsd:elementref="xsf:allowedActions"minOccurs="1"maxOccurs="1"/><xsd:elementref="xsf:allowedTasks"minOccurs="0"maxOccurs="1"/></xsd:sequence><xsd:attributename="taskpaneVisible"type="xsf:xdYesNo"></xsd:attribute></xsd:complexType><xsd:uniquename="hws_actiontask_name"><xsd:selectorxpath="./xsf:allowedActions/xsf:action|./xsf:allowedTasks/xsf:task"/><xsd:fieldxpath="@name"/></xsd:unique></xsd:element>

RemarksForeveryactionandtaskincludedinthehwsWorkflowelement,abuttonisenabledontheWorkflowtaskpane;however,thebuttoneventmustbescriptedmanuallyforeachactionandtask.

InfoPathdoesnotsupportmultipleactionsinaformanddoesnotsupportHWSactivitymodels(predefinedsetsofactions).

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthehwsWorkflowelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

ShowAll

importParametersElement

Containsalltheparametersthatdefinehowtheimport(merge)formsfeatureworksfortheform.

Type

xsd:complexType

Structure

Name Descriptionenabled (Requiredattribute)Specifieswhetherformmerging

isenabledfortheform.importSource (Optionalelement)Specifiesallparameterstobe

usedwhenmergingaformofaspecificXMLSchemaintoadestinationform.

useScriptHandler (Optionalattribute)SpecifieswhethertousetheeventhandlerdefinedfortheOnMergeRequesteventwhenimporting(merging)forms.

RemarksTheimportParameterselementisanoptionalelementofthexDocumentClasselement.

ExampleThefollowingisanexampleoftheimportParameterselement:

<xsf:importParametersenabled="yes"useScriptHandler="yes"><xsf:importSourcename="MySource"schema="MySchema.xsd"transform="schematransform.xslt"/></xsf:importParameters>

ShowAll

importSourceElement

SpecifiesallparameterstobeusedwhenmergingaformofaspecificXMLSchemaintoadestinationform.

Type

xsd:complexType

Structure

Name Descriptionname (Requiredattribute)Identifiesthenameofthesourceformas

definedintheprocessinginstructionofthatform’sunderlyingXMLdocument.

schema (Requiredattribute)IdentifiestheXMLSchemafilethatshouldbeusedduringthemergeoperationtovalidatetheformbeingmerged.

transform (Requiredattribute)Identifiesthe.xsltfilethatshouldbeusedduringthemergeoperationwhenthesourceform(theonethatisbeingmergedin)matchestheXMLSchemaspecifiedinthecorrespondingschemaattribute.

RemarksTheimportSourceelementisanoptionalelementoftheimportParameterselement.

IftheimportSourceelementisnotdefined,thedefault.xsltfileisusedforalltransformationsduringamergeoperation.

ExampleThefollowingisanexampleoftheimportSourceelement:

<xsf:importParametersenabled="yes"<xsf:importSourcename=""schema="MySchema.xsd"transform="schematransform.xslt"/></xsf:importParameters>

ShowAll

initialXmlDocumentElement

ContainsareferencetotheXMLtemplatefilethatisusedforthecreationofanewformbasedontheformtemplate.

Type

xsd:complexType

Structure

Name Descriptioncaption (Requiredattribute)Definesthetextstringtobeused

asthenameoftheformintheTemplateGalleryandinthemostrecentlyusedlist.

customCategory (Optionalelement)SpecifiesthecategorythattheformtemplateappearsunderintheFillOutaFormtaskpane.

href (Requiredattribute)SpecifiestheUniformResourceLocator(URL)oftheXMLtemplatefiletobeusedwhenauserclicksFillOutaFormontheFilemenu.

RemarksTheinitialXmlDocumentelementisarequiredelementofthefileNewelement.

ExampleThefollowingisanexampleoftheinitialXmlDocumentelement:

<xsf:fileNew><xsf:initialXmlDocumentcaption="TravelReport"href="TravelReportTemplate.xml"/></xsf:fileNew>

ShowAll

inputElement

ContainsthesubstitutioninformationforpartsoftheinputSimpleObjectAccessProtocol(SOAP)messagetotheWebservice.

Type

xsd:complexType

Structure

Name Descriptionsource (Requiredattribute)Containsthenameoftheresource

fileintheformtemplatethatcontainstheXMLSchemafortheinputSOAPmessageoftheselectedoperationoftheWebservice.

partFragment (Optionalelement)DefinesonesubstitutiongroupforaspecificpartoftheinputSOAPmessage.

RemarksTheinputelementisanoptionalelementoftheoperationelement.

SpecifiedpartsintheSOAPmessagearereplacedwhentheformtemplateisfilledoutwithdatafromwithintheform.ItisusedwhenasecondarydatasourceispopulatedfromaWebservicecallandMicrosoftOfficeInfoPath2003needssomeinputargumentstomaketheWebservicecalls.

ExampleThefollowingisanexampleoftheinputelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:some/b:thing"dataObject="Aux1"/>

</xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

introElement

Containstheintroductionforthee-mailmessagewhentheformissubmittedbyusingtheemailAdapterelement.

Typexsd:complexType

ParentElements

Element DescriptionemailAdapter Parentelementthatcontainstheinformationneededto

submitanInfoPathformasanattachmenttoane-mailmessage,withaspecifiedsetofrecipients,asubject,andanintroduction.

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes Containsthevalueoftheintroelement.

string

Definition

<xsd:elementname="intro"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheintroelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="someone@example.com"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="someoneelse@example.com"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

ShowAll

listPropertiesElement

Identifiesthepropertiesthatshouldbeonalistviewofallformsbelongingtotheformtemplate.

Type

xsd:complexType

Structure

Name Descriptionfields (Optionalelement)Definesasetofoneormorefieldelements.

RemarksThelistPropertieselementisanoptionalelementofthexDocumentClasselement.

XMLdocumentsbelongingtoaformcanbeplacedinasinglefolderorformlibrary.Dependingontheunderlyingsupportinthefilesystemorserver,thisinformationcanbeusedtocreatemeaningfullistviewsonasetofforms.Forexample,whenMicrosoftOfficeInfoPath2003formsaresavedtoaWindowsSharePointServicesformlibrarythatisbasedonanInfoPathformtemplate,formpropertiesspecifiedinthissectionareautomaticallypromotedandmadeavailabletothedefaultviewoftheformlibrary.

ExampleThefollowingisanexampleofthelistPropertieselement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

ShowAll

locationElement

ContainstheUniformResourceLocator(URL)oftheMicrosoftBizTalk2004HumanWorkflowServices(HWS)Webservice.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

url xsd:string Yes ThelocationoftheHWSWebservice.

string

Definition

<xsd:elementname="location"><xsd:complexType><xsd:attributename="url"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksThelocationelementisachildelementofthehwsWorkflowelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthelocationelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

ShowAll

mainpaneElement

Determineswhatisdisplayedinthemainpane.

Type

xsd:complexType

Structure

Name Descriptiontransform (Requiredattribute)SpecifiestherelativeURLtotheXSL

Transformation(XSLT)thatisusedfortheview.

RemarksThemainpaneelementisarequiredelementoftheviewelement.

ThemainpaneelementisanoptionalelementoftheexternalViewelement.

Themainpaneisthemainformarea,asopposedtosecondaryuserinterfaceareassuchasthetaskpane.

ExampleThefollowingisanexampleofthemainpaneelement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

ThefollowingisanexampleofthemainpaneelementusedwithintheexternalViewelement:

<xsf:externalViews><xsf:externalViewname="SalesDoc"><xsf:mainpanetransform="myWordView.xsl"/></xsf:externalView><xsf:externalViews>

ShowAll

masterDetailElement

DefinestheXMLfragmentsthatformamasteranddetailrelationshipinaview'srepeatingtablesorrepeatingsections.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

master xsd:string No ContainstheXPathoftheXMLfragmentthatisboundtoamastertableorsection.

string

masterViewContext xsd:string No SpecifiesastringthatidentifiesanHTMLelementintheview.

string

masterKey xsd:string No ContainstheXPathofthefieldinthemasterXMLfragmentthatformstherelationshiptothedetailXMLfragment.

string

detailKey xsd:string No ContainstheXPathofthefieldinthedetailXMLfragmentthatformstherelationshiptothemasterXMLfragment.

string

Definition

<xsd:elementname="masterDetail"><xsd:complexType><xsd:attributename="master"type="xsd:string"></xsd:attribute><xsd:attributename="masterViewContext"type="xsd:string"></xsd:attribute><xsd:attributename="masterKey"type="xsd:string"></xsd:attribute><xsd:attributename="detailKey"type="xsd:string"></xsd:attribute></xsd:complexType></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthemasterDetailelement:

<xsf:editWithcaption="group2"xd:autogeneration="template"component="xCollection"><xsf:masterDetailmasterViewContext="CTRL1_5"master="my:group2"masterKey="my:field1"detailKey="my:field3"></xsf:masterDetail></xsf:editWith>

ShowAll

membershipElement

Associatesauserorgroupofuserswitharole.

Typexsd:complexType

ChildElements

Element DescriptiongetUserNameFromData Allowsusernamestobedeterminedbyan

XPathqueryintothedatainthemaindatasourceorasecondarydatasourceandtobeassociatedwitharole.

userName Definesausertoaparticularrole.group Defineswhichgroupauserbelongsto.

AttributesNone.

Definition

<xsd:elementname="membership"><xsd:complexType><xsd:choiceminOccurs="1"maxOccurs="unbounded"><xsd:elementref="xsf:getUserNameFromData"/><xsd:elementref="xsf:userName"/><xsd:elementref="xsf:group"/></xsd:choice></xsd:complexType></xsd:element>

RemarksInfoPathassociatesarolewiththecurrentuserbasedonthemembershiporderintheformdefinitionfile(.xsf).Developerscanmodifythisorderbyhandintheformdefinitionfile.Themembershipelementmustbeachildoftheroleselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthemembershipelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="Domain\username1"memberOf="A"/><xsf:userNamename="Domain\username2"memberOf="B"/><xsf:groupname="Domain\username3"memberOf="C"/></xsf:membership></xsf:roles>

menuElement

Containsinformationaboutthecustommenususedintheview.

Type

xsd:complexType

Structure

Name Descriptionbutton (Optionalelement)Definesabuttonthathasanassociated

action.caption (Requiredattribute)Usedasthecaptionforamenu.menu (Optionalelement)Containsinformationaboutthemenusused

withinamenu(cascadingmenus).

RemarksThemenuelementisanoptionalelementoftheview,toolbar,andmenuAreaelements.Multiplemenuscanbedeclaredforaform,andeachmenucancontainmultiplemenuorbuttonelements.

NoteTocreatecascadingmenus,amenuelementcanbenestedinsideanothermenuelement.

ExampleThefollowingisanexampleofthemenuelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

menuAreaElement

ContainsinformationabouttheMicrosoftOfficeInfoPath2003built-inmenususedintheview.

Type

xsd:complexType

Structure

Name Descriptionbutton (Optionalelement)Definesabuttonthathasanassociated

action.name (Requiredattribute)Correspondstooneofthebuilt-inInfoPath

top-levelmenus.menu (Optionalelement)Containsinformationaboutthemenusused

withinthemenuarea.

RemarksThemenuAreaelementisanoptionalelementoftheviewelement.

ThemenuAreaelementisanalogoustothetop-levelmenusfoundinInfoPathwhenfillingoutaform.MultiplebuttonsormenuscanbedeclaredwithinamenuAreaelement.Eachbuttonelementcreatesanadditionalmenuitemwithinthecorrespondingbuilt-inmenu,specifiedbythenameattributeofthemenuAreaelement,andhasanaction(orcommand)associatedwithit.IfamenuelementisnestedwithinamenuAreaelement,thiscreatesacascadingmenuoffofthebuilt-inmenu.

ExampleThefollowingisanexampleofthemenuAreaelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

messageElement

Containsthesignatureconfirmationmessagethatisshownwhenasignatureisappliedtotheformorsectionoftheform.

Typexsf:xdSignedDataBlockMessage

ParentElements

Element DescriptionsignedDataBlock Definesanodesetintheform'sunderlyingXML

document,towhichadigitalsignaturecanbeapplied.

ChildElementsNone.

AttributesNone.

Definition

<xsd:elementname="message"type="xsf:xdSignedDataBlockMessage"minOccurs="0"></xsd:element>

RemarksTheconfirmationmessageislimitedto255characters.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthemessageelement:

<xsf:documentSignatures><xsf:signedDataBlockname=”main”data=”my:myfields/my:subtree1|my:myfields/my:subtree2”signatureLocation=”my:mifields/sig:signatures/main”mode=”countersign”><xsf:message>Bypressingthe&quot;Sign&quot;buttonbelow,Iagreetobeboundtothetermsofthisdocument.</xsf:message></xsf:signedDataBlock></xsf:documentSignatures>

ShowAll

onLoadElement

ContainsoneruleSetelementthatisinvokedwhentheformisopened.

Typexsd:complexType

ChildElements

Element DescriptionruleSetActionDefinestheruleSetactionelementtobeinvoked.

AttributesNone.

Definition

<xsd:elementname="onLoad"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:ruleSetAction"minOccurs="1"maxOccurs="1"/></xsd:sequence></xsd:complexType><xsd:keyrefname="load_ruleSetAction"refer="xsf:ruleset_name_key"><xsd:selectorxpath="./xsf:ruleSetAction"/><xsd:fieldxpath="@ruleSet"/></xsd:keyref></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheonLoadelement:

<xsf:onLoad><xsf:ruleSetActionruleSet="RuleSet4"/></xsf:onLoad>

ShowAll

openNewDocumentActionElement

Definesaformcreateaction.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

solutionURI xsd:anyURI Yes TheUniformResourceIdentifier(URI)ofthesolutiononwhichthenewformwillbebased.

anyURI

Definition

<xsd:elementname="openNewDocumentAction"><xsd:complexType><xsd:attributename="solutionURI"type="xsd:anyURI"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksTheopenNewDocumentActionelementisachildelementoftheruleelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheopenNewDocumentActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

ShowAll

operationElement

Definestheoperation(method)oftheWebservicetobeusedforretrievingandsubmittingdata.

Type

xsd:complexType

Structure

Name Descriptionname (Requiredattribute)ContainstheuniquenameoftheWeb

servicemethod.serviceUrl (Requiredattribute)ContainstheWebserviceUniform

ResourceLocator(URL)towhichtherequestshouldbesent.

soapAction (Requiredattribute)ContainsthevalueoftheSOAPActionattributeintheSimpleObjectAccessProtocol(SOAP)requestmessage.

input (Optionalelement)ContainsthesubstitutioninformationforpartsoftheinputSOAPmessagetotheWebservice.

RemarksTheoperationelementisarequiredelementofthewebServiceAdapterelement.

ExampleThefollowingisanexampleoftheoperationelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

ShowAll

overrideElement

DefinesoneoverridingerrormessageforXMLSchemadatatypeerrorsforanindividualXMLDocumentObjectModel(DOM)node.

Type

xsd:complexType

Structure

Name DescriptionerrorMessage (Requiredelement)Specifiestheerrormessagethat

shouldbereturnedifthevalueofthespecifiedXMLDOMnodeisconsideredtobeinvalid.

match (Requiredattribute)IdentifiestheXMLDOMnodeforwhichtheerrormessageoverrideisdefined.

RemarksTheoverrideelementisanoptionalelementoftheschemaErrorMessageselement.

ExampleThefollowingisanexampleoftheoverrideelement:

<xsf:schemaErrorMessages><xsf:overridematch="/sampleData/number"><xsf:errorMessageshortMessage="InvalidNumber.">Thevalueenteredmustbeavalidnumber.</xsf:errorMessage></xsf:override></xsf:schemaErrorMessages>

packageElement

ContainsinformationaboutallofthefilesusedinaMicrosoftOfficeInfoPath2003form.

Type

xsd:complexType

Structure

Name Descriptionfiles (Requiredelement)Identifiesalistoffilesthatareusedbyan

InfoPathform.

RemarksThepackageelementisarequiredelementofthexDocumentClasselement.

ExampleThefollowingisanexampleofthepackageelement:

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

ShowAll

partFragmentElement

DefinesonesubstitutiongroupforaspecificpartoftheinputSimpleObjectAccessProtocol(SOAP)message.

Type

xsd:complexType

Structure

Name Descriptionmatch (Requiredattribute)ContainsanXPathexpressionthat

identifiestheelementsandattributesinsidetheinputSOAPmessagethataretobereplacedatruntime.

replaceWith (Requiredattribute)ContainsanXPathexpressionthatidentifiesthevaluesinthesourcedocumentthatshouldbeusedtoreplacepartsoftheinputSOAPmessage.

sendAsString (Optionalattribute)SpecifiesthatthedataissubmittedasastringthroughthewebServiceAdapterdataadapter.

dataObject (Optionalattribute)SpecifiesthenameofthedataobjecttousewhensubmittingapartFragmentelementtoaMicrosoftBiztalk2004HumanWorkflowServices(HWS)server.

filter (Optionalattribute)SpecifiestheXPathexpressionofthestructuredXMLsubtreewhensubmittingasubsetoftheXMLdata.

RemarksThepartFragmentelementisanoptionalelementoftheinputelement.

MultiplepartFragmentelementsareallowed.

ExampleThefollowingisanexampleofthepartFragmentelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"><xsf:partFragmentmatch="/dfs:myFields/dfs:dataFields/s0:IsPrime/s0:inValue"replaceWith="/dfs:myFields/dfs:dataFields/s0:IsPrime"/></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

permissionsElement

AssertsthepermissionstheInfoPathformrequiresfortheActiveXcontrolsintheview.

Typexsd:complexType

ChildElements

Element DescriptionallowedControl SpecifiestheActiveXcontrolsthatareallowedtobe

instantiated.

AttributesNone.

Definition

<xsd:elementname="permissions"><xsd:complexType><xsd:choiceminOccurs="0"maxOccurs="unbounded"><xsd:elementref="xsf:allowedControl"/></xsd:choice></xsd:complexType></xsd:element>

RemarksThepermissionselementalsoprovidesinstallationinformationforActiveXcontrolsthatarenotalreadyinstalledontheuser'scomputer.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthepermissionselement:

<xsf:permissions><xsf:allowedControlcabFile="{84F32C01-78D8-4B93-8ED4-106DA70224C2}.cab”clsid="{84F32C01-78D8-4B93-8ED4-106DA70224C2}"version="1,0,0,1"/><xsf:allowedControlclsid="{F08DF954-8592-11D1-B16A-00C0F0283630}"/></xsf:permissions>

ShowAll

printElement

Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstoprinttheform.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

ui xsf:xdEnabledDisabled Yes Setswhethertheusercanprinttheform.

enabled

disabled

Definition

<xsd:elementname="print"><xsd:complexType><xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksTheprintelementisanoptionalelementofthefeatureRestrictionselement.Ifthiselementisnotincludedintheformdefinitionfile(.xsf),theusercanusetheform'smenus,toolbars,orkeyboardshortcutstoprinttheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheprintelement:

<xsf:featureRestrictions><xsf:saveui="disabled"/><xsf:sendMailui="disabled"/><xsf:exportToWebui="disabled"/><xsf:exportToExcelui="disabled"/><xsf:printui="enabled"/><xsf:autoRecoveryfeature="disabled"/></xsf:featureRestrictions>

printSettingsElement

Specifiestheprintersettingsusedwhenprintingtheview.

Type

xsd:complexType

Structure

Name DescriptionbottomMargin (Optionalattribute)Specifiesthebottom

margin.collate (Optionalattribute)Specifieswhetherthepaper

iscollated.copies (Optionalattribute)Specifiesthenumberof

copies.footer (Optionalattribute)Specifiesthefootertext.header (Optionalattribute)Specifiestheheadertext.leftMargin (Optionalattribute)Specifiestheleftmargin.marginUnitsType (Optionalattribute)Specifiesthemarginunit

size.orientation (Optionalattribute)Specifiestheorientation.pageRangeEnd (Optionalattribute)Specifiesthelastpageto

beprinted.pageRangeStart (Optionalattribute)Specifiesthefirstpageto

beprinted.paperSize (Optionalattribute)Specifiesthesizeofthe

paper.paperSource (Optionalattribute)Specifiesthesourceofthe

paper.printerName (Optionalattribute)Specifiesthenameofthe

printer.printerSpecificSettings (Optionalattribute)Specifiesprinterspecific

settings.rightMargin (Optionalattribute)Specifiestherightmargin.topMargin (Optionalattribute)Specifiesthetopmargin.

RemarksTheprintSettingselementisanoptionalelementoftheviewelement.

ExampleThefollowingisanexampleoftheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

ShowAll

propertyElement

Definesonespecificpropertyforthespecifiedfile.

Type

xsd:complexType

Structure

Name Descriptionname (Requiredattribute)Definesthenameoftheproperty.type (Requiredattribute)Definesthetypeoftheproperty.value (Requiredattribute)Forsimpleproperties,specifiesavaluefor

theproperty.Forcomplexandmulti-valuedproperties,thespecifiedvalueisdefinedasacontainerXMLtreeusinganopencontentmodel.

RemarksThepropertyelementisanoptionalelementofthefilePropertieselement.

ExampleThefollowingisanexampleofthepropertyelement:

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

ShowAll

queryElement

Associatesadataadapterwithadataobjectoraform'sunderlyingXMLdocument.

Type

xsd:complexType

Structure

Name DescriptionadoAdapter (Optionalelement)DefinesanActiveXData

Objects(ADO)dataadapterthatretrievesdatafromanADOdatasourceforthespecifieddataobject.

webServiceAdapter (Optionalelement)DefinesaWebservicedataadapterthatretrievesdatafromaWebserviceforthespecifieddataobject.

xmlFileAdapter (Optionalelement)Definesan.xmlfiledataadapterthatretrievesdatafroman.xmlfileforthespecifieddataobject.

queryAction (Optionalelement)Definesadataconnectionqueryaction.

sharepointListAdapter (Optionalelement)ContainsthedataadapterinformationtoqueryaSharePointlistorlibrary.

RemarksThequeryelementisanoptionalelementofthexDocumentClasselementandthedataObjectelement.

Onlyonedataadaptercanbespecifiedinthequeryelement.

ExampleThefollowingisanexampleofthequeryelement:

<xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query>

ShowAll

queryElement(dataObjectElement)

Associatesadataadapterwithadataobject.

Typexsd:complexType

ParentElements

Element DescriptiondataObject DefinesasecondarydataobjectthatisusedinaMicrosoft

OfficeInfoPathform.

ChildElements

Element DescriptionadoAdapter (Optionalelement)DefinesanActiveXData

Objects(ADO)dataadapterthatretrievesdatafromanADOdatasourceforthespecifieddataobject.

webServiceAdapter (Optionalelement)DefinesaWebservicedataadapterthatretrievesdatafromaWebserviceforthespecifieddataobject.

xmlFileAdapter (Optionalelement)Definesan.xmlfiledataadapterthatretrievesdatafroman.xmlfileforthespecifieddataobject.

sharepointListAdapter (Optionalelement)ContainsthedataadapterinformationtoqueryaSharePointlistorlibrary.

AttributesNone.

Definition

<xsd:elementname="query"><xsd:complexType><xsd:choice><xsd:elementref="xsf:adoAdapter"/><xsd:elementref="xsf:webServiceAdapter"/><xsd:elementref="xsf:xmlFileAdapter"/><xsd:elementref="xsf:sharepointListAdapter"/></xsd:choice></xsd:complexType></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthequeryelement:

<xsf:dataObjects><xsf:dataObjectname="EmployeeNames"schema="EmployeeNames.xsd"initOnLoad="yes"><xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query></xsf:dataObject></xsf:dataObjects>

queryActionElement

Definesadataconnectionqueryaction.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

adapter xsd:string Yes Containsthenameofthedataadaptertoquery.

string

Definition

<xsd:elementname="queryAction"><xsd:complexType><xsd:attributename="adapter"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksThequeryActionelementisachildelementoftheruleelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthequeryActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

ShowAll

roleElement

Definesrole.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required Description PossibleValuesname xdRoleName Yes Usedto

identifytherole.

SamerestrictionasxdViewName.

Definition

<xsd:elementname="role"><xsd:complexType><xsd:attributename="name"type="xsf:xdRoleName"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksEachtimearoleiscreatedforaform,acorrespondingroleelementiscreatedintheformdefinitionfile(.xsf).Youcanassignuserstorolesbyusingusernames,groups,andXPathusernames.Userscanbeselectedforrolesinoneoffourways:

Initiator—rolefornewdocuments.

Username—NTdomainusers(intranetortrustedonly).

XPathusername—usernamesstoredinXMLdata(intranetortrustedonly).

Group—ActiveDirectorydirectoryservicegroups(intranetortrustedonly).

InfoPathmakestheuserassignmentbyfollowingthemembershiporderintheformdefinitionfile.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheroleelement:

<rolesinitiator=”xsd:string”default=”xsd:string”hideStatusBarDisplay="xsf:xdYesNo"><rolename=”xsf:xdRoleName”/><membership><getUserNameFromDatadataObject=”xsd:string”select=”xsd:string”memberOf=”xsd:string”/><userNamename=”xsd:string”memberOf=”xsd:string”/><userNamename=”xsd:string”memberOf=”xsd:string”/><groupname=”xsd:string”memberOf=”xsd:string”/></membership></roles>

rolesElement

Definesroles.

Typexsd:complexType

ChildElements

Element Descriptionrole Definesrole.membershipMapsauserorgroupofuserstoarole.

Attributes

Attribute Type Required DescriptionPossibleValues

default xsd:string Yes Specifiesthenameidentifieroftherolethatisthedefaultrole.

string

initiator xsd:string No Specifiesthenameidentifieroftherolechosentobetheinitiatorrole.

string

hideStatusBarDisplay xdYesNo No Specifieswhetherthecurrentroleshouldbedisplayedinthestatusbar.

yes

no

Definition

<xsd:elementname="roles"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:role"minOccurs="1"maxOccurs="unbounded"/><xsd:elementref="xsf:membership"minOccurs="0"maxOccurs="1"/></xsd:sequence><xsd:attributename="default"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="initiator"type="xsd:string"use="optional"></xsd:attribute><xsd:attributename="hideStatusBarDisplay"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType><!--rolenamesmustbeunique--><xsd:uniquename="roles_name_unique"><xsd:selectorxpath="./xsf:role"/><xsd:fieldxpath="@name"/></xsd:unique><!--fieldsmustreferenceexistingrole--><xsd:keyname="role_name_key"><xsd:selectorxpath="./xsf:role"/><xsd:fieldxpath="@name"/></xsd:key><xsd:keyrefname="role_default"refer="xsf:role_name_key"><xsd:selectorxpath="."/><xsd:fieldxpath="@default"/></xsd:keyref><xsd:keyrefname="role_initiator"refer="xsf:role_name_key"><xsd:selectorxpath="."/><xsd:fieldxpath="@initiator"/></xsd:keyref><xsd:keyrefname="role_membership"refer="xsf:role_name_key">

<xsd:selectorxpath="./xsf:membership/*"/><xsd:fieldxpath="@memberOf"/></xsd:keyref></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheroleselement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="Domain\username1"memberOf="A"/><xsf:userNamename="Domain\username2"memberOf="B"/><xsf:groupname="Domain\username3"memberOf="C"/></xsf:membership></xsf:roles>

ShowAll

ruleElement

Definesanactioninvokedafteraneventhasoccurredintheform.

Typexsd:complexType

ChildElements

Element DescriptionassignmentAction Definesanactiontosetthevalueofa

field.closeDocumentAction Definesaformcloseaction.dialogBoxExpressionAction DefinesanXPathexpressiontobe

displayedinadialogbox.dialogBoxMessageAction Definesaliteralmessagetobedisplayed

inadialogbox.exitRuleSet Anelementwhich,ifpresentattheendof

therule,stopsfurtherruleprocessingoftheentireruleSetwhentheruleisexecuted.

openNewDocumentAction Definesaformcreateaction.queryAction Definesadataconnectionqueryaction.submitAction Definesaformsubmitaction.switchViewAction Definesaviewswitchaction.

Attributes

Attribute Type Required DescriptionPossibleValues

caption xsd:string Yes Containsthenameoftheruleasitappearsintheuserinterface.

string

condition xsd:string No DefinestheXPathexpression,evaluatedasaBooleanvalue,thatdetermineswhethertheassociatedactionwillbeinvoked.

string

isEnabled xdYesNo No Specifieswhethertheruleisenabledfortheform.Thedefaultvalueis"yes".

yes

no

Definition

<xsd:elementname="rule"><xsd:complexType><xsd:sequence><xsd:choiceminOccurs="0"maxOccurs="unbounded"><xsd:elementref="xsf:dialogBoxMessageAction"/><xsd:elementref="xsf:dialogBoxExpressionAction"/><xsd:elementref="xsf:switchViewAction"/><xsd:elementref="xsf:assignmentAction"/><xsd:elementref="xsf:queryAction"/><xsd:elementname="submitAction"><xsd:complexType><xsd:attributename="adapter"type="xsf:xdTitle"use="required"></xsd:attribute></xsd:complexType></xsd:element><xsd:elementref="xsf:openNewDocumentAction"/><xsd:elementref="xsf:closeDocumentAction"/></xsd:choice><xsd:elementname="exitRuleSet"minOccurs="0"><xsd:complexType/></xsd:element></xsd:sequence><xsd:attributename="caption"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="condition"type="xsd:string"use="optional"></xsd:attribute><xsd:attributename="isEnabled"type="xsf:xdYesNo"use="optional"default="yes"></xsd:attribute></xsd:complexType></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheruleelement:

<xsf:ruleSets><xsf:ruleSetname="RuleSet1"><xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetreceipts!</xsf:dialogBoxMessageAction><xsf:openNewDocumentActionsolution="urn:approvalForm"/><xsf:exitRuleSet/></xsf:rule><xsf:rulecaption="AlwaysSubmit"isEnabled="no"><xsf:submitActionadapter="ExpenseDatabase"/></xsf:rule></xsf:ruleSet>

<xsf:ruleSetname="RuleSet2"><xsf:rulecaption="Lookupcontact"><xsf:queryActionadapter="Contacts"/></xsf:rule></xsf:ruleSet></xsf:ruleSets>

ShowAll

ruleSetElement

Containsoneormoreruleelements.

Typexsd:complexType

ChildElements

Element Descriptionrule Definesanactioninvokedafteraneventhasoccurredinthe

form.

Attributes

Attribute Type Required DescriptionPossibleValues

name xsd:string Yes ContainsthenameoftheruleSetelement.

string

Definition

<xsd:elementname="ruleSet"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:rule"minOccurs="1"maxOccurs="unbounded"/></xsd:sequence><xsd:attributename="name"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheruleSetelement:

<xsf:ruleSets><xsf:ruleSetname="RuleSet1"><xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetreceipts!</xsf:dialogBoxMessageAction><xsf:openNewDocumentActionsolution="urn:approvalForm"/><xsf:exitRuleSet/></xsf:rule><xsf:rulecaption="AlwaysSubmit"isEnabled="no"><xsf:submitActionadapter="ExpenseDatabase"/></xsf:rule></xsf:ruleSet>

<xsf:ruleSetname="RuleSet2"><xsf:rulecaption="Lookupcontact"><xsf:queryActionadapter="Contacts"/></xsf:rule></xsf:ruleSet></xsf:ruleSets>

ruleSetActionElement

DefinestheruleSetactionelementtobeinvoked.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

ruleSet xsd:string Yes ContainsthenameoftheruleSettobeinvoked.

string

Definition

<xsd:elementname="ruleSetAction"><xsd:complexType><xsd:attributename="ruleSet"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksTheruleSetActionelementisachildofthesubmit,domEventHandler,onLoad,andbuttonelements.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheruleSetActionelement:

<xsf:onLoad><xsf:ruleSetActionruleSet="RuleSet4"/></xsf:onLoad>

ruleSetsElement

ContainsoneormoreruleSetelements.

Typexsd:complexType

ChildElements

Element DescriptionruleSet Containsoneormoreruleelements.

AttributesNone.

Definition

<xsd:elementname="ruleSets"><xsd:complexType><xsd:sequence><xsd:elementref="xsf:ruleSet"minOccurs="0"maxOccurs="unbounded"/></xsd:sequence></xsd:complexType><xsd:uniquename="ruleSets_name_unique"><xsd:selectorxpath="./xsf:ruleSet"/><xsd:fieldxpath="@name"/></xsd:unique></xsd:element>

RemarksTheruleSetselementisanoptionalelementofthexDocumentClasselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheruleSetselement:

<xsf:ruleSets><xsf:ruleSetname="RuleSet1"><xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetreceipts!</xsf:dialogBoxMessageAction><xsf:openNewDocumentActionsolution="urn:approvalForm"/><xsf:exitRuleSet/></xsf:rule><xsf:rulecaption="AlwaysSubmit"isEnabled="no"><xsf:submitActionadapter="ExpenseDatabase"/></xsf:rule></xsf:ruleSet>

<xsf:ruleSetname="RuleSet2"><xsf:rulecaption="Lookupcontact"><xsf:queryActionadapter="Contacts"/></xsf:rule></xsf:ruleSet></xsf:ruleSets>

ShowAll

saveElement

ShowswhethertheSaveusingcustomcodecheckboxoptionisenabled.

Typexsd:complexType

ChildElements

Element DescriptionuseScriptHandler Specifiesthatthesubmit,save,orversionupgrade

operationwillbehandledusingformcode.

AttributesNone.

Definition

<xsd:elementname="save"><xsd:complexType><xsd:choiceminOccurs="0"maxOccurs="1"><xsd:elementref="xsf:useScriptHandler"/></xsd:choice></xsd:complexType></xsd:element>

RemarksIftheSaveusingcustomcodecheckboxoptionisenabled,the<xsf:save><xsf:useScriptHandler/></xsf:save>elementswillbeaddedtotheformdefinitionfile(.xsf)asachildofthexDocumentClasselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesaveelement:

<xsf:save><xsf:useScriptHandler/></xsf:save>

ShowAll

saveElement(featureRestrictionsElement)

Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstosavetheform.

Typexsd:complexType

ParentElements

Element DescriptionfeatureRestrictions Specifieswhethertheusercanusetheform's

menus,toolbars,orkeyboardshortcutstosavetheform,exporttheform,printtheform,orsendtheformasane-mailattachment.

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

ui xsf:xdEnabledDisabled Yes Setswhethertheusercansavetheform.

enabled

disabled

Definition

<xsd:elementname="save"minOccurs="0"><xsd:complexType><xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksThesaveelementisanoptionalelementofthefeatureRestrictionselement.Ifthiselementisnotincludedintheformdefinitionfile(.xsf),thentheusercanusetheform'smenus,toolbars,orkeyboardshortcutstosavetheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesaveelement:

<xsf:featureRestrictions><xsf:saveui="disabled"/><xsf:sendMailui="disabled"/><xsf:exportToWebui="disabled"/><xsf:exportToExcelui="disabled"/><xsf:printui="enabled"/><xsf:autoRecoveryfeature="disabled"/></xsf:featureRestrictions>

ShowAll

schemaErrorMessagesElement

ContainscustomerrormessagesusedtooverrideXMLSchemadatatypeerrors.

Type

xsd:complexType

Structure

Name Descriptionoverride (Optionalelement)Definesoneoverridingerrormessagefor

XMLSchemadatatypeerrorsforanindividualXMLDocumentObjectModel(DOM)node.

RemarksTheschemaErrorMessageselementisanoptionalelementofthexDocumentClasselement.

ExampleThefollowingisanexampleoftheschemaErrorMessageselement:

<xsf:schemaErrorMessages><xsf:overridematch="/sampleData/number"><xsf:errorMessageshortMessage="InvalidNumber.">Thevalueenteredmustbeavalidnumber.</xsf:errorMessage></xsf:override></xsf:schemaErrorMessages>

ShowAll

scriptElement

Definesthesourcescriptingfilecontainingallthedata-levelscriptcontentreferencedintheform.

Type

xsd:complexType

Structure

Name Descriptionsrc (Requiredattribute)ProvidesarelativeURLwithintheform

templatetothespecifiedscriptsourcefile.

RemarksThescriptelementisanoptionalelementofthescriptselement.

ExampleThefollowingisanexampleofthescriptelement:

<xsf:scriptslanguage="jscript"><xsf:scriptsrc="myscripts.js"/></xsf:scripts>

ShowAll

scriptsElement

Definesthesourceofallbusinesslogicscriptsusedatthedocumentlevelintheform.

Type

xsd:complexType

Structure

Name Descriptionlanguage (Requiredattribute)Definesthescriptlanguage

usedinthebusinesslogicsourcefiles.script (Optionalelement)Definesthesourcescripting

filecontainingallthedata-levelscriptcontentreferencedintheform.

enforceScriptTimeout (Optionalelement)Specifieswhethertoenableordisableatime-outperiodforscripts.

RemarksThescriptselementisanoptionalelementofthexDocumentClasselement.

Therecanpotentiallybemorethanonescriptelementinthescriptselement;however,theyshouldallbewritteninthesamescriptinglanguage.Alldefinedscriptsourcesareconcatenatedandloadedintoasinglescriptengineenvironmentwhentheformisbeingfilledout.Thismeansthatduplicatefunctionsandpropertynamesareresolvedbydefaultbythescriptengine,andthelastdeclarationistheonethatisused.Formdevelopersmustensureuniquenamesacrossscriptingsourcefilesthatareusedinaform.

Inordertoaddencodedjscriptfilestoaform,youneedtoedittheformdefinitionfile(.xsf)tochangethelanguagepropertyinthescriptselement.Afterthepropertyhasbeenupdated,thescriptssectioninthe.xsffilewilllooklikethefollowing:

<xsf:scriptslanguage="jscript.encode"> <xsf:scriptsrc="scriptenc.js"></xsf:script></xsf:scripts>

Thescriptselementisnotpresentinthe.xsffileiftheformusesmanagedcode.

ExampleThefollowingisanexampleofthescriptselement:

<xsf:scriptslanguage="jscript"enforceScriptTimeout="no"><xsf:scriptsrc="internal.js"/><xsf:scriptsrc="script.js"/></xsf:scripts>

ShowAll

sendMailElement

Specifieswhethertheusercanusetheform'smenus,toolbars,orkeyboardshortcutstosendtheformasanemailattachment.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

ui xdEnabledDisabled required Setswhethertheusercansendtheformasanemailattachment.

enabled

disabled

Definition

<xsd:elementname="sendMail"><xsd:complexType><xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksThesendMailelementisanoptionalelementofthefeatureRestrictionselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesendMailelement:

<xsf:featureRestrictions><xsf:saveui="disabled"/><xsf:sendMailui="disabled"/><xsf:exportToWebui="disabled"/><xsf:exportToExcelui="disabled"/><xsf:printui="enabled"/><xsf:autoRecoveryfeature="disabled"/></xsf:featureRestrictions>

ShowAll

sharepointListAdapterElement

ContainsthedataadapterinformationtoqueryaSharePointlistorlibrary.

Typexsd:complexType

ChildElements

Element Descriptionfield Containsfieldmappinginformationforeachfieldina

SharePointlistandthecorrespondingnameusedinMicrosoftOfficeInfoPath2003ServicePack1.

Attributes

Attribute Type Required Description PossibleValuesname xdTitle Yes Containsthenameof

thesharepointListAdapterandisusedasthesecondarydatasourcename.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

siteUrl xsd:string Yes ContainstheUniformResourceLocator(URL)oftheSharePointsite.

string

sharepointGuid xsd:string Yes ContainstheGUIDoftheSharePointlist.

string

infopathGroup xsd:string Yes ContainsthenameofthegroupunderwhichallfieldsintheSharePointlistwillbestored.

string

queryAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforqueryingthedatasource.Alwayssetto"yes"forthesharepointListAdapter.

yes

no

submitAllowed xdYesNo No Specifieswhethertheadaptercanbeusedforsubmittingtothedatasource.OmittedforthesharepointListAdapter,correspondingtoadefaultvalueof"no".

yes

no

Definition

<xsd:elementname="sharepointListAdapter"><xsd:complexType><xsd:sequence><xsd:elementname="field"minOccurs="0"maxOccurs="unbounded"><xsd:complexType><xsd:attributename="sharepointName"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="infopathName"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="isLookup"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType></xsd:element></xsd:sequence><xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute><xsd:attributename="siteUrl"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="sharepointGuid"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="infopathGroup"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute><xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

RemarksEachfieldintheSharePointlistthatisreturnedbythedataadapterwillhaveafieldelement.ThesharepointListAdaptercanonlybeusedasasecondarydatasourceanddoesnotsupportasubmitaction.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesharepointListAdapterelement:

<xsf:sharepointListAdaptername="StatusReportlibrary"siteUrl=”http://xyzco/reports/”sharepointGuid="{ABD2E239-0EE7-48F4-B506-C38A1728E195}"infopathGroup="XyzReportsLibrary"queryAllowed="yes><xsf:fieldsharepointName="File_x0020_Type"infopathName="Type"></xsf:field><xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"></xsf:field></xsf:sharepointListAdapter>

ShowAll

signedDataBlockElement

Definesanodesetintheform'sunderlyingXMLdocumenttowhichadigitalsignaturecanbeapplied.

Typexsd:complexType

ChildElements

Element Descriptionmessage Thesignatureconfirmationmessageshownwhenadigital

signatureisappliedtotheformortoasectionoftheform.

Attributes

Attribute Type Required Descriptionname xdSignedDataBlockName Yes Containsthe

nameofthesignedDataBlockelement.

data xsd:string Yes ContainsanXPathmatchexpressionthatdefinesthenodesettowhichthesignaturewillbeapplied.

signatureLocation xsd:string Yes ContainsanXPathexpressionthatpointstotheXMLDocumentObjectModel(DOM)nodewithintheform'sunderlyingXMLdocumentthatisusedforstoringthedigitalsignature.

mode xdSignatureRelationEnum Yes SpecifiesthesignaturerelationshipforthesignedDatablockelement.Thedefaultis"single".

Definition

<xsd:elementname="signedDataBlock"><xsd:complexType><xsd:sequence><xsd:elementname="message"type="xsf:xdSignedDataBlockMessage"minOccurs="0"></xsd:element></xsd:sequence><xsd:attributename="name"type="xsf:xdSignedDataBlockName"use="required"></xsd:attribute><xsd:attributename="data"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="signatureLocation"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="mode"type="xsf:xdSignatureRelationEnum"use="required"></xsd:attribute></xsd:complexType><xsd:uniquename="signedDataBlock_name_unique"><xsd:selectorxpath="."/><xsd:fieldxpath="@name"/></xsd:unique></xsd:element>

RemarksThenodesetmustbetheunionofconnectedsubtrees.IfanonleafnodeisincludedinasignedDataBlock,thenallchildrenmustbeincluded.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesignedDataBlockelement:

<xsf:documentSignatures><xsf:signedDataBlockname=”main”data=”my:myfields/my:subtree1|my:myfields/my:subtree2”signatureLocation=”my:mifields/sig:signatures/main”mode=”countersign”><xsf:message>Bypressingthe&quot;Sign&quot;buttonbelow,Iagreetobeboundtothetermsofthisdocument.</xsf:message></xsf:signedDataBlock></xsf:documentSignatures>

ShowAll

solutionPropertiesElement

Containsdesign-timeinformationaboutaMicrosoftOfficeInfoPath2003form.

Type

xsd:complexType

Structure

Name DescriptionallowCustomization (Optionalattribute)Indicateswhether

theformcanbemodifiedorcustomized.automaticallyCreateNodes (Optionalattribute)Indicateswhether

XMLDocumentObjectModel(DOM)nodeswillbeautomaticallygeneratedwhencontrolsareinsertedintheviewindesignmode.

fullyEditableNamespace (Optionalattribute)IdentifiesthenamespaceofanXMLSchemaintheformtemplatethatcanbeentirelymodifiedinInfoPathdesignmode.

lastOpenView (Optionalattribute)IdentifiesthenameoftheviewthatwaslastopeninInfoPathwhendesigningaform.

lastVersionNeedingTransform (Optionalattribute)Identifies,temporarily,thevalueofthemaxToVersionUpgradeattributeinthedocumentVersionUpgradeelementforupgradewithan.xsltfileifscriptingcodeisbeingusedfortheupgrade.

scriptLanguage (Optionalattribute)Identifiesthenameofthescriptinglanguageusedtoimplementthebusinesslogicoftheform.

publishSaveUrl (Optionalattribute)ContainsthelocationofthesavedformtemplateifdifferentfromthevalueofthepublishUrlattribute.

RemarksThesolutionPropertieselementisanoptionalelementoftheapplicationParameterselement.

ExampleThefollowingisanexampleofthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.1.0.10"fullyEditableNamespace="urn:names?pace1:mynames"/></xsf:applicationParameters>

ShowAll

subjectElement

Containsthesubjectlineofthee-mailmessagewhentheformissubmittedusingtheemailAdapterelement.

Typexsd:complexType

ParentElements

Element DescriptionemailAdapter Parentelementthatcontainstheinformationneededto

submitanInfoPathformasanattachmenttoane-mailmessage,withaspecifiedsetofrecipients,asubject,andanintroduction.

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes Containsthevalueofthesubjectelement.

string

valueType xdExpressionLiteral No SpecifieswhetherthevalueattributeisinterpretedasanXPathexpressionoraliteralstring.

expression

literal

Definition

<xsd:elementname="subject"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesubjectelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="someone@example.com"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="someoneelse@example.com"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

ShowAll

submitElement

Containsinformationaboutthesubmissionfunctionalityofaform.

Type

xsd:complexType

Structure

Name Descriptioncaption (Optionalattribute)Definesthenameofthe

submitbuttonandcorrespondingmenuitemthatwillappearontheFilemenuwhenauserisfillingouttheform.

disableMenuItem (Optionalattribute)Specifieswhetherthemenuitemforthesubmitoperationshouldbedisabled.

errorMessage (Optionalelement)Specifiesthetexttobeusedintheerrormessage.IftheshowStatusDialogattributeofthesubmitelementissetto"no",thiselementwillbeignored.

onAfterSubmit (Optionalattribute)Specifieswhethertheformshouldbeclosed,keptopen,orifanewformshouldbecreatedafterasuccessfulsubmission.

showSignatureReminder (Optionalattribute)Specifieswhetheradialogboxshouldbedisplayedtoprompttheusertodigitallysigntheformbeforesubmittingit.

showStatusDialog (Optionalattribute)Specifieswhetherthestatusdialogboxshouldbeshownafterthesubmitoperation.Valuesinclude"yes"and"no".Thedefaultvaluesis"yes".

successMessage (Optionalelement)Specifiesthetexttobeusedtonotifytheuserthatthesubmissionwassuccessful.

useHttpHandler (Optionalelement)SpecifiesthattheformistobesubmittedtothespecifiedUniformResourceLocator(URL)usingthespecifiedHTTPmethod.

useScriptHandler (Optionalelement)Specifiesthattheformis

tobesubmittedbyscriptingcodeintheassociatedscriptfile.SubmitcodemustbewrittenintheOnSubmitRequesteventhandlerintheform'sprimaryscriptingfile.

useQueryAdapter (Optionalelement)Specifiesthattheformistobesubmittedtothesamedataadapterasspecifiedinthequeryelement.

webServiceAdapter (Optionalelement)SpecifiesthattheformistobesubmittedtoaWebserviceadapter.

submitAction (Optionalelement)Specifiesthedataadapterusedtosubmittheform.

RemarksThesubmitelementisanoptionalelementofthexDocumentClasselement.

ExampleThefollowingisanexampleofthesubmitelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useScriptHandler/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

ShowAll

submitActionElement(ruleElement)

Definesaformsubmitaction.

Typexsd:complexType

ParentElements

Element Descriptionrule Definesanactioninvokedafteraneventhasoccurredinthe

form.

ChildElementsNone.

Attributes

Attribute Type Required Description PossibleValuesadapter xsf:xdTitle Yes Contains

thenameofthedataadaptertosubmit.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

Definition

<xsd:elementname="submitAction"><xsd:complexType><xsd:attributename="adapter"type="xsf:xdTitle"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesubmitActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

ShowAll

submitActionElement(submitElement)

Specifiesthedataadapterusedtosubmittheform.

Typexsd:complexType

ParentElements

Element Descriptionsubmit Containsinformationaboutthesubmissionfunctionalityofa

form.

ChildElementsNone.

Attributes

Attribute Type Required Description PossibleValuesadapter xsf:xdTitle Yes Thename

ofthedataadapterusedforsubmittingtheform.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{Cc}\p{Cf}\p{Cn}])(([^\p{Zl}\p{Zp}\p{Cc}])*([^\p{Z}\p{Cc}\p{Cf}\p{Cn}]))?

Definition

<xsd:elementname="submitAction"minOccurs="0"><xsd:complexType><xsd:attributename="adapter"type="xsf:xdTitle"use="required"></xsd:attribute></xsd:complexType><xsd:keyrefname="submitAdapter_name_keyref"refer="xsf:adapter_name_key"><xsd:selectorxpath="."/><xsd:fieldxpath="@adapter"/></xsd:keyref></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesubmitActionelement:

<xsf:submitcaption="Su&bmit"disableMenuItem="no"onAfterSubmit="keepOpen"showStatusDialog="yes"><xsf:submitActionadapter="dav"/></xsf:submit>

<xsf:dataAdapters><xsf:davAdaptername="dav"folderUrl="http://some_server/some_doc_lib"getFileNameFromData="/my:myFields/my:field1"overwriteAllowed="no"></xsf:davAdapter></xsf:dataAdapters>

successMessageElement

Specifiesthetexttobeusedtonotifytheuserthatthesubmissionwassuccessful.

Type

xsd:string

RemarksThesuccessMessageelementisanoptionalelementofthesubmitelement.

ThesuccessMessageelementdoesnotcontainanyattributesorchildelements.

ThesuccessMessageelementisignorediftheshowStatusDialogattributeofthesubmitelementissetto"no".

ExampleThefollowingisanexampleofthesuccessMessageelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useScriptHandler/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage<xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

ShowAll

switchViewActionElement

Definesaviewswitchaction.

Typexsd:complexType

ParentElements

Element Descriptionrule Definesanactioninvokedafteraneventhasoccurredinthe

form.

ChildElementsNone.

Attributes

Attribute Type Required Description PossibleValuesview xsf:xdViewName Yes Contains

thenameoftheview.

minLength=1

maxLength=255

pattern=([^\p{Z}\p{C}/\\#&"><])(([^\p{Zl}\p{Zp}\p{C}/\\#&"><])*([^\p{Z}\p{C}/\\#&"><]))?

Definition

<xsd:elementname="switchViewAction"><xsd:complexType> <xsd:attributename="view"type="xsf:xdViewName"use="required"/></xsd:complexType><xsd:keyrefname="switchViewAction_view_keyref"refer="xsf:view_name_key"> <xsd:selectorxpath="."/> <xsd:fieldxpath="@view"/></xsd:keyref></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheswitchViewActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

ShowAll

taskElement

ContainstheMicrosoftBizTalkServer2004HumanWorkflowServices(HWS)taskinformationenabledfortheform.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

name xsf:xdHWSname Yes Theuniquenameofthetask,asspecifiedintheHWSWorkflowdesigner;usedfortheonClickeventofthebuttonintheHWSWorkflowtaskpane.

Cannotcontainthefollowingcharacters:

\/"[]:<>+=;,?*@

taskTypeID xsd:string Yes TheuniqueIDforthetask.

string

caption xsf:xdHWSCaption No ThelabelforthecorrespondingbuttonintheHWSWorkflowtaskpanetostartorrespondtoatask.

minLength=1

maxLength=255

Definition

<xsd:elementname="task"> <xsd:complexType> <xsd:attributename="name"type="xsf:xdHWSname"use="required"/> <xsd:attributename="taskTypeID"type="xsd:string"use="required"/> <xsd:attributename="caption"type="xsf:xdHWSCaption"use="optional"/> </xsd:complexType> </xsd:element>

RemarksThetaskelementisanoptionalelementoftheallowedTaskselement.

EachtaskenabledfortheformmusthaveacorrespondingtaskelementintheallowedTaskssectionoftheformdefinitionfile(.xsf).

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthetaskelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"replaceWith="/a:some/b:thing"dataObject="Aux1"/>

</xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

ShowAll

taskpaneElement

DefinesacustomtaskpanetobeusedinaMicrosoftOfficeInfoPath2003form.

Type

xsd:complexType

Structure

Name Descriptioncaption (Requiredattribute)Definesthecaptionusedinthetaskpane

drop-downlistbox.href (Requiredattribute)SpecifiestherelativeorabsoluteUniform

ResourceLocator(URL)toan.htmlfile.

RemarksThetaskpaneelementisanoptionalelementofthexDocumentClasselement.

Thetaskpaneisamodelesspanelthatappearstotherightofthemainformarea.Taskpanescontaincommandsspecifictocompletingtasksthatarerelatedtoasingleform.InfoPathsupportstheuseofasinglecustomtaskpane.

Togetmultipletaskpanebehavior,youcanincludemultiple.htmfilesintheformtemplateandusetheNavigatemethodoftheHTMLTaskPaneobjectintheMicrosoftOfficeInfoPath2003objectmodeltonavigatetodifferent.htmfiles.

ExampleThefollowingisanexampleofthetaskpaneelement:

<xsf:xDocumentClass>...<xsf:taskpanecaption="DesignIssuesHelp"href="DesignIssuesHelp.htm"/>...</xsf:xDocumentClass>

ShowAll

toElement

Containstherecipientinformationforthetolineofthee-mailmessagewhentheformissubmittedusingtheemailAdapterelement.

Typexsd:complexType

ParentElements

Element DescriptionemailAdapter Parentelementthatcontainstheinformationneededto

submitanInfoPathformasanattachmenttoane-mailmessage,withaspecifiedsetofrecipients,asubject,andanintroduction.

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

value xsd:string Yes Containsthevalueofthetoelement.

string

valueType xsf:xdExpressionLiteralNo SpecifieswhetherthevalueattributeisinterpretedasanXPathexpressionorasaliteralstring.

expression

literal

Definition

<xsd:elementname="to"minOccurs="0"><xsd:complexType><xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute></xsd:complexType></xsd:element>

RemarksMultipleaddressesonthetolinemustbeseparatedbysemicolons.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthetoelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="someone@example.com"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="someoneelse@example.com"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

toolbarElement

Containsinformationaboutthetoolbarsusedintheview.

Type

xsd:complexType

Structure

Name Descriptionbutton (Optionalelement)Definesabuttonthathasanassociated

action.caption (Requiredattribute)Usedasthetitleofthetoolbar,whenthe

toolbarisnotdockedtotheuserinterface.name (Requiredattribute)Identifiesthecorrespondingtoolbarwithin

differentviews.Mustbeuniquewithinagivenview.menu (Optionalelement)Containsinformationaboutthemenusused

withinthetoolbar.

RemarksThetoolbarelementisanoptionalelementoftheviewelement.Therecanbemultipletoolbarsdeclaredforaview,andeachtoolbarcanhavemultiplemenuorbuttonelements.

ExampleThefollowingisanexampleofthetoolbarelement:

<xsf:toolbarcaption="CDCollectionToolbar"name="CDCollectionToolbar"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="NewCD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="NewTrack"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="NewLabel"showIf="always"></xsf:button><xsf:menucaption="Remove"><xsf:buttonaction="xCollection::remove"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::remove"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::remove"xmlToEdit="Label_16"caption="Label"showIf="always"></xsf:button></xsf:menu></xsf:toolbar>

ShowAll

unboundControlsElement

Definestheunboundbuttoncontrolsthatareusedintheview.

Type

xsd:complexType

Structure

Name Descriptionbutton (Optionalelement)Definesabuttonthathasanassociated

action.

RemarksTheunboundControlselementisanoptionalelementoftheviewelement.

UnboundcontrolsinMicrosoftOfficeInfoPath2003arethebuttonsthataredraggedfromtheControlstaskpaneontotheviewindesignmode.Thenameassignedtothebuttoncontrolisusedinthenameattributeofthebuttonelement,andwhenauserclicksonthebutton,thescriptingcodeassociatedwiththebuttonwillbecalled.

ExampleThefollowingisanexampleoftheunboundControlselement:

<xsf:view><xsf:unboundControls><xsf:buttonname="MyButton"></xsf:button></xsf:unboundControls>...</xsf:view>

Thefollowingscripthandler,includedinthescriptfile,willbecalledwhenthebuttonisclicked:

functionMyButton::OnClick(){//Writeyourcodehere.}

ShowAll

useHttpHandlerElement

SpecifiesthattheformistobesubmittedtothespecifiedUniformResourceLocator(URL)usingthespecifiedHTTPmethod.

Type

xsd:complexType

Structure

Name Descriptionhref (Requiredattribute)SpecifiestheURLtowhichtheformshould

besubmitted.method (Requiredattribute)SpecifiestheHTTPmethodtouseforthe

submitoperation.

RemarksTheuseHttpHandlerelementisanoptionalelementofthesubmitelement.

ExampleThefollowingisanexampleoftheuseHttpHandlerelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useHttpHandler>href="http://MyServer/InfoPathScripts/MyScript.asp"method="POST"</xsf:useHttpHandler><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

ShowAll

useQueryAdapterElement

Specifiesthattheformistobesubmittedtothesamedataadapterasspecifiedinthequeryelement.

Type

xsd:complexType

RemarksTheuseQueryAdapterelementisanoptionalelementofthesubmitelement.

ThequeryelementusedistheonethatisthechildelementofthexDocumentClasselement,notthequeryelementthatisachildofthedataObjectelement.

TheuseQueryAdapterelementdoesnotcontainanyattributesorchildelements.

ExampleThefollowingisanexampleoftheuseQueryAdapterelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useQueryAdapter/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

userNameElement

Associatesauserwithaparticularrole.

Typexsd:complexType

ChildElementsNone.

Attributes

Attribute Type Required DescriptionPossibleValues

name xsd:string Yes Specifiesthenameofauserforinclusioninthemembershiplistofarole.

string

memberOf xsd:string Yes Specifiestheroletobeassociatedwiththeuser.

string

Definition

<xsd:elementname="userName"><xsd:complexType><xsd:attributename="name"type="xsd:string"use="required"></xsd:attribute><xsd:attributename="memberOf"type="xsd:string"use="required"></xsd:attribute></xsd:complexType></xsd:element>

RemarksInfoPathrequiresthatauserbeassociatedwithonlyoneroleatatime.

IfausercreatesanewInfoPathdocumentfromaformtemplate,thatuserisassignedtotherolespecifiedintheoptionalinitiatorattributeoftheroleselement.Ifnorolehasbeendesignatedastheinitiatorrole,InfoPathassignstheusertotherolespecifiedinthememberOfattributeofthefirstentrythatcorrespondstotheuserinthemembershiplistoftheroleselement.Anentryinthemembershiplistcorrespondstoauserifanyoneofthefollowingconditionsistrue:

ThenameoftheusermatchesthevalueofthenameattributeofauserNameelementinthemembershiplist.

Theuserisincludedinagroupidentifiedbyagroupelementinthemembershiplist.

ThenameoftheusermatchesanamereturnedbyagetUserNameFromDataelementinthemembershiplist.

Ifnoentryfortheuserisfoundinthemembershiplist,InfoPathassociatestheuserwiththerolespecifiedinthedefaultattributeoftheroleselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheuserNameelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="Domain\username1"memberOf="A"/><xsf:userNamename="Domain\username2"memberOf="B"/><xsf:groupname="Domain\username3"memberOf="C"/></xsf:membership></xsf:roles>

ShowAll

useScriptHandlerElement

Specifiesthatthesubmit,save,orversionupgradeoperationwillbehandledusingformcode.

Type

xsd:element

RemarksTheuseScriptHandlerelementisanoptionalelementofthesubmitelement,thesaveelementandthedocumentVersionUpgradeelement.TheuseScriptHandlerelementcontainsnoattributesorchildelements.

Whenusedwiththesubmitelement,itdeclaresthattheformdatawillbeprocessedbyscriptcodeintheassociatedformfile.ThesubmitformcodemustbewrittenintheOnSubmitRequesteventhandlerintheform'sprimaryscriptfile.

Whenusedwiththesaveelement,itdeclaresthatthesaveoperationoftheformdatawillbeprocessedbyformcodeintheassociatedformcodefile.ThecodemustbewrittenintheOnSaveRequesteventhandlerintheform'sprimaryscriptingfile.

WhenusedwiththedocumentVersionUpgradeelement,itdeclaresthattheupgradeofolderforms(createdwithanolderversionoftheformtemplate)willbeprocessedbyformcodeintheassociatedscriptingfile.TheformupgradecodemustbewrittenintheOnVersionUpgradeeventhandlerintheform'sprimaryscriptfile.

ExampleThefollowingisanexampleoftheuseScriptHandlerelement:

<xsf:documentVersionUpgrade><xsf:useScriptHandler/></xsf:documentVersionUpgrade>

ShowAll

useTransformElement

SpecifiesthattheupgradewillbehandledbyanXSLTransformation(XSLT)suppliedbythenewerversionoftheformtemplate.

Type

xsd:complexType

Structure

Name DescriptionmaxToVersionUpgrade (Optionalattribute)Inclusivevalueforthelatest

formthatneedstobeupgraded.minVersionToUpgrade (Requiredattribute)Inclusivevalueforthe

oldestformthatcanbeupgraded.transform (Requiredattribute)SpecifiestheXSLTfile

namerelativetotheformtemplate.

RemarksTheuseTransformelementisanoptionalelementofthedocumentVersionUpgradeelement.

Whenauserfillsoutaform,MicrosoftOfficeInfoPath2003automaticallyrunsthespecifiedXSLTontheform'sunderlyingXMLdocumentandusestheoutputastheXMLdatatobeedited,iftheversionoftheformisgreaterthanorequaltotheminVersionToUpgradeattributeandtheversionislessthanorequaltothemaxVersionToUpgradeattribute.

ExampleThefollowingisanexampleoftheuseTransformelement:

<xsf:documentVersionUpgrade><xsf:useTransformtransform="upgrade.xsl"minVersionToUpgrade="0.0.0.0"maxVersionToUpgrade="1.0.0.5"/></xsf:documentVersionUpgrade>

ShowAll

viewElement

ContainsinformationaboutaMicrosoftOfficeInfoPath2003view.

Type

xsd:complexType

Structure

Name Descriptioncaption (Optionalattribute)Providesthedisplaycaptionfor

theviewwithintheviewlist.designMode (Optionalattribute)Determineswhethertheviewcan

beopenedindesignmode.editing (Optionalelement)Containsinformationaboutthe

editingcomponentsusedintheview.mainpane (Requiredelement)Determineswhatisdisplayedin

themainpane(formarea).menu (Optionalelement)Containsinformationaboutthe

custommenususedintheview.menuArea (Optionalelement)Containsinformationaboutthe

custommenuitemsthatcanbeaddedtotheInfoPathbuilt-inmenus.

name (Requiredattribute)Identifiestheviewforobjectmodelcallswhenswitchingviews,andforspecifyingthedefaultview.

printSettings (Optionalelement)Specifiestheprintersettingsusedwhenprintingtheview.

printView (Optionalattribute)Specifiesthenameofanotherviewtouseforprintingthisview.

toolbar (Optionalelement)Containsinformationaboutthetoolbarsusedintheview.

unboundControls (Optionalelement)Definestheunboundbuttoncontrolsthatareusedintheview.

showMenuItem (Optionalelement)ProvidesthedisplayofthemenuitemintheViewmenuwithacheckmarkwhenenabled.

RemarksTheviewelementisarequiredelementoftheviewselement.

ExampleThefollowingisanexampleoftheviewelement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

viewsElement

DefinesalloftheviewsthathavebeenimplementedinaMicrosoftOfficeInfoPath2003form.

Type

xsd:complexType

Structure

Name Descriptiondefault (Optionalattribute)Specifiesthenameoftheviewchosentobe

thedefaultview.view (Requiredelement)ContainsinformationaboutanInfoPathview.

RemarksTheviewselementisarequiredelementofthexDocumentClasselement.

ExampleThefollowingisanexampleoftheviewselement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

ShowAll

webServiceAdapterElement

DefinesaWebservicedataadapterthatretrievesdatafromaWebserviceforthespecifieddataobject.

Type

xsd:complexType

Structure

Name DescriptionqueryAllowed (Optionalattribute)Specifieswhetherdatacanbe

retrievedfromthedatasourcethroughthequerymethodoftheadapterobject.

submitAllowed (Optionalattribute)Specifieswhetherdatacanbesubmittedtothedatasourcethroughthesubmitmethodoftheadapterobject.

wsdUrl (Requiredattribute)ContainstheUniformResourceLocator(URL)oftheWebServicesDescriptionLanguage(WSDL)filethatdescribestheWebservicespecification.

operation (Requiredelement)Definestheoperation(method)oftheWebservicetobeusedforretrievingandsubmittingdata.

useDataSet (Optionalattribute)SpecifieswhethertheadapterwillsupportanADO.NetDataSet.Defaultis"no".

RemarksThewebServiceAdapterelementisanoptionalelementofthequeryelement.

ThewebServiceAdapterelementcanalsobeusedtodefineaWebserviceadapterusedtosubmitthemainorsecondaryformdata.

ExampleThefollowingisanexampleofthewebServiceAdapterelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"useDataSet="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

ShowAll

xDocumentClassElement

Therootelementoftheformdefinition(.xsf)filefile.Containsallotherelementsandattributesofthe.xsffile.

Type

xsd:complexType

Structure

Name Descriptionauthor (Optionalattribute)Identifiestheauthorof

theform.dataFormSolution (Optionalattribute)Identifiestheformasa

databaseform.description (Optionalattribute)Abriefdescriptionofthe

form.name (Optionalattribute)Providesaunique,

UniformResourceName(URN)–basednamefortheformthatthe.xsffiledefines.

productVersion (Optionalattribute)IdentifiestheversionnumberofInfoPathwithwhichtheformhasbeencreatedorforwhichaparticularformisintended.

publishUrl (Optionalattribute)Identifieswheretheformwaspublishedandwheretheformtemplateshoulddownloadupdatesfrom.

requireFullTrust (Optionalattribute)Allowstheformtorunasafullytrustedformwhenaformtemplateisregisteredorsignedwithacertificate.

solutionFormatVersion (Requiredattribute)Identifiestheversionnumberthatrepresentstheformatofthe.xsffile.

solutionVersion (Optionalattribute)Identifiestheversionnumberoftheform.

xmlns (Requiredattribute)Definesthexsfnamespace.

applicationParameters (Optionalelement)Containsform-specificpropertiesthatdescribehowaformshouldbeusedinInfoPathdesignmode.

customValidation (Optionalelement)Definesrule-basedcustomvalidationontopofallvalidation

enforcedthroughtheXMLSchema.dataObjects (Optionalelement)Definesallsecondary

dataobjectsusedinanInfoPathform.documentSchemas (Optionalelement)DefinestheXML

SchemasthattheInfoPathformisdesignedtohandle.

documentSignatures (Optionalelement)DefinesthelocationofthedigitalsignatureXMLDocumentObjectModel(DOM)nodewithintheform'sunderlyingXMLdocument.

documentVersionUpgrade (Optionalelement)Defineshowformscreatedwithanolderversionoftheformtemplatecanbeupgradedtothelatestversionoftheformtemplate.

domEventHandlers (Optionalelement)Containspointerstovariousscript-basedeventhandlersthatreacttochangesinXMLDOMnodesofaform'sunderlyingXMLdocumentwhiletheformisbeingfilledout.

extensions (Optionalelement)IncludesminorupgradestotheInfoPath.xsffilethatcanbeusedbyfuturereleasesofInfoPathorbyspecificforms.

fileNew (Optionalelement)Providesareferencetoan.xmlfilecontainingsampledata,tobeloadedwhenauserchoosestocreateanewformbasedontheformtemplate.

importParameters (Optionalelement)Containsalltheparametersthatdefinehowtheimport(merge)formsfeatureworksfortheform.

listProperties (Optionalelement)Identifiesthepropertiesthatshouldbeonalistviewofallformsbelongingtoaformtemplate.

package (Requiredelement)ContainsinformationaboutallofthefilesusedinanInfoPathform.

query (Optionalelement)Associatesadataadapterwiththeform'sunderlyingXMLdocument.

schemaErrorMessages (Optionalelement)ContainscustomerrormessagesusedtooverrideXMLSchemadatatypeerrors.

scripts (Optionalelement)Definesthesourceofallbusinesslogicscriptsusedatthedocumentlevelintheform.

submit (Optionalelement)Containsinformationaboutthesubmissionfunctionalityofaform.

taskpane (Optionalelement)DefinesacustomtaskpanetobeusedinanInfoPathform.

views (Requiredelement)DefinesalloftheviewsthathavebeenimplementedinanInfoPathform.

trustLevel (Optionalattribute)Specifiesthetrustlevelofaform.

trustSetting (Optionalattribute)Specifiesthetrustsettingofaform.

RemarksThexDocumentClasselementisarequiredelementandmustbepresentintheInfoPath.xsffile.

TheattributesthatarecontainedwithinthexDocumentClasselementarecollectivelycalledtheglobalmetadatasection.Theglobalmetadatasectionofthe.xsffileisarequiredsectionthatcontainsglobalinformationabouttheInfoPathform.

ExampleThefollowingisanexampleofthexDocumentClasselement:

xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:schemas-microsoft-com:myTravelReport"author="FrankMiller"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">dataFormSolution="yes"requireFullTrust="yes"trustLevel="restricted"trustSetting="manual"publishUrl="http://www.contoso.com/InfoPathTemplates/MyTemplate.xsn">...</xsf:xDocumentClass

ShowAll

xmlFileAdapterElement

Definesan.xmlfiledataadapterthatretrievesdatafroman.xmlfileforthespecifieddataobject.

Type

xsd:complexType

Structure

Name DescriptionfileUrl (Requiredattribute)ContainstheUniformResourceLocator

(URL)ofthe.xmlfile.name (Optionalattribute)ContainsthenameofthexmlFileAdapter

element.

RemarksThexmlFileAdapterelementisanoptionalelementofthequeryelement.

ExampleThefollowingisanexampleofthexmlFileAdapterelement:

<xsf:query><xsf:xmlFileAdapterfileUrl="currencies.xml"/></xsf:query>

ShowAll

xmlToEditElement

Specifiesaninstanceofaneditingcomponent.

Type

xsd:complexType

Structure

Name Descriptioncontainer (Optionalattribute)SpecifiesanXPathexpressionthat

determinesthecontextinwhichthecontrolwillbeselectableanditsactionsenabled.

editWith (Optionalelement)Definesaninstanceofaneditingcomponent,andprovidesthecorrespondingparameterstodetermineitsexactbehavior.

item (Requiredattribute)SpecifiesanXPathexpressionthatdeterminestheXMLDocumentObjectModel(DOM)nodestobeeditedusingtheeditingcomponentdefinedintheeditWithelement.

name (Requiredattribute)UsedinthexmlToEditattributeofthebuttonelementtoassociateactionsoftheassociatededitingcomponentwithbuttonsdefinedinmenusandtoolbars.

viewContext (Optionalattribute)SpecifiesastringthatidentifiesanHTMLelementintheview.

RemarksThexmlToEditelementisanoptionalelementoftheeditingelement.

xmlToEditelementsareusedtodefinetheeditingcomponentsthatcanbeusedinaform.ThexmlToEditelementscancontainmultipleeditWithelementsthatspecifytheeditingcomponentsthatwillbeusedtoeditvarioustypesofXMLDOMnodes.

ExampleThefollowingisanexampleofthexmlToEditelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

actionAttribute

Specifiesanactionofaneditingcomponent,usingthesyntax"NameOfEditingComponent::NameOfAction".

Type

xsd:NMTOKEN

RemarksTheactionattributeisanoptionalattributeofthebuttonelement,butisrequiredforbuttonsusedwitheditingcomponents.

Thefollowingaretheeditingactionsthatmaybeusedasthevalueoftheactionattribute.

Name DescriptionxCollection::insert Insertsanitem.xCollection::insertBefore Insertsanitembeforethecurrentselection.xCollection::insertAfter Insertsanitemafterthecurrentselection.xCollection::remove Removesanitem.xCollection::removeAll Removesallitems.xOptional::insert Insertsanoptionalitem.xOptional::remove Removesanoptionalitem.xReplace::replace Replacesanexistingitem.xFileAttachment::attach Opensadialogboxtobrowseforfilestoattach

toaform.xFileAttachment::open Opensafileattachedtoaform.xFileAttachment::saveAs Openstheadialogboxtobrowseforalocation

whereafileistobesaved.xFileAttachment::remove Removesthefilefromtheform.

ExampleThefollowingisanexampleoftheactionattributeasitisusedinthebuttonelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

ShowAll

actionTypeIDAttribute

ContainsauniqueIDfortheactionelement.

Typexsd:string

ParentElements

Element Descriptionaction Containstheinformationforanaction.

Definition

<xsd:attributename="actionTypeID"type="xsd:string"use="required"></xsd:attribute>

RemarksTheactionTypeIDattributeisanattributeoftheactionelement.

ThevalueoftheactionTypeIDattributemustbeuniqueintheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheactionTypeIDattributeasitisusedintheactionelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

adapterAttribute(queryActionElement)

ContainstheadapternameforthedataconnectionusedforthequeryActionelement.

Typexsd:string

ParentElements

Element DescriptionqueryAction Definesadataconnectionqueryaction.

Definition

<xsd:attributename="adapter"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheadapterattributeasitisusedinthequeryActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

ShowAll

adapterAttribute(submitActionElement)

Containsthenameofthedataadaptertosubmit.

Typexsf:xdTitle

ParentElements

Element DescriptionsubmitActionDefinesasubmitactionforaform.

Definition

<xsd:attributename="adapter"type="xsf:xdTitle"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheadapterattributeasitisusedinthesubmitActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

ShowAll

adapterAttribute(submitActionElement)

Containsthenameofthedataadapterusedforsubmittingtheform.

Typexsd:complexType

ParentElements

Element DescriptionsubmitAction Specifiesthedataadapterusedtosubmittheform.

Definition

<xsd:elementname="submitAction"minOccurs="0"><xsd:complexType><xsd:attributename="adapter"type="xsf:xdTitle"use="required"></xsd:attribute></xsd:complexType><xsd:keyrefname="submitAdapter_name_keyref"refer="xsf:adapter_name_key"><xsd:selectorxpath="."/><xsd:fieldxpath="@adapter"/></xsd:keyref></xsd:element>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheadapterattributeasitisusedinthesubmitActionelement:

<xsf:submitcaption="Su&bmit"disableMenuItem="no"onAfterSubmit="keepOpen"showStatusDialog="yes"><xsf:submitActionadapter="dav"/></xsf:submit><xsf:dataAdapters><xsf:davAdaptername="dav"folderUrl="http://some_server/some_doc_lib"getFileNameFromData="/my:myFields/my:field1"overwriteAllowed="no"></xsf:davAdapter></xsf:dataAdapters>

ShowAll

aggregationAttribute

SpecifieshowthenodesreturnedfromanXPathexpressioninthenodeattributeshouldbeaggregatedtoobtainasinglevalueforthedocument.

Type

xsd:simpleType

RemarksTheaggregationattributeisanoptionalattributeofthefieldelement.

Theaggregationattributecaneitherbeanaggregationactionoranindicationoftheparticularelementinthecollection.Itusesthefollowingaggregationactions:sum,count,average,min,max,first,last,merge,andplaintext.

ExampleThefollowingisanexampleoftheaggregationattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

ShowAll

allowCustomizationAttribute

IdentifieswhethertheMicrosoftOfficeInfoPath2003formcanbemodifiedorcustomized.

Type

xsf:xdYesNo

RemarksTheallowCustomizationattributeisanoptionalattributeofthesolutionPropertieselement.

IftheallowCustomizationattributeissetto"no",anerrorisgeneratedwhenausertriestomodifytheformtemplateafteropeningitinInfoPath.Allowedvaluesare"yes"and"no".Thedefaultvalueis"yes".

ExampleThefollowingisanexampleoftheallowCustomizationattributeasitisusedinthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.1.0.10"fullyEditableNamespace="urn:namespace1:mynames"/></xsf:applicationParameters>

ShowAll

allowedFileTypesattribute

Specifiesthefilenameextensionsoffilesthatcanbeattachedtotheform.

Typexsd:string

ParentElements

Element DescriptioneditWith Specifiesaninstanceofaneditingcomponent,andprovides

thecorrespondingparameterstodetermineitsexactbehavior.

Definition

<xsd:attributename="allowedFileTypes"type="xsd:string"use="optional"></xsd:attribute>

RemarksThefileextensionslistedintheallowedFileTypesattributevalueareseparatedbycommas.

Example

<xsf:xmlToEditname="some_name"item="/my:myFields/my:field1"><xsf:editWithallowedFileTypes="doc,xls"component="xFileAttachment"/></xsf:xmlToEdit><menuAreaname="msoStructuralEditingContextMenu"><buttonaction="xFileAttachment::attach"xmlToEdit="some_name"caption="Attach..."showIf="immediate"/><buttonaction="xFileAttachment::open"xmlToEdit="some_name"caption="Open"showIf="immediate"/><buttonaction="xFileAttachment::saveAs"xmlToEdit="some_name"caption="SaveAs..."showIf="immediate"/><buttonaction="xFileAttachment::remove"xmlToEdit="some_name"caption="Deletefile"showIf="immediate"/></menuArea>

applicationAttribute

IdentifiesthenameoftheapplicationusedtodesigntheMicrosoftOfficeInfoPath2003form.

Type

xsd:string

RemarksTheapplicationattributeisarequiredattributeoftheapplicationParameterselement.

Theonlyvaluesupportedis"InfoPathDesignMode".

ExampleThefollowingisanexampleoftheapplicationattributeasitisusedintheapplicationParameterselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.1.0.10"fullyEditableNamespace="urn:namespace1:mynames"/></xsf:applicationParameters>

attributeAttribute

Specifiesthenameoftheattributetobeinserted.

Type

xsd:string

RemarksTheattributeattributeisarequiredattributeoftheattributeDataelement.

ExampleThefollowingisanexampleoftheattributeattributeasitisusedintheattributeDataelement:

<xsf:editWithcomponent="xOptional"><xsf:fragmentToInsert><xsf:chooseFragmentparent="report"><xsf:attributeDataattribute="author"value="authorname"/></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith>

authorAttribute

Identifiestheauthoroftheform.

Type

xsd:string

RemarksTheauthorattributeisanoptionalattributeofthexDocumentClasselement.

ExampleThefollowingisanexampleoftheauthorattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

autoCompleteAttribute

Switchestheauto-completionoffieldsonoroff.

Type

xsf:xdYesNo

RemarksTheautoCompleteattributeisanoptionalattributeoftheeditWithelement.

Valuesinclude"yes"and"no".Thedefaultvalueis"yes".

ExampleThefollowingisanexampleoftheautoCompleteattributeasitisusedintheeditWithelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"autoComplete="yes"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

ShowAll

automaticallyCreateNodesAttribute

IdentifieswhetherXMLDocumentObjectModel(DOM)nodeswillbeautomaticallygeneratedwhencontrolsareinsertedintheviewindesignmode.

Type

xsf:xdYesNo

RemarksTheautomaticallyCreateNodesattributeisanoptionalattributeofthesolutionPropertieselement.

TheautomaticallyCreateNodesattributecorrespondstotheAutomaticallycreatedatasourcecheckboxatthebottomoftheControlstaskpane.

ExampleThefollowingisanexampleoftheautomaticallyCreateNodesattributeasitisusedinthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.1.0.10"fullyEditableNamespace="urn:namespace1:mynames"/></xsf:applicationParameters>

bottomMarginAttribute

Specifiesthebottommarginwhenprintingaview.

Type

xsd:string

RemarksThebottomMarginattributeisanoptionalattributeoftheprintSettingselement.

ThebottomMarginattributemustbegreaterthanorequaltozero.

ExampleThefollowingisanexampleofthebottomMarginattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

cabFileAttribute

SpecifiesthenameoftheCABfile.

Typexsd:string

ParentElements

Element DescriptionallowedControl SpecifiestheActiveXcontrolsthatareallowedtobe

instantiated.

Definition

<xsd:attributename="cabFile"type="xsd:string"use="optional"></xsd:attribute>

RemarksThecabFileattributemustrefertoafilewithintheInfoPathpackage.IfthecabFileattributeisnotspecified,thecontrolmustalreadyberegisteredonthelocalcomputerortheformwillnotopen.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthecabFileattributeasitisusedintheallowedControlelement:

<xsf:permissions><xsf:allowedControlcabFile="{84F32C01-78D8-4B93-8ED4-106DA70224C2}.cab”clsid="{84F32C01-78D8-4B93-8ED4-106DA70224C2}"version="1,0,0,1"/><xsf:allowedControlclsid="{F08DF954-8592-11D1-B16A-00C0F0283630}"/></xsf:permissions>

canInitiateWorkflowAttribute

Specifieswhethertheactionelementcanbeusedtoinitiateorextendanactivityflow.

Typexsf:xdYesNo

ParentElements

Element Descriptionaction Containstheinformationforanaction.

Definition

<xsd:attributename="canInitiateWorkflow"type="xsf:xdYesNo"use="required"></xsd:attribute>

RemarksThecanInitiateWorkflowattributeisarequiredattributeoftheactionelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthecanInitiateWorkflowattributeasitisusedintheactionelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

captionAttribute(actionElement)

SpecifiesalabelforthebuttonintheWorkflowtaskpanecorrespondingtotheactionelement.

Typexsf:xdHWSCaption

ParentElements

Element Descriptionaction Containstheinformationforanaction.

Definition

<xsd:attributename="caption"type="xsf:xdHWSCaption"use="optional"></xsd:attribute>

RemarksThecaptionattributeisanoptionalattributeoftheactionelement.

Ifacaptionisnotspecified,thevalueofthenameattributewillbeusedasthecaptionforthebuttonintheWorkflowtaskpane.

Thecaptionattributeisalsousedtoextendanactivityflow.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthecaptionattributeasitisusedintheactionelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

captionAttribute(buttonElement)

Providesthecaptiondisplayedonthebutton.

Type

xsf:xdTitle

RemarksThecaptionattributeisanoptionalattributeofthebuttonelement.

ExampleThefollowingisanexampleofthecaptionattributeasitisusedinthebuttonelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

captionAttribute(editWithElement)

SpecifiesanidentifierforalternateformsofXMLdatatobeusedintheeditingcomponent.

Type

xsf:xdTitle

RemarksThecaptionattributeisanoptionalattributeoftheeditWithelement.

ExampleThefollowingisanexampleofthecaptionattributeasitisusedintheeditWithelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"autoComplete="yes"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

captionAttribute(initialXmlDocumentElement)

DefinesthetextstringtobeusedasthenameoftheformintheTemplateGalleryandinthemostrecentlyusedlist.

Type

xsf:xdTitle

RemarksThecaptionattributeisarequiredattributeoftheinitialXmlDocumentelement.

Ifthisattributeisnotspecified,thenameoftheformisusedasthecaption.Themaximumsizeforthecaptiontextstringis255characters.

ExampleThefollowingisanexampleofthecaptionattributeasitisusedintheinitialXmlDocumentelement:

<xsf:fileNew><xsf:initialXmlDocumentcaption="TravelReport"href="TravelReportTemplate.xml"/></xsf:fileNew>

captionAttribute(menuElement)

Usedasthecaptionforamenu.

Type

xsf:xdTitle

RemarksThecaptionattributeisarequiredattributeofthemenuelement.

Whenusedforamenuthatisnestedwithinaview,thecaptionisthetop-levelmenucaption;whenusedforamenuthatisnestedwithinatoolbar,thecaptionisforthebuttononadrop-downmenu;andwhenusedforamenuthatisnestedinsideanothermenu(cascadingmenu),thecaptionisthesub-menucaption.

ExampleThefollowingisanexampleofthecaptionattributeasitisusedinthemenuelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

ShowAll

captionAttribute(ruleElement)

ContainsthenameofaruleasitappearsinMicrosoftOfficeInfoPath.

Typexsd:string

ParentElements

Element Descriptionrule Definesanactioninvokedafteraneventhasoccuredinthe

form.

Definition

<xsd:attributename="caption"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthecaptionattributeasitisusedintheruleelement:

<xsf:ruleSets><xsf:ruleSetname="RuleSet1"><xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetreceipts!</xsf:dialogBoxMessageAction><xsf:openNewDocumentActionsolution="urn:approvalForm"/><xsf:exitRuleSet/></xsf:rule><xsf:rulecaption="AlwaysSubmit"isEnabled="no"><xsf:submitActionadapter="ExpenseDatabase"/></xsf:rule></xsf:ruleSet>

<xsf:ruleSetname="RuleSet2"><xsf:rulecaption="Lookupcontact"><xsf:queryActionadapter="Contacts"/></xsf:rule></xsf:ruleSet></xsf:ruleSets>

captionAttribute(submitElement)

DefinesthenameofthesubmitbuttonandcorrespondingmenuitemthatwillappearontheFilemenuwhenauserisfillingoutaform.

Type

xsd:string

RemarksThecaptionattributeisanoptionalattributeofthesubmitelement.

Thedefaultvalueis"Submit",butanytextstringcanbeused.Ifthecaptionattributeismissingorissettoanemptystring,thedefaultvalueisused.The"&amp;"characterscanbeusedtocreateakeyboardshortcutforthesubmitmenuitem.

ExampleThefollowingisanexampleofthecaptionattributeasitisusedinthesubmitelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useScriptHandler/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

ShowAll

captionAttribute(taskElement)

SpecifiesalabelforthebuttonintheWorkflowtaskpanecorrespondingtothetaskelement.

Typexsf:xdHWSCaption

ParentElements

Element Descriptiontask TheHumanWorkflowServices(HWS)taskinformation

enabledfortheform.

Definition

<xsd:attributename="caption"type="xsf:xdHWSCaption"use="optional"></xsd:attribute>

RemarksThecaptionattributeisanoptionalattributeofthetaskelement.

Ifacaptionisnotspecified,thevalueofthenameattributewillbeusedasthecaptionforthebuttonintheWorkflowtaskpane.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthecaptionattributeasitisusedinthetaskelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

captionAttribute(taskpaneElement)

Definesthecaptionusedinthetaskpanedrop-downlistbox.

Type

xsd:string

RemarksThecaptionattributeisarequiredattributeofthetaskpaneelement.

Ifthecaptionattibuteiscontainsanemptyvalue,thenthedefaultcaptionof"FormTasks"isused.

ExampleThefollowingisanexampleofthecaptionattributeasitisusedinthetaskpaneelement:

<xsf:xDocumentClass>...<xsf:taskpanecaption="MyCustomTaskPane"href="MyCustomTaskPane.htm"/>...</xsf:xDocumentClass>

captionAttribute(toolbarElement)

Usedasthetitleofthetoolbar,whenthetoolbarisnotdockedtotheuserinterface.

Type

xsf:xdTitle

RemarksThecaptionattributeisarequiredattributeofthetoolbarelement.

NoteThecaptionattributeisalsousedforthenameofthetoolbarintheCustomizeCommandsdialogboxforacontrol.

ExampleThefollowingisanexampleofthecaptionattributeasitisusedinthetoolbarelement:

<xsf:toolbarcaption="CDCollectionToolbar"name="CDCollectionToolbar"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="NewCD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="NewTrack"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="NewLabel"showIf="always"></xsf:button><xsf:menucaption="Remove"><xsf:buttonaction="xCollection::remove"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::remove"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::remove"xmlToEdit="Label_16"caption="Label"showIf="always"></xsf:button></xsf:menu></xsf:toolbar>

captionAttribute(viewElement)

Providesthedisplaycaptionfortheviewwithintheviewlist.

Type

xsf:xdViewName

RemarksThecaptionattributeisanoptionalattributeoftheviewelement.

Ifnotspecified,thecaptionoftheviewdefaultstothevalueofthenameattribute.

ExampleThefollowingisanexampleofthecaptionattributeasitisusedintheviewelement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

clsidAttribute

SpecifiestheCOMclassID(CLSID)ofanActiveXcontrol.

Typexsd:string

ParentElements

Element DescriptionallowedControl SpecifiestheActiveXcontrolsthatareallowedtobe

instantiated.

Definition

<xsd:attributename="clsid"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

WhentheviewcontainsanOBJECTtag,thecontrolwillbeinstantiatedonlyiftheCLSIDislistedasanallowedControlelementinthepermissionselement.IfanActiveXcontrolwiththisCLSIDisnotpresentonthesystemandcan'tbeinstalled,theformwillnotopen.

ExampleThefollowingisanexampleoftheclsidattributeasitisusedintheallowedControlelement:

<xsf:permissions><xsf:allowedControlcabFile="{84F32C01-78D8-4B93-8ED4-106DA70224C2}.cab”clsid="{84F32C01-78D8-4B93-8ED4-106DA70224C2}"version="1,0,0,1"/><xsf:allowedControlclsid="{F08DF954-8592-11D1-B16A-00C0F0283630}"/></xsf:permissions>

collateattribute

Specifieswhetherthepaperiscollated.

Typexsf:xdYesNo

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingaview.

Definition

<xsd:attributename="collate"type="xsf:xdYesNo"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthecollateattributeasitisusedintheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

columnNameAttribute

IdentifiesthecolumnnameintheSQLtable(underlyingtheformlistview).

Type

xsf:xdTitle

RemarksThecolumnNameattributeisarequiredattributeofthefieldelement.

ExampleThefollowingisanexampleofthecolumnNameattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

ShowAll

commandTextAttribute

AstringpropertythatcontainstheActiveXDataObjects(ADO)SQLcommandtexttobeusedforqueryingthedatafromthespecifieddatasource.

Type

xsd:string

RemarksThecommandTextattributeisarequiredattributeoftheadoAdapterelement.

ExampleThefollowingisanexampleofthecommandTextattributeasitisusedintheadoAdapterelement:

<xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query>

componentAttribute

Specifiesthenameoftheeditingcomponentthatwillbereferencedwithintheactionattributeofabuttonelement.

Type

xsd:enumeration

RemarksThecomponentattributeisarequiredattributeoftheeditWithelement.

ValidcomponentnamesincludexCollection,xOptional,xReplace,xTextList,xField,xImage,xFileAttachment.

ExampleThefollowingisanexampleofthecomponentattributeasitisusedintheeditWithelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"autoComplete="yes"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

ThefollowingisanexampleofthecomponentattributeasitisusedintheeditWithelement,wherethevalueofthecomponentattributeis"xFileAttachment":

<xsf:xmlToEditname="some_name"item="/my:myFields/my:field1">

<xsf:editWithallowedFileTypes="doc,xls"component="xFileAttachment"/></xsf:xmlToEdit><menuAreaname="msoStructuralEditingContextMenu"><buttonaction="xFileAttachment::attach"xmlToEdit="some_name"caption="Attach..."showIf="immediate"/><buttonaction="xFileAttachment::open"xmlToEdit="some_name"caption="Open"showIf="immediate"/><buttonaction="xFileAttachment::saveAs"xmlToEdit="some_name"caption="SaveAs..."showIf="immediate"/><buttonaction="xFileAttachment::remove"xmlToEdit="some_name"caption="Deletefile"showIf="immediate"/></menuArea>

ShowAll

conditionAttribute

DefinesanXPathexpressionevaluatedasaBooleanvaluetodeterminewhethertheassociatedactionwillbeinvoked.

Typexsd:string

ParentElements

Element Descriptionrule Definesanactioninvokedafteraneventhasoccurredinthe

form.

Definition

<xsd:attributename="condition"type="xsd:string"use="optional"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheconditionattributeasitisusedintheruleelement:

<xsf:ruleSets><xsf:ruleSetname="RuleSet1"><xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetreceipts!</xsf:dialogBoxMessageAction><xsf:openNewDocumentActionsolution="urn:approvalForm"/><xsf:exitRuleSet/></xsf:rule><xsf:rulecaption="AlwaysSubmit"isEnabled="no"><xsf:submitActionadapter="ExpenseDatabase"/></xsf:rule></xsf:ruleSet>

<xsf:ruleSetname="RuleSet2"><xsf:rulecaption="Lookupcontact"><xsf:queryActionadapter="Contacts"/></xsf:rule></xsf:ruleSet></xsf:ruleSets>

ShowAll

connectionStringAttribute

AstringpropertythatcontainstheActiveXDataObjects(ADO)connectionstringtobeusedtoconnecttothedatasource.

Type

xsd:string

RemarksTheconnectionStringattributeisarequiredattributeoftheadoAdapterelement.

ExampleThefollowingisanexampleoftheconnectionStringattributeasitisusedintheadoAdapterelement:

<xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query>

ShowAll

containerAttribute

SpecifiesanXPathexpressionthatdeterminesthecontextinwhichthecontrolwillbeselectableanditsactionsenabled.

Type

xsd:string

RemarksThecontainerattributeisanoptionalattributeofthexmlToEditelement.

Ifthecurrentcontext(viewselectionorinsertionpoint)iswithinsomeHTMLelementthatmapsbacktoanXMLDocumentObjectModel(DOM)nodethatsatisfiesthecontainerXPathexpression,thecontrolisenabled.Otherwise,allactionsaredisabled.

ItdoesnotsufficeforthecontainerXMLDOMnodetoexist.ActionswillbeenabledonlywhenthecurrentselectioniswithinanHTMLelementthatmapstothecontainerXMLDOMnode.

NoteInMicrosoftOfficeInfoPath2003designmode,generatedXPathexpressionsfortheitemandcontainerattributeswillalwaysbeintheformitem="/a/b/c",whichprovidesthefullpathfromtherootelementoftheform'sunderlyingXMLdocument.Butpatternssuchasitem="b/c",orwithpredicatesasinitem="b[@p='23']/c[q]"areallowediftheformdefinition(.xsf)fileiseditedmanually.

ExampleThefollowingisanexampleofthecontainerattributeasitisusedinthexmlToEditelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

copiesattributeSpecifiesthenumberofcopiestobeprinted.

Typexsd:Integer

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingtheview.

Usage

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

Definition

<xsd:attributename="copies"><xsd:simpleType><xsd:restrictionbase="xsd:integer"><xsd:minInclusivevalue="1"/><xsd:maxInclusivevalue="9999"/></xsd:restriction></xsd:simpleType></xsd:attribute>

ShowAll

dataAttribute

ContainsanXPathmatchexpressionthatdefinesthenodesettowhichthesignaturewillbeapplied.

Typexsd:string

ParentElements

Element DescriptionsignedDataBlock Definesanodesetintheform'sunderlyingXML

documenttowhichadigitalsignaturecanbeapplied

Definition

<xsd:attributename="data"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthedataattributeasitisusedinthesignedDataBlockelement:

<xsf:documentSignatures><xsf:signedDataBlockname=”main”data="my:myfields/my:subtree1|my:myfields/my:subtree2"signatureLocation="my:mifields/sig:signatures/main"mode="countersign"><xsf:message>Bypressingthe&quot;Sign&quot;buttonbelow,Iagreetobeboundtothetermsofthisdocument.</xsf:message></xsf:signedDataBlock></xsf:documentSignatures>

ShowAll

dataFormSolutionAttribute

Identifiestheformasadatabaseform.

Type

xsf:xdYesNo

RemarksThedataFormSolutionattributeisanoptionalattributeofthexDocumentClasselement.

Allowedvaluesare"yes"and"no".Thedefaultvalueis"no".FormsbasedonActiveXDataObjects(ADO)orWebservicesandthathaveaspecialqueryviewshouldhavethisattributesetto"yes"toworkproperlyinMicrosoftOfficeInfoPath2003.

ExampleThefollowingisanexampleofthedataFormSolutionattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

ShowAll

dataObjectAttribute(domEventHandlerElement)

ContainsthenameofthedataObjectelementtobeusedintheeventhandler.

Typexsd:string

ParentElements

Element DescriptiondomEventHandlerDefinesaneventhandlerforoneormorespecific

XMLDocumentObjectModel(DOM)nodes.

Definition

<xsd:attributename="dataObject"type="xsd:string"use="optional"></xsd:attribute>

RemarksThedataObjectattributeisanoptionalattributeofthedomEventHandlerelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthedataObjectattributeasitisusedinthedomEventHandlerelement:

<xsf:domEventHandlers><xsf:domEventHandlermatch="TravelReport/Expenses"handlerObject="TravelExpenses"dataObject="dataObject1"/></xsf:domEventHandlers>

dataObjectAttribute(getUserNameFromDataElement)

Thenameofthesecondarydatasourcewheretheusernamenamecanbefound.

Typexsd:string

ParentElements

Element DescriptiongetUserNameFromData RetrievesausernamebyusinganXPath

queryofthedatainthemaindatasourceorinasecondarydatasource.

Definition

<xsd:attributename="dataObject"type="xsd:string"use="optional"></xsd:attribute>

RemarksForthemaindatasource,thisattributeshouldnotbepresent.Anemptystringisinvalid.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthedataObjectattributeasitisusedinthegetUserNameFromDataelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

dataObjectAttribute(partFragmentElement)

SpecifiesthenameofthedataobjecttousewhensubmittingapartFragmentelementtoaMicrosoftBiztalk2004HumanWorkflowServices(HWS)server.

Typexsd:string

ParentElements

Element DescriptionpartFragmentDefinesonesubstitutiongroupforaspecificpartofthe

inputSimpleObjectAccessProtocol(SOAP)message.

Definition

<xsd:attributename="dataObject"type="xsd:string"use="optional"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthedataObjectattributeasitisusedinthepartFragmentelement:

<xsf:partFragmentmatch="ActionSection/Target"replaceWith="/my:myFields/my:Target"dataObject="hwsDataObject3"/>

ShowAll

defaultAttribute

Specifiesthenameidentifieroftheviewchosentobethedefaultview.

Type

xsd:string

RemarksThedefaultattributeisanoptionalattributeoftheviewselement.

Ifnotspecified,thedefaultviewisthefirstviewelementfoundwithintheviewselement.ThisviewisloadedwhenanMicrosoftOfficeInfoPath2003isinitiallyopened.

NoteInthecaseofformsthatuseActiveXDataObjects(ADO)oraWebserviceastheirprimarydatasource,thedefaultviewissetbytheinitialViewattributeintheprocessinginstructionoftheform'sXMLtemplatefile.Thisattributecannotbechangedwhileindesignmode.

ExampleThefollowingisanexampleofthedefaultattributeasitisusedintheviewselement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

defaultAttribute(rolesElement)

Designatesaparticularroleasthedefaultrole.

Typexsd:string

ParentElements

Element Descriptionroles Definesroles.

Definition

<xsd:attributename="default"type="xsd:string"use="required"></xsd:attribute>

RemarksIfauserofaformisnotdefinedinthemembershipelementoftheroleselementoriftheroleofausercannotbedetermined,thatuserisimplicitlyassignedtotherolespecifiedbythedefaultattribute.Thedefaultattributeisrequiredfortheroleselement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthedefaultattributeasitisusedintheroleselement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

descriptionAttribute

Abriefdescriptionoftheform.

Type

xsd:string

RemarksThedescriptionattributeisanoptionalattributeofthexDocumentClasselement.

Thevalueofthedescriptionattributecancontainupto255characters.

ExampleThefollowingisanexampleofthedescriptionattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

ShowAll

designModeAttribute(viewElement)

Determineswhethertheview(*.xsl)filespecifiedinaviewelementcanbeopenedindesignmodeinMicrosoftOfficeInfoPath2003.

Typexsf:xdDesignMode

ParentElements

Element Descriptionview ContainsinformationaboutaMicrosoftOfficeInfoPath2003

view.

Definition

<xsd:attributename="designMode"type="xsf:xdDesignMode"></xsd:attribute>

RemarksYoucancreateacustomviewforaformtemplatebycreatinganXSLTransformation(XSLT)(*.xsl)filethatcontainsconstructsthatarenotsupportedindesignmodeinInfoPath.Toensurethataviewcan'tbeopenedindesignmode(andtopreventdataloss),setthedesignModeattributeintheformdefinitionfile(.xsf)to"protected".Protectedviewsareshowninallviewslistsanduserscanbefillthemoutlikeallforms,buttheycannotbeopenedindesignmode.IfthedesignModeattributeisspecifiedas"normal"orisnotspecified,theviewcanbeopenedindesignmode.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthedesignModeattributeasitisusedintheviewelement:

<xsf:viewname="View"caption="View"designMode="protected"><xsf:mainpanetransform="view1.xsl"/>...</xsf:view>

ShowAll

detailKeyAttribute

ContainstheXPathofthefieldinthedetailXMLfragmentthatformstherelationshiptothemasterXMLfragment.

Typexsd:string

ParentElements

Element DescriptionmasterDetailDefinestheXMLfragmentsthatformamasteranddetail

relationshipinaview'srepeatingtablesorrepeatingsections.

Definition

<xsd:attributename="detailKey"type="xsd:string"></xsd:attribute>

RemarksUsearelativeXPathforthedetailKeyattribute.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthedetailKeyattributeasitisusedinthemasterDetailelement:

<xsf:editWithcaption="group2"xd:autogeneration="template"component="xCollection"><xsf:masterDetailmasterViewContext="CTRL1_5"master="my:group2"masterKey="my:field1"detailKey="my:field3"></xsf:masterDetail></xsf:editWith>

disableMenuItemAttribute

Specifieswhetherthemenuitemforthesubmitoperationshouldbedisabled.

Type

xsf:xdYesNo

RemarksThedisableMenuItemattributeisanoptionalattributeofthesubmitelement.

Allowedvaluesare"yes"and"no".Thedefaultvalueis"no".

ExampleThefollowingisanexampleofthedisableMenuItemattributeasitisusedinthesubmitelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useScriptHandler/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

enabledAttribute

Specifieswhetherformmergingisenabledfortheform.

Type

xsf:xdYesNo

RemarksTheenabledattributeisarequiredattributeoftheimportParameterselement.

Valuesinclude"yes"or"no".Thedefaultvalueis"yes".

ExampleThefollowingisanexampleoftheenabledattributeasitisusedintheimportParameterselement:

<xsf:importParametersenabled="yes"<xsf:importSourcename=""schema="MySchema.xsd"transform="schematransform.xslt"/></xsf:importParameters>

ShowAll

enforceScriptTimeoutAttribute

Specifieswhethertoenableordisableatime-outperiodforscriptsinaform.

Typexsf:xdYesNo

ParentElements

Element Descriptionscripts Definesthesourceofallbusinesslogicscriptsusedatthe

documentlevelintheform.

Definition

<xsd:attributename="enforceScriptTimeout"type="xsf:xdYesNo"use="optional"default="yes"></xsd:attribute>

RemarksSettingtheenforceScriptTimeoutattributeto"no"intheformdefinitionfile(.xsf)disablesthetime-outperiodforscriptsrunningintheform.Thedefaultvalueis"yes".

Forcoderunninginataskpane,thereisaseparatetime-outperiodprovidedbyMicrosoftInternetExplorer.Thistime-outperiodisnotaffectedbythevalueoftheenforceScriptTimeoutattribute.

Atime-outperiodcannotbespecifiedformanagedcodeinInfoPathforms.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheenforceScriptTimeoutattributeasitisusedinthescriptselement:

<xsf:scriptslanguage="jscript"enforceScriptTimeout="no"><xsf:scriptsrc="internal.js"/><xsf:scriptsrc="script.js"/></xsf:scripts>

ShowAll

expressionAttribute

AnXPathexpression(relativetotheexpressionContextattribute,ifspecified)thatmustbeevaluatedtovalidatetheXMLDocumentObjectModel(DOM)nodespecifiedinthematchattribute.

Type

xsd:string

RemarksTheexpressionattributeisarequiredattributeoftheerrorConditionelement.

IfthespecifiedexpressionevaluatestoTrue,itisconsideredtobeanerrorconditionandthespecifiederrormessageisdisplayed.

ExampleThefollowingisanexampleoftheexpressionattributeasitisusedintheerrorConditionelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

ShowAll

expressionAttribute(assignmentActionElement)

ContainsanXPathexpressiontopopulatethevalueofthetargetFieldattribute.

Typexsd:string

ParentElements

Element DescriptionassignmentAction Definesanactiontosetthevalueofafield.

Definition

<xsd:attributename="expression"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheexpressionattributeasitisusedintheassignmentActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

ShowAll

expressionAttribute(calculatedFieldElement)

Containstheformula,intheformofanXPathexpression,tobeevaluated.Theresultisstoredinthetargetlocation.

Typexsd:string

ParentElements

Element DescriptioncalculatedField Definesanindividualcalculation,includingtheformula,

whenthecalculationistobeperformed,andwheretheresultwillbestored.

Definition

<xsd:attributename="expression"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheexpressionattributeasitisusedinthecalculatedFieldelement:

<xsf:calculations><xsf:calculatedFieldtarget="/my:myFields/my:average"expression="xdMath:Avg(../my:expenses/my:expense/my:amount)"refresh="onChange"/></xsf:calculations>

ShowAll

expressionContextAttribute

SpecifiestheXMLDocumentObjectModel(DOM)nodeonwhichtheexpressionspecifiedintheexpressionattributeisrooted.

Type

xsd:string

RemarksTheexpressionContextattributeisanoptionalattributeoftheerrorConditionelement.

ItcontainsarelativeXPathexpressionthatidentifiestheXMLDOMnode(withinthecontextofthematchedXMLDOMnode)onwhichtheexpressionisrootedandthereforeshouldbeevaluated.Thedefaultvalueis"."ThisisthesameasthematchedXMLDOMnode.

ExampleThefollowingisanexampleoftheexpressionContextattributeasitisusedintheerrorConditionelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

featureAttribute

SetswhethertheAutoRecoverfeatureisenabled.

Typexsf:xdEnabledDisabled

ParentElements

Element DescriptionautoRecovery SpecifieswhethertheformwillsaveAutoRecover

informationandwhethertheAutoRecoversettingcanbechangedbytheuser.

Definition

<xsd:attributename="feature"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute>

RemarksSettingthisattributetoavalueotherthan"enabled"or"disabled"willresultinanerrormessagewhenyouattempttoopentheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthefeatureattributeasitisusedintheautoRecoveryelement:

<xsf:autoRecovery feature="disabled"/>

ShowAll

fieldAttribute

SpecifiesarelativeXPathexpressionfromtheXMLDocumentObjectModel(DOM)nodespecifiedbytheitemattributeofthexmlToEditelement.

Type

xsd:string

RemarksThefieldattributeisanoptionalattributeoftheeditWithelement.

ThefieldattributereferstotheXMLDOMnodeintheform'sunderlyingXMLdocument,whichistobedisplayedasaneditablefieldforanxTextlisteditingcomponent.Thedefaultvalueis'.',whichcorrespondstoeditingthetextcontentoftheXMLDOMnodespecifiedbytheitemattributeofthexmlToEditelement.

ExampleThefollowingisanexampleofthefieldattributeasitisusedintheeditWithelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithautoComplete="no"field="@artist"component="xTextList"></xsf:editWith></xsf:xmlToEdit></xsf:editing>

ShowAll

fileUrlAttribute

ContainstheUniformResourceLocator(URL)ofthe.xmlfile.

Type

xsd:anyURI

RemarksThefileUrlattributeisarequiredattributeofthexmlFileAdapterelement.

ExampleThefollowingisanexampleofthefileUrlattributeasitisusedinthexmlFileAdapterelement:

<xsf:query><xsf:xmlFileAdapterfileUrl="currencies.xml"/></xsf:query>

ShowAll

filterAttribute

SpecifiestheXPathexpressionofthestructuredXMLsubtreewhensubmittingasubsetoftheXMLdata.

Typexsd:string

ParentElements

Element DescriptionpartFragmentDefinesonesubstitutiongroupforaspecificpartofthe

inputSimpleObjectAccessProtocol(SOAP)message.

Definition

<xsd:attributename="filter"type="xsd:string"use="optional"></xsd:attribute>

RemarksUsethefilterattributewhensubmittingtheselectedfieldorgroupasastructuredXMLsubtree,includingthetags.Canbeomittedwhensubmittingthecontentofthefieldorgroup.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthefilterattributeasitisusedinthepartFragmentelement:

<xsf:partFragmentmatch="/dfs:myFields/dfs:dataFields/s0:IsPrime/s0:inValue"replaceWith=/dfs:myFields/dfs:dataFields/s0:IsPrime"filter="."sendAsString="yes"/>

ShowAll

filterDependencyAttribute

Specifiesautomaticreapplicationofafilterwhenfilterfieldschange.

Typexsd:string

ParentElements

Element DescriptioneditWith Specifiesaninstanceofaneditingcomponent,andprovides

thecorrespondingparameterstodetermineitsexactbehavior.

Definition

<xsd:attributename="filterDependency"type="xsd:string"use="optional"></xsd:attribute>

RemarksThefilterDependencyattributeintheformdefinitionfile(.xsf)isalwayspresentforfiltersthatarespecifiedonrepeatingtablesandrepeatingsectionscreatedinthedesigner.EventhoughthereisnowaytotogglefilterDependencyonandoffindesignmodeinInfoPath,youcanturnoffautomaticrefreshingoffiltersbyremovingthefilterDependencyattributefromtheeditWithelementintheformdefinitionfile.

WhenthefilterDependencyattributeispresent,thefilterisreappliedwhentheonAfterChangeeventofanodeisraised.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthefilterDependencyattributeasitisusedintheeditWithelement:

<editWithcomponent="xCollection"widgetIcon="filter|standard"useFilter="yes|no"filterDependency="xpath1|xpath2|xpath3>

ShowAll

followingSiblingsAttribute

SpecifiesarelativeXPathexpressionfromtheparentnodethatspecifiestheXMLDocumentObjectModel(DOM)nodespriortowhichtheinsertionoftheXMLfragmentshouldoccur.

Type

xsd:string

RemarksThefollowingSiblingsattributeisanoptionalattributeofthechooseFragmentelement.

Theinsertionwillbeasachildoftheparentnode,butitwillbepriortoanynodesfoundthatsatisfytheXPathexpressionspecifiedbythefollowingSiblingsattribute.Ifnonodesarefound,theinsertionactsasanappend.

ThefollowingSiblingsattributeisonlyusedduringaninsertwhenthecurrentcontextisnotinanitem.Thebehavioristoappendtothecontentoftheparentnode,unlessthefollowingSiblingsattributeisspecified,inwhichcasetheinsertionisstillwithinthecontentoftheparent,butpriortoanyfollowingSiblingsnodes.

ExampleThefollowingisanexampleofthefollowingSiblingsattributeasitisusedinthechooseFragmentelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"followingSiblings="."><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

ShowAll

footerAttribute

Specifiesthefootertextwhenprintingaview.

Type

xsd:string

RemarksThefooterattributeisanoptionalattributeoftheprintSettingselement.TheprintSettingselementalsoprovidesaheaderattribute.

Thefooterattributecannotbegreaterthan255charactersinlength.

Whenusingaheaderorfooterinaform,thereareanumberofvariablesthatcanbeusedtodisplayinformationsuchaspagenumbers,dates,andtimes;ortoalignthetextthattheheaderorfootercontains.

Headerandfootervariables

ExampleThefollowingisanexampleofthefooterattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

ShowAll

fullyEditableNamespaceAttribute

IdentifiesthenamespaceofanXMLSchemaintheformtemplatethatcanbeentirelymodifiedinMicrosoftOfficeInfoPath2003designmode.

Type

xsd:anyURI

RemarksThefullyEditableNamespaceattributeisanoptionalattributeofthesolutionPropertieselement.

ExampleThefollowingisanexampleofthefullyEditableNamespaceattributeasitisusedinthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.1.0.10"fullyEditableNamespace="urn:namespace1:mynames"/></xsf:applicationParameters>

ShowAll

handlerObjectAttribute

Identifiestheuniquenameoftheeventhandlerinthescriptingcode.

Type

xsd:string

RemarksThehandlerObjectattributeisarequiredattributeofthedomEventHandlerelement.

ThereferencedscriptmustusethisnametodefineeventhandlersforthespecifiedXMLDocumentObjectModel(DOM)node.Forexample,scriptmaycontainfunctionssuchasTravelExpenses::OnValidateandTravelExpenses::OnAfterChangethatarecalledwheneverthespecifiedeventsoccuratthematchingXMLDOMnode.

ExampleThefollowingisanexampleofthehandlerObjectasitisusedinthedomEventHandlerelement:

<xsf:domEventHandlers><xsf:domEventHandlermatch="TravelReport/Expenses"handlerObject="TravelExpenses"/></xsf:domEventHandlers>

ShowAll

headerAttribute

Specifiestheheadertextwhenprintingaview.

Type

xsd:string

RemarksTheheaderattributeisanoptionalattributeoftheprintSettingselement.TheprintSettingselementalsoprovidesafooterattribute.

Theheaderattributecannotbegreaterthan255charactersinlength.

Whenusingaheaderorfooterinaform,thereareanumberofvariablesthatcanbeusedtodisplayinformationsuchaspagenumbers,dates,andtimes;ortoalignthetextthattheheaderorfootercontains.

Headerandfootervariables

ExampleThefollowingisanexampleoftheheaderattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

ShowAll

hideStatusBarDisplayattribute

Specifieswhetherthecurrentroleisdisplayedinthestatusbar.

Typexsf:xdYesNo

ParentElements

Element Descriptionroles Definesroles.

Definition

<xsd:attributename="hideStatusBarDisplay"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksThenameoftheroleforthecurrentuserisdisplayedinthestatusbar.Iftheroleofauserischangedprogrammatically,thestatusbarisupdated.

ThevalueofthehideStatusBarDisplayattributeis"no"bydefault.Iftheattributeisnotincludedintheroleselement,therefore,theroleofthecurrentuserisdisplayedinthestatusbar.ThehideStatusBarDisplayattributemustbeincludedintheroleselementanditsvaluemustbesetto"yes"topreventtheroleforthecurrentuserfrombeingdisplayedinthestatusbar.

ThereisnomechanismintheuserinterfaceofInfoPathforchangingthehideStatusBarDisplayattribute.Toaddthisattributetotheroleselementortochangeitsvalue,theformdefinitionfile(.xsf)ofaformmustbeeditedmanually.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthehideStatusBarDisplayattributeasitisusedintheroleselement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

ShowAll

hrefAttribute(initialXmlDocumentElement)

SpecifiesthenameoftheXMLtemplatefiletobeusedwhenauserclicksFillOutaFormontheFilemenu.

Type

xsf:xdFileName

RemarksThehrefattributeisarequiredattributeoftheinitialXmlDocumentelement.

ExampleThefollowingisanexampleofthehrefattributeasitisusedintheinitialXmlDocumentelement:

<xsf:fileNew><xsf:initialXmlDocumentcaption="TravelReport"href="TravelReportTemplate.xml"/></xsf:fileNew>

ShowAll

hrefAttribute(taskpaneElement)

SpecifiestherelativeorabsoluteUniformResourceLocator(URL)toan.htmlfile.

Type

xsd:string

RemarksThehrefattributeisarequiredattributeofthetaskpaneelement.

The.htmlfileisloadedintoaninstanceofthetaskpanewhenaformisopened.The.htmlfilecanincludebusinesslogicscriptingcodeandcanaccessappropriateMicrosoftOfficeInfoPath2003objectmodelmembers.

ExampleThefollowingisanexampleofthehrefattributeasitisusedinthetaskpaneelement:

<xsf:xDocumentClass>...<xsf:taskpanecaption="MyCustomTaskPane"href="MyCustomTaskPane.htm"/>...</xsf:xDocumentClass>

ShowAll

hrefAttribute(useHttpHandlerElement)

SpecifiestheUniformResourceLocator(URL)towhichtheformshouldbesubmitted.

Type

xsd:anyURI

RemarksThehrefattributeisarequiredattributeoftheuseHttpHandlerelement.

ExampleThefollowingisanexampleofthehrefattributeasitisusedbytheuseHttpHandlerelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useHttpHandler>href="http://MyServer/InfoPathScripts/MyScript.asp"method="POST"</xsf:useHttpHandler><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

ShowAll

iconAttribute

ProvidesaUniformResourceLocator(URL)toabitmap(.bmp)orgraphicsinterchangeformat(.gif)file,whichisusedforthebuttonormenuitem.

Type

xsd:string

RemarksTheiconattributeisanoptionalattributeofthebuttonelement.

Ifaniconisnotspecified,thecaptionalonewillbeused.Ifbothcaptionandiconarespecified,bothwillbedisplayed.Alternatively,thevaluecanalsobeanID,allowingaccesstointernalsystemicons.Ifthevalueisaninteger,itwillbeinterpretedasanID.

ExampleThefollowingisanexampleoftheiconattributeasitisusedinthebuttonelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"icon="cd.bmp"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"icon="track.bmp"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"icon="label.bmp"></xsf:button></xsf:menu></xsf:menuArea>

ShowAll

infopathGroupAttribute

ContainsthenameofthegroupunderwhichallfieldsinaSharePointlistorlibrarywillbestored.

Typexsd:string

ParentElements

Element DescriptionsharepointListAdapter Containsthedataadapterinformationtoquery

aSharePointlistorlibrary.

Definition

<xsd:attributename="infopathGroup"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheinfopathGroupattributeasitisusedinthesharepointListAdapterelement:

<xsf:sharepointListAdaptername="StatusReportlibrary"siteUrl=”http://xyzco/reports/”sharepointGuid="{ABD2E239-0EE7-48F4-B506-C38A1728E195}"infopathGroup="XyzReportsLibrary"queryAllowed="yes><xsf:fieldsharepointName="File_x0020_Type"infopathName="Type"></xsf:field><xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"></xsf:field></xsf:sharepointListAdapter>

infopathNameAttribute

Anattributeofthefieldelement.ContainsthecorrespondingInfoPathfieldnameforthesharepointNameattribute.

Typexsd:string

ParentElements

Element Descriptionfield Containsfieldmappinginformationforeachfieldina

SharePointlistorlibraryandthecorrespondingnameusedinMicrosoftOfficeInfoPath.

Definition

<xsd:attributename="infopathName"type="xsd:string"use="required"></xsd:attribute>

RemarksTheinfopathNameappearsasthefieldnamesinMicrosoftOfficeInfoPath2003SP1forthefieldsreturnedfromtheSharePointlistorlibrary.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheinfopathNameattributeasitisusedinthefieldelement:

<xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"isLookup="no"></xsf:field>

initiatorAttribute

Designatesaparticularroleastheinitiatorrole.

Typexsd:string

ParentElements

Element Descriptionroles Definesroles.

Definition

<xsd:attributename="initiator"type="xsd:string"use="optional"></xsd:attribute>

RemarksIfausercreatesanewInfoPathdocumentfromaformtemplate,thatuserisassignedtotherolethathasbeendesignatedastheinitiatorrole.Ifnoroleisdesignatedastheinitiatorroleintheformdefinitionfileofaform(thatis,iftheinitiatorattributeisnotincludedfortheroleselement),userswhocreateformsfromtheaccompanyingformtemplateretaintherolestowhichtheyareassignedinthemembershipelementoftheroleselement.Afteraformhasbeensaved,closed,andreopened,InfoPathnolongerchecksfortheinitiatorattribute.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheinitiatorattributeasitisusedintheroleselement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

initOnLoadAttribute

Specifieswhetherthedataobjectshouldbeinitializedondocumentload.

Type

xsf:xdYesNo

RemarksTheinitOnLoadattributeisanoptionalattributeofthedataObjectelement.

Allowedvaluesare"yes"and"no".Thedefaultvalueis"no".

ExampleThefollowingisanexampleoftheinitOnLoadattributeasitisusedinthedataObjectelement:

<xsf:dataObjects><xsf:dataObjectname="EmployeeNames"schema="EmployeeNames.xsd"initOnLoad="yes"><xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter> </xsf:query> </xsf:dataObject> </xsf:dataObjects>

ShowAll

innerFragmentAttribute

SpecifiesarelativeXPathexpressionfromtheparentnodetothesmallestfragmenttobeinserted.

Typexsd:string

ParentElements

Element DescriptionchooseFragment SpecifiesanXMLfragment.

Definition

<xsd:attributename="innerFragment"type="xsd:string"use="optional"></xsd:attribute>

RemarksTheinnerFragmentattributeisusedtoidentifythepositionofthecurrentdatacontextwithinthefragment,andtochoosetherightsubtreetoinsert.Thisreducestheneedtodefinemultiplefragmentsintheformdefinitionfile(.xsf)fordifferentdatacontexts.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheinnerFragmentattributeasitisusedinthechooseFragmentelement:

<xsf:xmlToEditname="expense_1"item="/my:myFields/my:expenses/my:expense"container="/my:myFields"><xsf:editWithcaption="expense"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentinnerFragment="my:expenses/my:expense"><my:expenses><my:expense/></my:expenses></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit>

ShowAll

isEnabledAttribute

Specifieswhethertheruleisenabledfortheform.

Typexsf:xdYesNo

ParentElements

Element Descriptionrule Definesanactioninvokedafteraneventhasoccurredinthe

form.

Definition

<xsd:attributename="isEnabled"type="xsf:xdYesNo"use="optional"default="yes"></xsd:attribute>

RemarksThedefaultvaluefortheisEnabledattributeis"yes".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheisEnabledattributeasitisusedintheruleelement:

<xsf:ruleSets><xsf:ruleSetname="RuleSet1"><xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetreceipts!</xsf:dialogBoxMessageAction><xsf:openNewDocumentActionsolution="urn:approvalForm"/><xsf:exitRuleSet/></xsf:rule><xsf:rulecaption="AlwaysSubmit"isEnabled="no"><xsf:submitActionadapter="ExpenseDatabase"/></xsf:rule></xsf:ruleSet>

<xsf:ruleSetname="RuleSet2"><xsf:rulecaption="Lookupcontact"><xsf:queryActionadapter="Contacts"/></xsf:rule></xsf:ruleSet></xsf:ruleSets>

isLookupAttribute

SpecifieswhetherafieldinaSharePointlistisalookupfield.

Typexsf:xdYesNo

ParentElements

Element Descriptionfield ContainsfieldmappinginformationforeachSharePointfield

andthecorrespondingnameusedinMicrosoftOfficeInfoPath2003SP1.

Definition

<xsd:attributename="isLookup"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksThedefaultvaluefortheisLookupattributeis"no".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheisLookupattributeasitisusedinthefieldelement:

<xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"isLookup="no"></xsf:field>

ShowAll

itemAttribute

SpecifiesanXPathexpressionthatdeterminestheXMLDocumentObjectModel(DOM)nodestobeeditedusingtheeditingcomponentdefinedintheeditWithelement.

Type

xsd:string

RemarksTheitemattributeisarequiredattributeofthexmlToEditelement.

ExampleThefollowingisanexampleoftheitemattributeasitisusedinthexmlToEditelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

languageAttribute

Definesthescriptlanguageusedinthebusinesslogicsourcefiles.

Type

xsf:xdScriptLanguage

RemarksThelanguageattributeisarequiredattributeofthescriptselement.

Allowedvaluesinclude"vbscript","jscript",and"javascript".Thedefaultvalueis"jscript".

ExampleThefollowingisanexampleofthelanguageattributeasitisusedinthescriptselement:

<xsf:scriptslanguage="jscript"enforceScriptTimeout="no"><xsf:scriptsrc="internal.js"/><xsf:scriptsrc="script.js"/></xsf:scripts>

ShowAll

lastOpenViewAttribute

IdentifiesthenameoftheviewthatwaslastopeninMicrosoftOfficeInfoPath2003designmode.

Type

xsd:string

RemarksThelastOpenViewattributeisanoptionalattributeofthesolutionPropertieselement.

ThenexttimetheformisopenedinInfoPathdesignmode,thisviewisautomaticallydisplayed.Thevalueforthisattributeshouldbeanexistingviewnameintheformtemplate.

ExampleThefollowingisanexampleofthelastOpenViewattributeasitisusedinthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.0.0.10"fullyEditableNamespace="urn:namespace1:mynames"/></xsf:applicationParameters>

ShowAll

lastVersionNeedingTransformAttribute

Identifies,temporarily,thevalueofthemaxToVersionUpgradeattributeinthedocumentVersionUpgradeelementforupgradewithan.xsltfileifscriptingcodeisbeingusedfortheupgrade.

Type

xsf:xdSolutionVersion

RemarksThelastVersionNeedingTransformattributeisanoptionalattributeofthesolutionPropertieselement.

ExampleThefollowingisanexampleofthelastVersionNeedingTransformattributeasitisusedinthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.0.0.10"fullyEditableNamespace="urn:namespace1:mynames"/></xsf:applicationParameters>

leftMarginAttribute

Specifiestheleftmarginwhenprintingaview.

Type

xsd:string

RemarksTheleftMarginattributeisanoptionalattributeoftheprintSettingselement.

TheleftMarginattributemustbegreaterthanorequaltozero.

ExampleThefollowingisanexampleoftheleftMarginattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

ShowAll

locationAttribute

ContainsthenamespaceUniformResourceIdentifier(URI)andlocation(aUniformResourceLocator(URL),relativetotheformdefinition(.xsf)file),anddelimitedbyaspace,ofthe.xsdfiledefiningtheXMLSchema.

Type

xsd:string

RemarksThelocationattributeisarequiredattributeofthedocumentSchemaelement.

Non-namespace-basedXMLSchemasarelistedwithjustthe.xsdfile,omittingthenamespacedeclarationandthewhitespacedelimiter.

ExampleThefollowingisanexampleofthelocationattributeasitisusedinthedocumentSchemaelement:

<xsf:documentSchemas><xsf:documentSchemalocation="urn:schema:custom:NamespacecustomFilename.xsd"rootSchema="yes"/></xsf:documentSchemas>

marginUnitsTypeAttribute

Specifiesthemarginunitsizewhenprintingaview.

Type

xsd:NMTOKEN

RemarksThemarginUnitsTypeattributeisanoptionalattributeoftheprintSettingselement.

Valuesinclude"in"(inch)and"cm"(centimeter).

ExampleThefollowingisanexampleofthemarginUnitsTypeattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

ShowAll

masterAttribute

ContainstheXPathoftheXMLfragmentthatisboundtoamastertableorsection.

Typexsd:string

ParentElements

Element DescriptionmasterDetailDefinestheXMLfragmentsthatformamasteranddetail

relationshipinaview'srepeatingtablesorrepeatingsections.

Definition

<xsd:attributename="master"type="xsd:string"></xsd:attribute>

RemarksUsearelativeXPathforthemasterattribute.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthemasterattributeasitisusedinthemasterDetailelement:

<xsf:editWithcaption="group2"xd:autogeneration="template"component="xCollection"><xsf:masterDetailmasterViewContext="CTRL1_5"master="my:group2"masterKey="my:field1"detailKey="my:field3"></xsf:masterDetail></xsf:editWith>

ShowAll

masterKeyAttribute

ContainstheXPathofthefieldinthemasterXMLfragmentthatformstherelationshiptothedetailXMLfragment.

Typexsd:string

ParentElements

Element DescriptionmasterDetailDefinestheXMLfragmentsthatformamasteranddetail

relationshipinaview'srepeatingtablesorrepeatingsections.

Definition

<xsd:attributename="masterKey"type="xsd:string"></xsd:attribute>

RemarksUsearelativeXPathforthemasterKeyattribute.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthemasterKeyattributeasitisusedinthemasterDetailelement:

<xsf:editWithcaption="group2"xd:autogeneration="template"component="xCollection"><xsf:masterDetailmasterViewContext="CTRL1_5"master="my:group2"masterKey="my:field1"detailKey="my:field3"></xsf:masterDetail></xsf:editWith>

ShowAll

masterViewContextAttribute

ContainsastringthatidentifiesanHTMLelementintheview.

Typexsd:string

ParentElements

Element DescriptionmasterDetailDefinestheXMLfragmentsthatformamasteranddetail

relationshipinaview'srepeatingtablesorrepeatingsections.

Definition

<xsd:attributename="masterViewContext"type="xsd:string"></xsd:attribute>

RemarksThevalueofthemasterViewContextattributespecifiesanelementthathasanxd:CtrLIdattributewithamatchingvalueintheHTMLthatrepresentsaviewoftheform.Forexample,amasterViewContextattributewithavalueof"myID"correspondstotheelementthathasavalueof"myID"foritsxd:CtrlIdattribute.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthemasterViewContextattributeasitisusedinthemasterDetailelement:

<xsf:editWithcaption="group2"xd:autogeneration="template"component="xCollection"><xsf:masterDetailmasterViewContext="CTRL1_5"master="my:group2"masterKey="my:field1"detailKey="my:field3"></xsf:masterDetail></xsf:editWith>

ShowAll

matchAttribute(domEventHandlerElement)

IdentifiestheXMLDocumentObjectModel(DOM)nodeforwhichtheeventhandlerisdeclared.

Type

xsd:string

RemarksThematchattributeisarequiredattributeofthedomEventHandlerelement.

ThevaluemustbeavalidXPathexpressionthatidentifiestheXMLDOMnode.

NoteTheXPathexpressioncannotcontainpredicates.

ExampleThefollowingisanexampleofthematchattributeasitisusedinthedomEventHandlerelement:

<xsf:domEventHandlers><xsf:domEventHandlermatch="TravelReport/Expenses"handlerObject="TravelExpenses"/></xsf:domEventHandlers>

ShowAll

matchAttribute(errorConditionElement)

IdentifiestheXMLDocumentObjectModel(DOM)nodesonwhichthecustomvalidationisdeclared.

Type

xsd:string

RemarksThematchattributeisarequiredattributeoftheerrorConditionelement.

ExampleThefollowingisanexampleofthematchattributeasitisusedintheerrorConditionelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

ShowAll

matchAttribute(overrideElement)

IdentifiestheXMLDocumentObjectModel(DOM)nodeforwhichtheerrormessageoverrideisdefined.

Type

xsd:string

RemarksThematchattributeisarequiredattributeoftheoverrideelement.

ThevalueofthematchattributemustbeavalidXPathexpressionthatidentifiestheXMLDOMnode.

ExampleThefollowingisanexampleofthematchattributeasitisusedintheoverrideelement:

<xsf:schemaErrorMessages><xsf:overridematch="/sampleData/number"><xsf:errorMessageshortMessage="InvalidNumber.">Thevalueenteredmustbeavalidnumber.</xsf:errorMessage></xsf:override></xsf:schemaErrorMessages>

ShowAll

matchAttribute(partFragmentElement)

ContainsanXPathexpressionthatidentifiestheelementsandattributesinsidetheinputSimpleObjectAccessProtocol(SOAP)messagethataretobereplacedatruntime.

Type

xsd:string

RemarksThematchattributeisarequiredattributeofthepartFragmentelement.

ExampleThefollowingisanexampleofthematchattributeasitisusedinthepartFragmentelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"><xsf:partFragmentmatch="/dfs:myFields/dfs:dataFields/s0:IsPrime/s0:inValue"replaceWith="/dfs:myFields/dfs:dataFields/s0:IsPrime"/></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

maxLengthAttribute

Definesthelengthofthefieldinnumberofbytes.

Type

xsd:byte

RemarksThemaxLengthattributeisanoptionalattributeofthefieldelement.

ExampleThefollowingisanexampleofthemaxLengthattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"maxLength="10"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

maxLengthAttribute(editWithElement)

Specifiesthemaximumnumberofcharactersallowedforplainsinglelinetextboxes.

Typexsd:simpleType

ParentElements

Element DescriptioneditWith Specifiesaninstanceofaneditingcomponent,andprovides

thecorrespondingparameterstodetermineitsexactbehavior.

Definition

<xsd:attributename="maxLength"use="optional"><xsd:simpleType><xsd:restrictionbase="xsd:integer"><xsd:minInclusivevalue="-1"/><xsd:maxInclusivevalue="9999"/></xsd:restriction></xsd:simpleType></xsd:attribute>

RemarksThemaxLengthattributeisonlyvalidforplain-texteditcontrolsthatdonotallowparagraphbreaks.SuchcontrolscorrespondtoeditWithelementswithacomponentattributesetto"xField"andatypeattributesetto"plain"(orwithoutatypeattributespecified).

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthemaxLengthattributeasitisusedintheeditWithelement:

<editWithcomponent="xField"maxLength="100">

maxVersionToUpgradeAttribute

Inclusivevalueforthelatestformthatneedstobeupgraded.

Type

xsf:xdSolutionVersion

RemarksThemaxVersionToUpgradeattributeisanoptionalattributeoftheuseTransformelement.

ExampleThefollowingexampleshowsthemaxVersionToUpgradeattributeasitisusedintheuseTransformelement:

<xsf:documentVersionUpgrade><xsf:useTransformtransform="upgrade.xsl"minVersionToUpgrade="0.0.0.0"maxVersionToUpgrade="1.0.0.5"/></xsf:documentVersionUpgrade>

ShowAll

memberOfAttribute(getUserNameFromDataElement)

SpecifiestheroletobeassociatedwithauserwhoseusernameisreturnedbyanXPathqueryofadatasource.

Typexsd:string

ParentElements

Element DescriptiongetUserNameFromData RetrievesausernamebyusinganXPath

queryofthedatainthemaindatasourceorinasecondarydatasource.

Definition

<xsd:attributename="memberOf"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthememberOfattributeasitisusedinthegetUserNameFromDataelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"<xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

memberOfAttribute(groupElement)

Specifiestheroletowhichagroupisassigned.

Typexsd:string

ParentElements

Element Descriptiongroup Associatesagroupwithaparticularrole.

Definition

<xsd:attributename="memberOf"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthememberOfattributeasitisusedinthegroupelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

memberOfAttribute(userNameElement)

Specifiestheroletowhichauserisassigned.

Typexsd:string

ParentElements

Element DescriptionuserName Associatesauserwithaparticularrole.

Definition

<xsd:attributename="memberOf"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthememberOfattributeasitisusedintheuserNameelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

methodAttribute

SpecifiestheHTTPmethodtouseforthesubmitoperation.

Type

xsd:NMTOKEN

RemarksThemethodattributeisarequiredattributeoftheuseHttpHandlerelement.

Theonlysupportedvalueis"POST".

ExampleThefollowingisanexampleofthemethodattributeasitisusedbytheuseHttpHandlerelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useHttpHandler>href="http://MyServer/InfoPathScripts/MyScript.asp"method="POST"</xsf:useHttpHandler><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

ShowAll

minVersionToUpgradeAttribute

Inclusivevaluefortheoldestformthatcanbeupgraded.

Type

xsf:xdSolutionVersion

RemarksTheminVersionToUpgradeattributeisarequiredattributeoftheuseTransformelement.

TheminVersionToUpgradeattributeisusedtopreventrunningtheXSLTransformation(XSLT)onformssodifferentfromthecurrentonethattheXSLTcausesriskofdataloss.

ExampleThefollowingexampleshowstheminVersionToUpgradeattributeasitisusedintheuseTransformelement:

<xsf:documentVersionUpgrade><xsf:useTransformtransform="upgrade.xsl"minVersionToUpgrade="0.0.0.0"maxVersionToUpgrade="1.0.0.5"/></xsf:documentVersionUpgrade>

modeAttribute

SpecifiesthesignaturerelationshipforthesignedDataBlockelement.

Typexsf:xdSignatureRelationEnum

ParentElements

Element DescriptionsignedDataBlock Definesanodesetintheform'sunderlyingXML

documenttowhichadigitalsignaturecanbeapplied

Definition

<xsd:attributename="mode"type="xsf:xdSignatureRelationEnum"use="required"></xsd:attribute>

RemarksThedefaultmodeofasignedDataBlockelementissingle.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthemodeattributeasitisusedinthesignedDataBlockelement:

<xsf:documentSignatures><xsf:signedDataBlockname="main"data="my:myfields/my:subtree1|my:myfields/my:subtree2"signatureLocation="my:mifields/sig:signatures/main"mode="countersign"><xsf:message>Bypressingthe&quot;Sign&quot;buttonbelow,Iagreetobeboundtothetermsofthisdocument.</xsf:message></xsf:signedDataBlock></xsf:documentSignatures>

nameAttribute(actionElement)

TheuniquenameoftheactionasspecifiedbytheMicrosoftBizTalk2003HumanWorkflowServices(HWS)workflowdesigner.

Typexsf:xdHWSname

ParentElements

Element Descriptionaction Containstheinformationforanindividualaction.

Definition

<xsd:attributename="name"type="xsf:xdHWSname"use="required"></xsd:attribute>

RemarksThenameattributeisarequiredattributeoftheactionelement.

ThenameisusedfortheonClickeventofthecorrespondingbuttonintheWorkflowtaskpane.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthenameattributeasitisusedintheactionelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

ShowAll

nameattribute(adoAdapterelement)

ContainsthenameoftheadoAdapterelement.

Typexsf:xdTitle

ParentElements

Element DescriptionadoAdapter DefinesanActiveXDataObjects(ADO)dataadapterthat

retrievesdatafromanADOdatasourceforthespecifieddataobject.

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="optional"></xsd:attribute>

RemarksThenameattributeisanoptionalattributeoftheadoAdapterelement.

ExampleThefollowingisanexampleofthenameattributeasitisusedintheadoAdapterelement:

<xsf:query><xsf:adoAdaptername="EmpInformation"connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query>

ShowAll

nameAttribute(buttonElement)

UsedtoassociatetheOnClickeventhandlerofthebuttonwithascriptingfunction.

Type

xsd:NMTOKEN

RemarksThenameattributeisanoptionalattributeofthebuttonelement,butisrequiredforbuttonsthatusescriptingcodefortheiractions.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthebuttonelement:

<xsf:menuAreaname="msoViewMenu"><xsf:buttoncaption="CDCollection"name="SwitchToView0"></xsf:button><xsf:buttoncaption="AllTracks"name="SwitchToView1"></xsf:button></xsf:menuArea>

Intheform'sinternalscriptingfile,thefollowingeventhandlersareusedforthebuttonactions:

functionSwitchToView0::OnClick(){XDocument.View.SwitchView("CDCollection");}

functionSwitchToView1::OnClick(){XDocument.View.SwitchView("AllTracks");}

ShowAll

nameAttribute(customCategoryElement)

Specifiesthenameofthecustomcategory.

Typexsf:xdTitle

ParentElements

Element DescriptioncustomCategory Specifiesthecategorythattheformtemplateappears

underintheFillOutaFormtaskpane.

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute>

RemarksThenameattributeisarequiredattributeofthecustomCategoryelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthecustomCategoryelement:

<xsf:customCategoryname="Reports"/>

nameAttribute(dataObjectElement)

Theuniquenameforthedataobject.

Type

xsf:xdTitle

RemarksThenameattributeisarequiredattributeofthedataObjectelement.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthedataObjectelement:

<xsf:dataObjects><xsf:dataObjectname="EmployeeNames"schema="EmployeeNames.xsd"initOnLoad="yes"><xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter> </xsf:query> </xsf:dataObject> </xsf:dataObjects>

ShowAll

nameAttribute(davAdapterElement)

ThenameofadavAdapter,usedtoinvoketheadapterfromformcode.

Typexsf:xdTitle

ParentElements

Element DescriptiondavAdapterContainsinformationtoenableInfoPathfilestobe

submittedtoaserverthatisrunningMicrosoftWindowsSharePointServicesoraWeb-basedDistributedAuthoringandVersioning(WebDAV)server.

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthedavAdapterelement:

<xsf:davAdaptername="SubmitToSharePoint"overwriteAllowed="yes"submitAllowed="yes"><xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/><xsf:folderURLvalue="http://some_server/some_doc_lib"/></xsf:davAdapter>

nameAttribute(emailAdapterElement)

ContainsthenameoftheemailAdapterelement.

Typexsf:xdTitle

ParentElements

Element DescriptionemailAdapter ContainstheinformationtosubmitanInfoPathfileasan

attachmenttoane-mailmessage,withaspecifiedsetofrecipients,asubject,andanintroduction.

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthenameattributeasitisusedintheemailAdapterelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="someone@example.com"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="my:bccNames"valueType="expression"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

nameAttribute(extensionElement)

Auniquenameidentifyingtheextensionbeingspecified.

Type

xsd:NMTOKEN

RemarksThenameattributeisarequiredattributeoftheextensionelement.

NoteUseoftheextensionelementisreserved.MicrosoftOfficeInfoPath2003ignoresanycontentwithintheextensionelement.

ExampleThefollowingisanexampleofthenameattributeasitisusedintheextensionelement:

<xsf:extensions><xsf:extensionname="someValue"anyAttributesHere="someValue">...opencontentmodelhere...</xsf:extension><xsf:extensions>

ShowAll

nameAttribute(externalViewElement)

ContainsthenameofanexternalViewelement.

Typexsf:xdViewName

ParentElements

Element DescriptionexternalViewDefinesaviewthatcannotbeeditedinInfoPath.

Definition

<xsd:attributename="name"type="xsf:xdViewName"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthenameattributeasitisusedintheexternalViewelement:

<xsf:externalViews><xsf:externalViewname="SalesDoc"><xsf:mainpanetransform="myWordView.xsl"/></xsf:externalView><xsf:externalViews>

nameAttribute(fieldElement)

Identifiesthefriendlynameofthefieldtobeusedontheformlistview.

Type

xsf:xdTitle

RemarksThenameattributeisarequiredattributeofthefieldelement.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

ShowAll

nameAttribute(fileElement)

Specifiesthenameofthefile.

Type

xsf:xdFileName

RemarksThenameattributeisarequiredattributeofthefileelement.

ThismustbearelativeURLfromtheURLoftheformdefinition(.xsf)file.Allfilesspecifiedhereareinsidetheformtemplate,soabsoluteURLsarenotsupported.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthefileelement:

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

nameAttribute(groupElement)

Specifiesthenameofagroupofuserstobeassignedtoaparticularrole.

Typexsd:string

ParentElements

Element Descriptiongroup Associatesagroupwithaparticularrole.

Definition

<xsd:attributename="name"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthegroupelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

nameAttribute(hwsAdapterElement)

Containsthenameofthedataadapter.

Typexsf:xdTitle

ParentElements

Element DescriptionhwsAdapter DefinestheMicrosoftBiztalk2004HWS(HumanWorkflow

Services)dataadaptertostartorextendanactivityflow,andrespondtoatask.

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthehwsAdapterelement:

<hwsAdapter name="xsf:xdTitle" wsdlUrl="xsd:string" queryAllowed="xsf:xdYesNo" submitAllowed="xsf:xdYesNo"><hwsOperationtype="xsd:string"typeID="xsd:string"serviceUrl="xsd:string"/></hwsAdapter>

ShowAll

nameAttribute(importSourceElement)

Identifiesthenameofthesourceformasdefinedintheprocessinginstructionofthatform’sunderlyingXMLdocument.

Type

xsd:string

RemarksThenameattributeisarequiredattributeoftheimportSourceelement.

ExampleThefollowingisanexampleofthenameattributeasitusedintheimportSourceelement:

<xsf:importParametersenabled="yes"<xsf:importSourcename="MyForm"schema="MySchema.xsd"transform="schematransform.xslt"/></xsf:importParameters>

nameAttribute(menuAreaElement)

Correspondstooneofthebuilt-inMicrosoftOfficeInfoPath2003top-levelmenus.

Type

xsd:NMTOKEN

RemarksThenameattributeisarequiredattributeofthemenuAreaelement.

Therecannotbemorethanonemenuareawiththesamenamewithinagivenview.

InfoPathhasthefollowingnamedmenuareasthatcorrespondtothebuilt-inmenuelementsthatcanbecustomizedusingthemenuAreaelement:

Name DescriptionmsoFileMenu MenuitemsthatareaddedtotheFile

menu.msoEditMenu Menuitemsthatareaddedtothe

Editmenu.msoInsertMenu Menuitemsthatareaddedtothe

Insertmenu.msoViewMenu Menuitemsthatareaddedtothe

Viewmenu.msoFormatMenu Menuitemsthatareaddedtothe

Formatmenu.msoToolsMenu Menuitemsthatareaddedtothe

Toolsmenu.msoTableMenu Menuitemsthatareaddedtothe

Tablemenu.msoHelpMenu Menuitemsthatareaddedtothe

Helpmenu.msoStructuralEditingContextMenu Menuitemsthatareaddedtothe

right-clickshortcutmenu.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthemenuAreaelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

nameAttribute(operationElement)

ContainstheuniquenameoftheWebservicemethod.

Type

xsd:string

RemarksThenameattributeisarequiredattributeoftheoperationelement.

ExampleThefollowingisanexampleofthenameattributeasitisusedintheoperationelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

nameAttribute(propertyElement)

Definesthenameoftheproperty.

Type

xsd:string

RemarksThenameattributeisarequiredattributeofthepropertyelement.AfileTypevalueof"ActiveX-CAB"identifiesthatthefileisa.cabfileaddedbythedesignerandindicatesthatthefileshouldbemanagedbytheActiveXsupportfeaturesofthedesigner.Thetimestamppropertyidentifiesthelatestversionofthe.cabfile.TheversioninformationisusedforautomaticallyupdatingthefilewhenthedeveloperhasamorerecentversionintheActiveXICT/CABdirectory.

ExampleThefollowingareexamplesofthenameattributeasitisusedinthepropertyelement:

<xsf:files><xsf:filename="example.cab"><xsf:fileProperties><xsf:propertyname="fileType"type="string"value="ActiveX-CAB"/><xsf:propertyname="timestamp"type="string"value="xyz"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

nameAttribute(roleElement)

Specifiesastringthatcanbeusedtoidentifyaparticularrole.

Typexsf:xdRoleName

ParentElements

Element Descriptionrole Definesrole.

Definition

<xsd:attributename="name"type="xsf:xdRoleName"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthenameattributeasitisusedintheroleelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\groupname1"memberOf="C"/></xsf:membership></xsf:roles>

nameAttribute(ruleSetElement)

ContainsthenameoftheruleSetelement.

Typexsd:string

ParentElements

Element DescriptionruleSet Containsoneormoreruleelements.

Definition

<xsd:attributename="name"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthenameattributeasitisusedintheruleSetelement:

<xsf:ruleSets><xsf:ruleSetname="RuleSet1"><xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetreceipts!</xsf:dialogBoxMessageAction><xsf:openNewDocumentActionsolution="urn:approvalForm"/><xsf:exitRuleSet/></xsf:rule><xsf:rulecaption="AlwaysSubmit"isEnabled="no"><xsf:submitActionadapter="ExpenseDatabase"/></xsf:rule></xsf:ruleSet>

<xsf:ruleSetname="RuleSet2"><xsf:rulecaption="Lookupcontact"><xsf:queryActionadapter="Contacts"/></xsf:rule></xsf:ruleSet></xsf:ruleSets>

ShowAll

nameAttribute(sharepointListAdapterElement)

ContainsthenameofthesharepointListAdapterelement;alsousedasthesecondarydatasourcename.

Typexsf:xdTitle

ParentElements

Element DescriptionsharepointListAdapter Containsthedataadapterinformationtoquery

aSharePointlistorlibrary.

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthesharepointListAdapterelement:

<xsf:sharepointListAdaptername="StatusReportlibrary"siteUrl="http://www.contoso.com/reports/"sharepointGuid="{ABD2E239-0EE7-48F4-B506-C38A1728E195}"infopathGroup="ContosoReportsLibrary"queryAllowed="yes><xsf:fieldsharepointName="File_x0020_Type"infopathName="Type"></xsf:field><xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"></xsf:field></xsf:sharepointListAdapter>

nameAttribute(signedDataBlockElement)

ContainsthenameofthesignedDataBlockelement.

Typexsf:xdSignedDataBlockName

ParentElements

Element DescriptionsignedDataBlock Definesanodesetintheform'sunderlyingXML

documenttowhichadigitalsignaturecanbeapplied.

Definition

<xsd:attributename="name"type="xsf:xdSignedDataBlockName"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthesignedDataBlockelement:

<xsf:documentSignatures><xsf:signedDataBlockname="main"data="my:myfields/my:subtree1|my:myfields/my:subtree2"signatureLocation="my:mifields/sig:signatures/main"mode="countersign"><xsf:message>Byclickingthe&quot;Sign&quot;buttonbelow,Iagreetobeboundtothetermsofthisdocument.</xsf:message></xsf:signedDataBlock></xsf:documentSignatures>

ShowAll

nameAttribute(taskElement)

TheuniquenameofthetaskasspecifiedbytheMicrosoftBiztalkServer2004HWS(HumanWorkflowServices)workflowdesigner.

Typexsf:xdHWSname

ParentElements

Element Descriptiontask TheHWStaskinformationenabledfortheform

Definition

<xsd:attributename="name"type="xsf:xdHWSname"use="required"></xsd:attribute>

RemarksThenameattributeisusedfortheonClickeventofthebuttonintheWorkflowtaskpane.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthetaskelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

nameAttribute(toolbarElement)

Identifiesthecorrespondingtoolbarwithindifferentviews.

Type

xsf:xdTitle

RemarksThenameattributeisarequiredattributeofthetoolbarelement.

Mustbeuniquewithinagivensolution.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthetoolbarelement:

<xsf:toolbarcaption="CDCollectionToolbar"name="CDCollectionToolbar"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="NewCD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="NewTrack"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="NewLabel"showIf="always"></xsf:button><xsf:menucaption="Remove"><xsf:buttonaction="xCollection::remove"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::remove"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::remove"xmlToEdit="Label_16"caption="Label"showIf="always"></xsf:button></xsf:menu></xsf:toolbar>

nameAttribute(userNameElement)

Specifiesthenameofausertobeassignedtoaparticularrole.

Typexsd:string

ParentElements

Element DescriptionuserName Associatesauserwithaparticularrole.

Definition

<xsd:attributename="name"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthenameattributeasitisusedintheuserNameelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="domain\username1"memberOf="A"/><xsf:userNamename="domain\username2"memberOf="B"/><xsf:groupname="domain\username3"memberOf="C"/></xsf:membership></xsf:roles>

nameAttribute(viewElement)

Identifiestheviewforobjectmodelcallswhenswitchingviews,andforspecifyingthedefaultview.

Type

xsf:xdViewName

RemarksThenameattributeisarequiredattributeoftheviewelement.

ExampleThefollowingisanexampleofthenameattributeasitisusedintheviewelement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

ShowAll

nameAttribute(webServiceAdapterElement)

ContainsthenameofthewebServiceAdapterelement.

Typexsf:xdTitle

ParentElements

Element DescriptionwebServiceAdapter DefinesaWebservicedataadapterthatretrieves

datafromaWebserviceforthespecifieddataobject.

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="optional"></xsd:attribute>

RemarksThenameattributeisanoptionalattributeofthewebServiceAdapterelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthewebServiceAdapterelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"useDataSet="no"><xsf:operationname="getOrders"soapAction="http://www.contoso.com/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

ShowAll

nameAttribute(xDocumentClassElement)

Providesaunique,UniformResourceName(URN)–basednamefortheformthattheformdefinition(.xsf)filedefines.

Type

xsd:string

RemarksThenameattributeisanoptionalattributeofthexDocumentClasselement.

Ifthisattributeismissing,theformisnamedfromtheUniformResourceLocator(URL)orformdefinitionfilename,whichcanbeobtainedfromtheprocessinginstructionsoftheform'sunderlyingXMLdocument.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

nameAttribute(xmlFileAdapterElement)

ContainsthenameofthexmlFileAdapterelement.

Typexsf:xdTitle

ParentElements

Element DescriptionxmlFileAdapter Definesan.xmlfiledataadapterthatretrievesdata

froman.xmlfileforthespecifieddataobject.

Definition

<xsd:attributename="name"type="xsf:xdTitle"use="optional"></xsd:attribute>

RemarksThenameattributeisanoptionalattributeofthexmlFileAdapterelement.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthexmlFileAdapterelement:

<xsf:query><xsf:xmlFileAdaptername="CurrencyInfo"fileUrl="currencies.xml"/></xsf:query>

nameAttribute(xmlToEditElement)

UsedinthexmlToEditattributeofthebuttonelementtoassociateactionsoftheassociatededitingcomponenttobuttonsdefinedinmenusandtoolbars.

Type

xsd:NMTOKEN

RemarksThenameattributeisarequiredattributeofthexmlToEditelement.

ThereshouldbenomorethanonexmlToEditelementwiththesamenameinagivenview.

ExampleThefollowingisanexampleofthenameattributeasitisusedinthexmlToEditelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

ShowAll

nodeAttribute

DefinestheXPathexpressionneededtoextractthevalueofthespecifiedpropertyfromtheform'sunderlyingXMLdocument.

Type

xsd:string

RemarksThenodeattributeisarequiredattributeofthefieldelement.

ExampleThefollowingisanexampleofthenodeattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

onAfterSubmitAttribute

Specifieswhethertheformshouldbeclosed,keptopen,orifanewformshouldbecreatedafterasuccessfulsubmission.

Type

xsd:NMTOKEN

RemarksTheonAfterSubmitattributeisanoptionalattributeofthesubmitelement.

Valuesinclude"Close","KeepOpen",and"OpenNew".Thedefaultvalueis"KeepOpen".

Ifthesubmitoperationisnotsuccessful,thentheonAfterSubmitattributeisignoredandtheformiskeptopen.

ExampleThefollowingisanexampleoftheonAfterSubmitattributeasitisusedinthesubmitelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useScriptHandler/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

orientationAttribute

Specifiestheorientationwhenprintingaview.

Type

xsd:NMTOKEN

RemarksTheorientationattributeisanoptionalattributeoftheprintSettingselement.

Valuesinclude"portrait"and"landscape".

ExampleThefollowingisanexampleoftheorientationattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

ShowAll

overwriteAllowedAttributeSpecifieswhethertheadaptercanoverwriteanexistingfile.

Typexsf:xdYesNo

ParentElements

Element DescriptiondavAdapterContainsinformationtoenableInfoPathfilestobe

submittedtoaMicrosoftWindowsSharePointServicesserveroraWeb-basedDistributedAuthoringandVersioning(WebDAV)server.

Definition

<xsd:attributename="overwriteAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheoverwriteAllowedattributeasitisusedinthedavAdapterelement:

<xsf:davAdaptername="SubmitToSharePoint"overwriteAllowed="yes"submitAllowed="yes"><xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/><xsf:folderURLvalue="http://some_server/some_doc_lib"/></xsf:davAdapter>

pageRangeEndAttribute

Specifiesthelastpagetobeprinted.

Typexsd:Integer

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingtheview.

Definition

<xsd:attributename="pageRangeEnd"><xsd:simpleType><xsd:restrictionbase="xsd:integer"><xsd:minInclusivevalue="1"/><xsd:maxInclusivevalue="32000"/></xsd:restriction></xsd:simpleType></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthepageRangeEndattributeasitisusedintheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

pageRangeStartAttribute

Specifiesthefirstpagetobeprinted.

Typexsd:Integer

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingtheview.

Definition

<xsd:attributename="pageRangeStart"><xsd:simpleType><xsd:restrictionbase="xsd:integer"><xsd:minInclusivevalue="1"/><xsd:maxInclusivevalue="32000"/></xsd:restriction></xsd:simpleType></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthepageRangeStartattributeasitisusedintheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

paperSizeattribute

Specifiesthesizeofthepaper.

Typexsd:String

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingtheview.

Definition

<xsd:attributename="paperSize"><xsd:simpleType><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="255"/></xsd:restriction></xsd:simpleType></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthepaperSizeattributeasitisusedintheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

paperSourceAttribute

Specifiesthesourceofthepaper.

Typexsd:String

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingtheview.

Definition

<xsd:attributename="paperSource"><xsd:simpleType><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="255"/></xsd:restriction></xsd:simpleType></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthepaperSourceattributeasitisusedintheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

ShowAll

parentAttribute

SpecifiesarelativeXPathexpressionfromthecontainernode.

Type

xsd:string

RemarksTheparentattributeisanoptionalattributeofthechooseFragmentelement.

ReferstotheXMLDocumentObjectModel(DOM)nodeunderwhichthisfragmentshouldbeinserted.Thedefaultvalueis".",whichcorrespondstoinsertingdirectlyunderthecontainerparentnode.

ExampleThefollowingisanexampleoftheparentattributeasitisusedinthechooseFragmentelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"followingSiblings="."><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

printerNameAttribute

Specifiestheprintername.

Typexsd:String

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingtheview.

Definition

<xsd:attributename="printerName"><xsd:simpleType><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="255"/></xsd:restriction></xsd:simpleType></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheprinterNameattributeasitisusedintheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer></xsf:printSettings>

printerSpecificSettingsAttribute

Specifiessettingsforaparticularprinter.

Typexsd:String

ParentElements

Element DescriptionprintSettings Specifiestheprintersettingsusedwhenprintingtheview.

Definition

<xsd:attributename="printerSpecificSettings"><xsd:simpleType><xsd:restrictionbase="xsd:string"><xsd:maxLengthvalue="255"/></xsd:restriction></xsd:simpleType></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheprinterSpecificSettingsattributeasitisusedintheprintSettingselement:

<xsf:printSettingsorientation="landscape"header="&Pqsdf"footer="&D"printerName="\\printserver\printer"paperSource="AutoSelect"paperSize="EnvelopeDL"topMargin="0.8"leftMargin="0.8"bottomMargin="0.8"rightMargin="0.8"marginUnitsType="in"copies="2"collate="no"pageRangeStart="1"pageRangeEnd="1"printerSpecificSettings="nameoffilethatcontainsprinter-specificsettings"><xsf:header><font><div>&Pqsdf</div></font></xsf:header><xsf:footer><font><div>&D</div></font></xsf:footer>

</xsf:printSettings>

printViewAttribute

Specifiesthenameofanotherviewtouseforprintingthisview.

Type

xsd:string

RemarksTheprintViewattributeisanoptionalattributeoftheviewelement.

ExampleThefollowingisanexampleoftheprintViewattributeasitisusedintheviewelement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"printView="PrintView"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

ShowAll

productVersionAttribute

IdentifiestheversionnumberofMicrosoftOfficeInfoPath2003formtemplatewithwhichtheformwascreatedorforwhichaparticularformisintended.

Type

xsd:string

RemarksTheproductVersionattributeisanoptionalattributeofthexDocumentClasselement.

Itsformatis####.####.####(major.minor.build).

ExampleThefollowingisanexampleoftheproductVersionattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

ShowAll

promptToSaveChangesAttribute

Specifieswhethertheuserispromptedtosavechangestotheformbeforetheactioncompletes.

Typexsf:xdYesNo

ParentElements

Element DescriptioncloseDocumentActionDefinesaformcloseaction.

Definition

<xsd:attributename="promptToSaveChanges"type="xsf:xdYesNo"use="required"></xsd:attribute>

RemarksThedefaultvalueis"yes".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthepromptToSaveChangesattributeasitisusedinthecloseDocumentActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

proofingAttribute

Switchestheproofingfeatures,suchasthespellingchecker,onoroff.

Type

xsf:xdYesNo

RemarksTheproofingattributeisanoptionalattributeoftheeditWithelement.

Valuesinclude"yes"and"no".Thedefaultvalueis"yes".

ExampleThefollowingisanexampleoftheproofingattributeasitisusedintheeditWithelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"proofing="yes"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

ShowAll

publishSaveUrlAttribute

ContainsthelocationofthesavedformtemplateifdifferentfromthevalueofthepublishUrlattribute.

Typexsd:string

ParentElements

Element DescriptionsolutionProperties Containsdesign-timeinformationaboutanInfoPath

form.

Definition

<xsd:attributename="publishSaveUrl"type="xsd:string"use="optional"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthepublishSaveUrlattributeasitisusedinthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.1.0.10"fullyEditableNamespace="urn:names?pace1:mynames"/publishSaveUrl="C:\DocumentsandSettings\username\Desktop\Template1.xsn"></xsf:applicationParameters>

ShowAll

publishUrlAttribute

Identifieswheretheformwaspublishedandwheretheformtemplateshoulddownloadupdatesfrom.

Type

xsd:string

RemarksThepublishUrlattributeisanoptionalattributeofthexDocumentClasselement.

ThepublishUrlattributeissetautomaticallywhenaformispublishedordeployedthroughtheInfoPathdesignmode.Whenaformisopened,itwillattempttoretrievethelatestupdatesfromthepublishedlocation.

ExampleThefollowingisanexampleofthepublishUrlattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="0.9.0.0"publishUrl="http://MyServer/InfoPathTemplates/MyTemplate.xsn">...</xsf:xDocumentClass>

queryAllowedAttribute(adoAdapterElement)

Specifieswhetherdatacanberetrievedfromthedatasourcethroughthequerymethodofthedataadapterobject.

Type

xsf:xdYesNo

RemarksThequeryAllowedattributeisanoptionalattributeoftheadoAdapterelement.

Allowedvaluesare"yes"and"no".Thedefaultvalueis"yes".

ExampleThefollowingisanexampleofthequeryAllowedattributeasitisusedintheadoAdapterelement:

<xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query>

ShowAll

queryAllowedAttribute(davAdapterElement)

Specifieswhethertheadaptercanbeusedforqueryingthedatasource.

Typexsf:xdYesNo

ParentElements

Element DescriptiondavAdapterContainsinformationtoenableInfoPathfilestobe

submittedtoaserverthatisrunningMicrosoftWindowsSharepointServicesoraWeb-basedDistributedAuthoringandVersioning(WebDAV)server.

Definition

<xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksThequeryAllowedattributeisgenerallyomittedforthedavAdapterelement,correspondingtoadefaultvalueof"no".Avalueof"yes"forthisattributecausesanerror.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthequeryAllowedattributeasitisusedinthedavAdapterelement:

<xsf:davAdaptername="SubmitToSharePoint"overwriteAllowed="yes"submitAllowed="yes"queryAllowed="no"><xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/><xsf:folderURLvalue="http://contoso/some_doc_lib"/></xsf:davAdapter>

queryAllowedAttribute(emailAdapterElement)

Specifieswhethertheadaptercanbeusedforqueryingthedatasource.

Typexsf:xdYesNo

ParentElements

Element DescriptionemailAdapter ContainstheinformationtosubmitanInfoPathfileasan

attachmenttoane-mailmessage,withaspecifiedsetofrecipients,asubject,andanintroduction.

Definition

<xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksThequeryAllowedattributeisgenerallyomittedfortheemailAdapterelement,correspondingtoadefaultvalueof"no".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthequeryAllowedattributeasitisusedintheemailAdapterelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"queryAllowed<xsf:tovalue="someone@example.com"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="someoneelse@example.com"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

queryAllowedAttribute(hwsAdapterElement)

Specifieswhethertheadaptercanbeusedforqueryingthedatasource.

Typexsf:xdYesNo

ParentElements

Element DescriptionhwsAdapter DefinestheMicrosoftBiztalk2004HWS(HumanWorkflow

Services)dataadaptertostartorextendanactivityflow,andrespondtoatask.

Definition

<xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksThequeryAllowedattributecanbeomittedfromthehwsAdapterelement,correspondingtoadefaultvalueof"no".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthequeryAllowedattributeasitisusedinthehwsAdapterelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

queryAllowedAttribute(sharepointListAdapterElement)

Specifieswhethertheadaptercanbeusedforqueryingthedatasource.

Typexsf:xdYesNo

ParentElements

Element DescriptionsharepointListAdapter Containsthedataadapterinformationtoquery

aSharePointlistorlibrary.

Definition

<xsd:attributename="queryAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksThequeryAllowedvalueisalwayssetto"yes"forthesharepointListdapter.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthequeryAllowedattributeasitisusedinthesharepointListAdapterelement:

<xsf:sharepointListAdaptername="StatusReportlibrary"siteUrl="http://www.contoso.com/reports/"sharepointGuid="{ABD2E239-0EE7-48F4-B506-C38A1728E195}"infopathGroup="ContosoReportsLibrary"queryAllowed="yes><xsf:fieldsharepointName="File_x0020_Type"infopathName="Type"></xsf:field><xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"></xsf:field></xsf:sharepointListAdapter>

queryAllowedAttribute(webServiceAdapterElement)

Specifieswhetherdatacanberetrievedfromthedatasourcethroughthequerymethodofthedataadapterobject.

Type

xsf:xdYesNo

RemarksThequeryAllowedattributeisanoptionalattributeofthewebServiceAdapterelement.

Allowedvaluesare"yes"and"no".Thedefaultvalueis"yes".

ExampleThefollowingisanexampleofthequeryAllowedattributeasitisusedinthewebServiceAdapterelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

ShowAll

refreshAttribute

Specifieswhentheexpressionwillbeevaluated.

Typexsd:string

ParentElements

Element DescriptioncalculatedField Definesanindividualcalculation,includingtheformula,

whenthecalculationistobeperformed,andwheretheresultwillbestored.

Definition

<xsd:attributename="refresh"type="xsd:string"use="required"></xsd:attribute>

RemarksTheexpressionspecifiedbytheexpressionattributeisevaluatedaccordingtotherefreshattributeofthecalculatedFieldelement.Avalueof"onInit"causestheexpressiontobeevaluatedwhenthenodeisinitialized.Avalueof"onChange"causestheexpressiontobeevaluatedwhenoneormoreparametersoftheexpressionchange.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftherefreshattributeasitisusedinthecalculatedFieldelement:

<xsf:calculations><xsf:calculatedFieldtarget="/my:myFields/my:average"expression="xdMath:Avg(../my:expenses/my:expense/my:amount)"refresh="onChange"/></xsf:calculations>

removeAncestorsAttribute

Specifiesthenumberofancestor(parent)elementstoberemovedwhenthelastitemisremoved.

Type

xsd:nonNegativeInteger

RemarksTheremoveAncestorsattributeisanoptionalattributeoftheeditWithelement.

Default=0.Mustbeanon-negativeinteger.

ExampleThefollowingisanexampleoftheremoveAncestorsattributeasitisusedintheeditWithelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample"><xsf:editWithcaption="CD"removeAncestors="0"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

ShowAll

replaceWithAttribute

ContainsanXPathexpressionthatidentifiesthevaluesinthesourcedocumentthatshouldbeusedtoreplacepartsoftheinputSimpleObjectAccessProtocol(SOAP)message.

Type

xsd:string

RemarksThereplaceWithattributeisarequiredattributeofthepartFragmentelement.

ExampleThefollowingisanexampleofthereplaceWithattributeasitisusedinthepartFragmentelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"><xsf:partFragmentmatch="/dfs:myFields/dfs:dataFields/s0:IsPrime/s0:inValue"replaceWith="/dfs:myFields/dfs:dataFields/s0:IsPrime"/></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

requiredAttribute

IdentifieswhetherthisfieldacceptsNullvalues.

Type

xsf:xdYesNo

RemarksTherequiredattributeisanoptionalattributeofthefieldelement.

Valuesinclude"yes"and"no".Thedefaultvalueis"no".

ExampleThefollowingisanexampleoftherequiredattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

requireFullTrustAttribute

Allowstheformtorunasafullytrustedformwhenaformtemplateisregisteredorsignedwithacertificate.

Type

xsf:xdYesNo

RemarksTherequireFullTrustattributeisanoptionalattributeofthexDocumentClasselement.

FormsthathavetherequireFullTrustattributesetto"yes"getfulltrustsecurityprivilegesinMicrosoftOfficeInfoPath2003.Allowedattributevaluesare"yes"and"no".Thedefaultvalueis"no".

NoteFullytrustedformsneedtoberegistered,otherwisetheycannotbeopenedinInfoPath.

ExampleThefollowingisanexampleoftherequireFullTrustattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0"requireFullTrust="yes">...</xsf:xDocumentClass>

rightMarginAttribute

Specifiestherightmarginwhenprintingaview.

Type

xsd:string

RemarksTherightMarginattributeisanoptionalattributeoftheprintSettingselement.

TherightMarginattributemustbegreaterthanorequaltozero.

ExampleThefollowingisanexampleoftherightMarginattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

ShowAll

rootSchemaAttribute

IdentifiesanXMLSchemaasthetop-levelschemaoftheformbeingfilledout.

Type

xsf:xdYesNo

RemarksTherootSchemaattributeisanoptionalattributeofthedocumentSchemaelement.

OnlyoneoftheXMLSchemasdefinedforaformcanbemarkedastherootschema.Allowedvaluesare"yes"and"no".Thedefaultvalueis"no".

ExampleThefollowingisanexampleoftherootSchemaattributeasitisusedinthedocumentSchemaelement:

<xsf:documentSchemas><xsf:documentSchemalocation="urn:schema:custom:NamespacecustomFilename.xsd"rootSchema="yes"/></xsf:documentSchemas>

ruleSetAttribute

ContainsthenameoftheruleSetactionelementtobeinvoked.

Typexsd:string

ParentElements

Element DescriptionruleSetActionDefinestheruleSetactionelementtobeinvoked.

Definition

<xsd:attributename="ruleSet"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheruleSetattributeasitisusedintheruleSetActionelement:

<xsf:onLoad><xsf:ruleSetActionruleSet="RuleSet4"/></xsf:onLoad>

ShowAll

schemaAttribute(dataObjectElement)

ThenameofanXMLSchemafile.

Type

xsd:string

RemarksTheschemaattributeisanoptionalattributeofthedataObjectelement.

MicrosoftOfficeInfoPath2003automaticallypackagestheXMLSchemaforeachsecondarydataobjectaspartoftheformtemplate.Anentryismadeintheformdefinition(.xsf)filefortheXMLSchemafileusingthefileselement,anditisthefilenamethatisreferencedfromtheschemaattributeofthedataObjectelement.

ExampleThefollowingisanexampleoftheschemaattributeasitisusedinthedataObjectelement:

<xsf:dataObjects><xsf:dataObjectname="EmployeeNames"schema="EmployeeNames.xsd"initOnLoad="yes"><xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter> </xsf:query> </xsf:dataObject> </xsf:dataObjects>

ShowAll

schemaAttribute(importSourceElement)

IdentifiestheXMLSchemafilethatshouldbeusedduringthemergeoperationtovalidatetheformbeingmerged.

Type

xsf:xdFileName

RemarksTheschemaattributeisarequiredattributeoftheimportSourceelement.

Ifthesourcedocumenttobemergedbelongstothespecifiedschema,thespecifiedparametersareusedformegingintothecurrentform.Iftheschemaattributeisnotspecified,a"SchemaXSDnotfound"errorisreturned.

ExampleThefollowingisanexampleoftheschemaattributeasitusedintheimportSourceelement:

<xsf:importParametersenabled="yes"<xsf:importSourcename="MyForm"schema="MySchema.xsd"transform="schematransform.xslt"/></xsf:importParameters>

scriptLanguageAttribute

IdentifiesthenameofthescriptinglanguageusedtoimplementthebusinesslogicoftheMicrosoftOfficeInfoPath2003form.

Type

xsf:xdScriptLanguage

RemarksThescriptLanguageattributeisanoptionalattributeofthesolutionPropertieselement.

InfoPathsupportsthefollowingvaluesforthisattribute:"JavaScript","JScript",and"VBScript".

ExampleThefollowingisanexampleofthescriptLanguageattributeasitisusedinthesolutionPropertieselement:

<xsf:applicationParametersapplication="InfoPathDesignMode"><xsf:solutionPropertiesallowCustomization="no"lastOpenView="view1"scriptLanguage="JScript"automaticallyCreateNodes="no"lastVersionNeedingTransform="1.0.0.10"fullyEditableNamespace="urn:namespace1:mynames"/></xsf:applicationParameters>

ShowAll

selectAttribute

AnXPathqueryexpressionthatreturnsoneormoredatanodesthatcontainusernames.

Typexsd:string

ParentElements

Element DescriptiongetUserNameFromData RetrievesausernamebyusinganXPath

queryofthedatainthemaindatasourceorinasecondarydatasource.

Definition

<xsd:attributename="select"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheselectattributeasitisusedinthegetUserNameFromDataelement:

<xsf:rolesinitiator="A"default="C"hideStatusBarDisplay="yes"><xsf:rolename="A"/><xsf:rolename="B"/><xsf:rolename="C"/>

<xsf:membership><xsf:getUserNameFromDatadataObject="catalog"select="/dfs:myFields/dfs:dataFields/d:UserA"memberOf="B"/><xsf:userNamename="Domain\username1"memberOf="A"/><xsf:userNamename="Domain\username2"memberOf="B"/><xsf:groupname="Domain\username3"memberOf="C"/></xsf:membership></xsf:roles>

sendAsStringAttribute

SpecifiesthatthedataissubmittedasastringthroughthewebServiceAdapterdataadapter.

Typexsf:xdYesNo

ParentElements

Element DescriptionpartFragmentDefinesonesubstitutiongroupforaspecificpartofthe

inputSimpleObjectAccessProtocol(SOAP)message.

Definition

<xsd:attributename="sendAsString"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksItmaybenecessarytosetthesendAsStringattributeto"yes"fordigitallysigneddata,becausethissettingpreservesnon-printingcharactersinthedata.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesendAsStringattributeasitisusedinthepartFragmentelement:

<xsf:partFragmentmatch="/dfs:myFields/dfs:dataFields/s0:IsPrime/s0:inValue"replaceWith=/dfs:myFields/dfs:dataFields/s0:IsPrime"filter="."sendAsString="yes"/>

ShowAll

serviceUrlAttribute

ContainstheWebserviceUniformResourceLocator(URL)towhichtherequestshouldbesent.

Type

xsd:string

RemarksTheserviceUrlattributeisarequiredattributeoftheoperationelement.

ExampleThefollowingisanexampleoftheserviceUrlattributeasitisusedintheoperationelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

ShowAll

serviceUrlAttribute(hwsOperationElement)

SpecifiestheUniformResourceLocator(URL)oftheMicrosoftBizTalk2004HumanWorkflowServices(HWS)Webservice.

Typexsd:string

ParentElements

Element DescriptionhwsOperation DefinestheHWSoperationtype,suchasaddingan

actiontoanewactivityflow,addinganactiontoanexistingactivityflow,orrespondingtoatask.

Definition

<xsd:attributename="serviceUrl"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheserviceUrlattributeasitisusedinthehwsOperationelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

sharepointGuidAttribute

ContainstheGUIDoftheSharePointlist.

Typexsd:string

ParentElements

Element DescriptionsharepointListAdapter Containsthedataadapterinformationneeded

toqueryaSharePointlistorlibrary.

Definition

<xsd:attributename="sharepointGuid"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesharepointGuidattributeasitisusedinthesharepointListAdapterelement:

<xsf:sharepointListAdaptername="StatusReportlibrary"siteUrl=”http://xyzco/reports/”sharepointGuid="{ABD2E239-0EE7-48F4-B506-C38A1728E195}"infopathGroup="XyzReportsLibrary"queryAllowed="yes><xsf:fieldsharepointName="File_x0020_Type"infopathName="Type"></xsf:field><xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"></xsf:field></xsf:sharepointListAdapter>

ShowAll

sharepointNameAttribute

ContainsthenameofafieldinaSharePointlist.

Typexsd:string

ParentElements

Element Descriptionfield Containsfieldmappinginformationforeachfieldina

SharePointlistandthecorrespondingnameusedinMicrosoftOfficeInfoPath2003ServicePack1.

Definition

<xsd:attributename="sharepointName"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesharepointNameattributeasitisusedinthefieldelement:

<xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"isLookup="no"></xsf:field>

shortMessageAttribute

Identifiestheshorterrormessagetoreturnincaseofinvaliddata.

Type

xsd:string

RemarksTheshortMessageattributeisarequiredattributeoftheerrorMessageelement.

ThisisdisplayedinaScreenTipinthedefaulterroruserinterface.Formodalerrors,thisattributeisignoredandthedetailedmessageisusedinstead.Maximumlengthoftheerrormessageis127characters.

ExampleThefollowingisanexampleoftheshortMessageattributeasitisusedintheerrorMessageelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

ShowAll

showErrorOnAttribute

IdentifiesXMLDocumentObjectModel(DOM)nodes(withinthecontextoftheexpressioncontextXMLDOMnode)onwhichtheerrorshouldbedisplayedwhentheformisfilledout.

Type

xsd:string

RemarksTheshowErrorOnattributeisanoptionalattributeoftheerrorConditionelement.

Contains(relativetoexpressioncontextXMLDOMnode)anXPathexpression.Defaultis"."Thisisthesameastheexpressioncontext.

ExampleThefollowingisanexampleoftheshowErrorOnattributeasitisusedintheerrorConditionelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

showIfAttribute

Specifiestheeditingcontextofthebutton.

Type

xsd:NMTOKEN

RemarksTheshowIfattributeisanoptionalattributeofthebuttonelement.

Allowedvaluesinclude"always","enabled",and"immediate".Defaultvalueis"always".Onlyappliestobuttonsusedwitheditingcomponents.IftheshowIfattributeissetto"enabled",thenthebuttonisvisibleonlyiftheactioniscontextuallyenabled.IftheshowIfattributeissetto"immediate",thenthebuttonisvisibleonlyiftheactioniscontextuallyimmediate.

ExampleThefollowingisanexampleoftheshowIfattributeasitisusedinthebuttonelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="immediate"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="immediate"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

ShowAll

showMenuItemAttribute

DisplaysamenuitemintheInfoPathViewmenuandaddsacheckmarknexttotheitemwhenitisinuse.

Typexsf:xdYesNo

ParentElements

Element Descriptionview ContainsinformationaboutanInfoPathview.

Definition

<xsd:attributename="showMenuItem"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksTheshowMenuItemattributeisanoptionalattributeoftheviewelement.Thedefaultvalueis"yes".

IftheshowMenuItemattributeforamenuitemintheViewmenuissetto"yes",theitemappearsintheViewmenuandhasacheckmarknexttoitwhenitisinuse.Themenuitemappearswiththecaptionthathasbeendefinedforitandintheorderspecifiedintheformdefinitionfile(.xsf).IftheshowMenuItemattributeisnotpresentorissetto"no",themenuitemdoesnotappearintheViewmenu.UserscanstilladditemstotheViewmenubycustomizingit,butsuchitemswillnotdisplayacheckmarkwhentheyareinuse.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheshowMenuItemattributeasitisusedintheviewelement:

<xsf:viewname="View1"caption="Firstview"showMenuItem="yes"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane></xsf:view>

showSignatureReminderAttribute

Specifieswhetheradialogboxshouldbedisplayedtoprompttheusertodigitallysignthedocumentbeforesubmittingit.

Type

xsf:xdYesNo

RemarksTheshowSignatureReminderattributeisanoptionalattributeofthesubmitelement.

Valuesinclude"yes"and"no".Thedefaultvalueis"no".Ifsetto"yes"andtheformisnotdigitallysignedwhenausertriestosubmitit,thedialogboxisdisplayed.

ExampleThefollowingisanexampleoftheshowSignatureReminderattributeasitisusedinthesubmitelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useScriptHandler/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

showStatusDialogAttribute

Specifieswhetherthestatusdialogboxshouldbeshownafterthesubmitoperation.

Type

xsf:xdYesNo

RemarksTheshowStatusDialogattributeisanoptionalattributeofthesubmitelement.

Valuesinclude"yes"and"no".Thedefaultvaluesis"yes".

IftheshowStatusDialogattributeissetto"yes"andnocustommessagesaredefined(usingtheerrorMessageorsuccessMessageelements),thentheMicrosoftOfficeInfoPath2003defaultsubmitmessagesaredisplayed.

ExampleThefollowingisanexampleoftheshowStatusDialogattributeasitisusedinthesubmitelement:

<xsf:submitcaption="Su&amp;bmit"disableMenuItem="no"onAfterSubmit="KeepOpen"showStatusDialog="yes"showSignatureReminder="yes"><xsf:useScriptHandler/><xsf:successMessage>Submitwassuccessful.</xsf:successMessage><xsf:errorMessage>Submitwasnotsuccessful.</xsf:errorMessage></xsf:submit>

ShowAll

signatureLocationAttribute

ContainsanXPathexpressionthatpointstotheXMLDocumentObjectModel(DOM)nodewithintheform'sunderlyingXMLdocumentthatisusedforstoringthedigitalsignature.

Type

xsd:string

RemarksThesignatureLocationattributeisarequiredattributeofthedocumentSignatureselement.

ExampleThefollowingisanexampleofthesignatureLocationattributeasitisusedinthedocumentSignatureselement:

<xsf:documentSignaturessignatureLocation="/employees/my:signatures1"></xsf:documentSignatures>

ShowAll

signatureLocationAttribute(signedDataBlockElement)

ContainsanXPathexpressionthatpointstotheXMLDocumentObjectModel(DOM)nodeintheform'sunderlyingXMLdocumentthatisusedforstoringthedigitalsignature.

Typexsd:string

ParentElements

Element DescriptionsignedDataBlock Definesanodesetintheform'sunderlyingXML

documenttowhichadigitalsignaturecanbeapplied.

Definition

<xsd:attributename="signatureLocation"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesignatureLocationattributeasitisusedinthesignedDataBlockelement:

<xsf:documentSignatures><xsf:signedDataBlockname=”main”data=”my:myfields/my:subtree1|my:myfields/my:subtree2”signatureLocation=”my:mifields/sig:signatures/main”mode=”countersign”><xsf:message>Bypressingthe&quot;Sign&quot;buttonbelow,Iagreetobeboundtothetermsofthisdocument.</xsf:message></xsf:signedDataBlock></xsf:documentSignatures>

ShowAll

siteUrlAttribute

ContainstheUniformResourceLocator(URL)ofaSharePointsite.

Typexsd:string

ParentElements

Element DescriptionsharepointListAdapter Containsthedataadapterinformationneeded

toqueryaSharePointlistorlibrary.

Definition

<xsd:attributename="siteUrl"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesiteUrlattributeasitisusedinthesharepointListAdapterelement:

<xsf:sharepointListAdaptername="StatusReportlibrary"siteUrl=”http://xyzco/reports/”sharepointGuid="{ABD2E239-0EE7-48F4-B506-C38A1728E195}"infopathGroup="XyzReportsLibrary"queryAllowed="yes><xsf:fieldsharepointName="File_x0020_Type"infopathName="Type"></xsf:field><xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"></xsf:field></xsf:sharepointListAdapter>

soapActionAttribute

ContainsthevalueoftheSOAPActionattributeintheSimpleObjectAccessProtocol(SOAP)requestmessage.

Type

xsd:string

RemarksThesoapActionattributeisarequiredattributeoftheoperationelement.

ExampleThefollowingisanexampleofthesoapActionattributeasitisusedintheoperationelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

ShowAll

solutionFormatVersionAttribute

Identifiestheversionnumberthatrepresentstheformatoftheformdefinitionfile(.xsf).

Type

xsf:xdSolutionVersion

RemarksThesolutionFormatVersionattributeisarequiredattributeofthexDocumentClasselement.

Itsformatis####.####.####.####(major.minor.revision.build).Theversionnumberofthe.xsffileallowsMicrosoftOfficeInfoPath2003todeterminewhetherthecurrentformiscompatiblewiththeproductversioninwhichitisbeingopened.

ExampleThefollowingisanexampleofthesolutionFormatVersionattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

ShowAll

solutionURIAttribute

TheUniformResourceIdentifier(URI)ofthesolutiononwhichthenewformwillbebased.

Typexsd:anyURI

ParentElements

Element DescriptionopenNewDocumentActionDefinesaformcreateaction.

Definition

<xsd:attributename="solutionURI"type="xsd:anyURI"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesolutionURIattributeasitisusedintheopenNewDocumentActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

solutionVersionAttribute

Identifiestheversionnumberoftheform.

Type

xsf:xdSolutionVersion

RemarksThesolutionVersionattributeisanoptionalattributeofthexDocumentClasselement.

Itsformatis####.####.####.####(major.minor.revision.build).

ExampleThefollowingisanexampleofthesolutionVersionattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

ShowAll

sourceAttribute

ContainsthenameoftheresourcefileintheformtemplatethatcontainstheXMLSchemafortheinputSimpleObjectAccessProtocol(SOAP)messageoftheselectedoperationoftheWebservice.

Type

xsd:string

RemarksThesourceattributeisarequiredattributeoftheinputelement.

ExampleThefollowingisanexampleofthesourceattributeasitisusedintheinputelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"><xsf:partFragmentmatch="/dfs:myFields/dfs:dataFields/s0:IsPrime/s0:inValue"replaceWith="/dfs:myFields/dfs:dataFields/s0:IsPrime"/></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

ShowAll

srcAttribute

ProvidesarelativeURLwithintheformtemplatetothespecifiedscriptsourcefile.

Type

xsf:xdFileName

RemarksThesrcattributeisarequiredattributeofthescriptelement.

ExampleThefollowingisanexampleofthesrcattributeasitisusedinthescriptelement:

<xsf:scriptslanguage="jscript"><xsf:scriptsrc="myscripts.js"/></xsf:scripts>

submitAllowedAttribute(adoAdapterElement)

Specifieswhetherdatacanbesubmittedtothedatasourcethroughthesubmitmethodofthedataadapterobject.

Type

xsf:xdYesNo

RemarksThesubmitAllowedattributeisanoptionalattributeoftheadoAdapterelement.

Allowedvaluesare"yes"and"no".Thedefaultvalueis"no".

ExampleThefollowingisanexampleofthesubmitAllowedattributeasitisusedintheadoAdapterelement:

<xsf:query><xsf:adoAdapterconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=&quot;&quot;;UserID=Admin;DataSource=infnwind.mdb;Mode=ShareDenyNone;ExtendedProperties=&quot;&quot;;..."commandText="select[EmployeeID],[LastName],[FirstName]from[Employees]as[Employees]"queryAllowed="yes"submitAllowed="yes"></xsf:adoAdapter></xsf:query>

ShowAll

submitAllowedAttribute(davAdapterElement)

Specifieswhethertheadaptercanbeusedforsubmittingtothedatasource.

Typexsf:xdYesNo

ParentElements

Element DescriptiondavAdapterContainsinformationneededtosubmitInfoPathformstoa

serverrunningMicrosoftWindowsSharePointServicesortoaWeb-basedDistributedAuthoringandVersioning(WebDAV)server.

Definition

<xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksThevalueofthesubmitAllowedattributeisalwayssetto"yes"forthedavAdapterelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesubmitAllowedattributeasitisusedinthedavAdapterelement:

<xsf:davAdaptername="SubmitToSharePoint"overwriteAllowed="yes"<xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/><xsf:folderURLvalue="http://some_server/some_doc_lib"/></xsf:davAdapter>

submitAllowedAttribute(emailAdapterElement)

Specifieswhethertheadaptercanbeusedforsubmittingtothedatasource.

Typexsf:xdYesNo

ParentElements

Element DescriptionemailAdapter ContainstheinformationneededtosubmitanInfoPath

formasanattachmenttoane-mailmessage,withaspecifiedsetofrecipients,asubject,andanintroduction.

Definition

<xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksThevalueofthesubmitAllowedattributeisalwayssetto"yes"fortheemailAdapterelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesubmitAllowedattributeasitisusedintheemailAdapterelement:

<xsf:emailAdaptername="Submit"submitAllowed="yes"><xsf:tovalue="someone@example.com"valueType="literal"/><xsf:ccvalue="my:ccNames"valueType="expression"/><xsf:bccvalue="someoneelse@example.com"valueType="literal"/><xsf:subjectvalue="Myreport"valueType="literal"/><xsf:introvalue="Seebelow"/><xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/></xsf:emailAdapter>

submitAllowedAttribute(hwsAdapterElement)

Specifieswhethertheadaptercanbeusedforsubmittingtothedatasource.

Typexsf:xdYesNo

ParentElements

Element DescriptionhwsAdapter DefinestheMicrosoftBizTalk2004HumanWorkflow

Services(HWS)dataadapter,whichcanbeusedtostartorextendanactivityfloworrespondtoatask.

Definition

<xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksThevalueofthesubmitAllowedattributeisalwayssetto"yes"forthehwsAdapterelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesubmitAllowedattributeasitisusedinthehwsAdapterelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

submitAllowedAttribute(sharepointListAdapterElement)

Specifieswhethertheadaptercanbeusedforsubmittingtothedatasource.

Typexsf:xdYesNo

ParentElements

Element DescriptionsharepointListAdapter Containsthedataadapterinformationneeded

toqueryaSharePointlistorlibrary.

Definition

<xsd:attributename="submitAllowed"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksThesubmitAllowedattributeisomittedforthesharepointListAdapterelement,correspondingtoadefaultvalueof"no".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthesubmitAllowedattributeasitisusedinthesharepointListAdapterelement:

<xsf:sharepointListAdaptername="StatusReportlibrary"siteUrl=”http://xyzco/reports/”sharepointGuid="{ABD2E239-0EE7-48F4-B506-C38A1728E195}"infopathGroup="XyzReportsLibrary"queryAllowed="yes><xsf:fieldsharepointName="File_x0020_Type"infopathName="Type"></xsf:field><xsf:fieldsharepointName="xd__x007b_D00F1DBD_..."infopathName="Title_1"></xsf:field></xsf:sharepointListAdapter>

submitAllowedAttribute(webServiceAdapterElement)

Specifieswhetherdatacanbesubmittedtothedatasourcethroughthesubmitmethodofthedataadapterobject.

Type

xsf:xdYesNo

RemarksThesubmitAllowedattributeisanoptionalattributeofthewebServiceAdapterelement.

Allowedvaluesare"yes"and"no".Thedefaultvalueis"no".

ExampleThefollowingisanexampleofthesubmitAllowedattributeasitisusedinthewebServiceAdapterelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

ShowAll

targetAttribute(calculatedFieldElement)

ContainstheXPathlocationwheretheresultoftheexpressionattributewillbestored.

Typexsd:string

ParentElements

Element DescriptioncalculatedField Definesanindividualcalculation,includingtheformula,

whenthecalculationistobeperformed,andwheretheresultwillbestored.

Definition

<xsd:attributename="target"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthetargetattributeasitisusedinthecalculatedFieldelement:

<xsf:calculations><xsf:calculatedFieldtarget="/my:myFields/my:average"expression="xdMath:Avg(../my:expenses/my:expense/my:amount)"refresh="onChange"/></xsf:calculations>

ShowAll

targetFieldAttribute

ContainsanXPathexpressionforthetargetnode.

Typexsd:string

ParentElements

Element DescriptionassignmentAction Definesanactiontosetthevalueofafield.

Definition

<xsd:attributename="targetField"type="xsd:string"use="required"></xsd:attribute>

RemarksThetargetFieldattributeidentifiesthenodethatwillreceivethevaluefromtheexpressionattribute.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthetargetFieldattributeasitisusedintheassignmentActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

taskpaneVisibleAttribute

SpecifieswhethertheWorkflowtaskpaneisvisible.

Typexsf:xdYesNo

ParentElements

Element DescriptionhwsWorkflow ContainstheinformationtoenabletheWorkflowtask

paneandtoenableindividualactionsandtasksassociatedwithaMicrosoftBiztalk2004HumanWorkflowServices(HWS)server.

Definition

<xsd:attributename="taskpaneVisible"type="xsf:xdYesNo"></xsd:attribute>

RemarksThedefaultvalueforthetaskpaneVisibleattributeis"yes".ThetaskpaneVisibleattributeisanoptionalattributeofthehwsWorkflowelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthetaskpaneVisibleattributeasitisusedinthehwsWorkflowelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

ShowAll

taskTypeIDAttribute

TheuniqueIDoftheMicrosoftBizTalkServer2004HumanWorkflowServices(HWS)workflowtask.

Typexsd:string

ParentElements

Element Descriptiontask TheHWStaskinformationenabledfortheform.

Definition

<xsd:attributename="taskTypeID"type="xsd:string"use="required"></xsd:attribute>

RemarksThetaskTypeIDattributeusesanamespacetouniquelyidentifyataskbutdoesnotrepresentthecurrentinstanceofthetaskbeingperformed.ThecurrentinstanceofthetaskisstoredintheXMLinstancefile.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthetaskTypeIDattributeasitisusedinthetaskelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"queryAllowed="no"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

tooltipAttribute

ProvidestheScreenTiptexttobeusedforthebutton.

Type

xsf:xdTitle

RemarksThetooltipattributeisanoptionalattributeofthebuttonelement.

Thisattributeappliesonlytobuttonsusedonatoolbar.

ExampleThefollowingisanexampleofthetooltipattributeasitisusedinthebuttonelement:

<xsf:toolbarcaption="CDCollectionToolbar"name="CDCollectionToolbar"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="NewCD"showIf="always"tooltip="InsertaCD."></xsf:button>...</xsf:toolbar>

topMarginAttribute

Specifiesthetopmarginwhenprintingaview.

Type

xsd:string

RemarksThetopMarginattributeisanoptionalattributeoftheprintSettingselement.

ThetopMarginattributemustbegreaterthanorequaltozero.

ExampleThefollowingisanexampleofthetopMarginattributeasitisusedintheprintSettingselement:

<xsf:viewname="View"caption="View"><xsf:printSettingsheader="Headertextgoeshere."footer="Footertextgoeshere."orientation="portrait"marginUnitsType="in"topMargin="1"leftMargin="2"rightMargin="2"bottomMargin="1"</xsf:printSettings>...</xsf:view>

ShowAll

transformAttribute(importSourceElement)

Identifiesthe.xsltfilethatshouldbeusedduringthemergeoperationwhenthesourceform(theonethatisbeingmergedin)matchestheXMLSchemaspecifiedinthecorrespondingschemaattribute.

Type

xsf:xdFileName

RemarksThetransformattributeisarequiredattributeoftheimportSourceelement.

ExampleThefollowingisanexampleofthetransformattributeasitisusedintheimportSourceelement:

<xsf:importParametersenabled="yes"<xsf:importSourcename="MyForm"schema="MySchema.xsd"transform="schematransform.xslt"/></xsf:importParameters>

ShowAll

transformAttribute(mainpaneElement)

SpecifiestherelativeURLtotheXSLTransformation(XSLT)thatisusedfortheview.

Type

xsf:xdFileName

RemarksThetransformattributeisarequiredattributeofthemainpaneelement.

ExampleThefollowingisanexampleofthetransformattributeasitisusedinthemainpaneelement:

<xsf:viewsdefault="View"><xsf:viewname="View"caption="View"><xsf:mainpanetransform="view1.xsl"></xsf:mainpane>...</xsf:view></xsf:views>

ShowAll

transformAttribute(useTransformElement)

Specifiesthe.xsltfilenamerelativetotheformtemplate.

Type

xsf:xdFileNamexsf:xdEmptyString

RemarksThetransformattributeisarequiredattributeoftheuseTransformelement.Itsmaximumlengthis64characters.

ExampleThefollowingexampleshowsthetransformattributeasitisusedintheuseTransformelement:

<xsf:documentVersionUpgrade><xsf:useTransformtransform="upgrade.xsl"minVersionToUpgrade="0.0.0.0"maxVersionToUpgrade="1.0.0.5"/></xsf:documentVersionUpgrade>

ShowAll

treatBlankValueAsZeroAttribute

Specifieswhetherablankfieldshouldbecalculatedwithavalueofzero.

Typexsf:xdYesNo

ParentElements

Element Descriptioncalculations Containsdefinitionsforcalculationsperformedintheform,

andspecifieshowblankvaluesarehandled.

Definition

<xsd:attributename="treatBlankValueAsZero"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksDefaultis"yes".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthetreatBlankValueAsZeroattributeasitisusedinthecalculationselement:

<xsf:calculations><xsf:calculatedFieldtarget="/my:myFields/my:average"expression="xdMath:Avg(../my:expenses/my:expense/my:amount)"refresh="onChange"/>treatBlankValueAsZero=”yes”/></xsf:calculations>

ShowAll

trustLevelAttribute

Specifiesthetrustlevelofaformtemplate.

Typexsf:xdTrustLevel

ParentElements

Element DescriptionxDocumentClass Therootelementoftheformdefinitionfile(.xsf).

Containsallotherelementsandattributesoftheformdefinitionfile.

Definition

<xsd:attributename="trustLevel"type="xsf:xdTrustLevel"use="optional"></xsd:attribute>

RemarksIfthetrustLevelattributeispresentalongwiththerequireFullTrustattributeintheformdefinitionfile,andtherequireFullTrustattributeissetto"yes",thentherequireFullTrustattributetakesprecedence.Aformtemplatethatisnotpermittedfulltrust(becauseitlackspropercertificate,installation,orregistration)willfailtoloadineditmode,andawarningwillbedisplayed.Iftheformtemplateispermittedfulltrust,itwillloadandrunproperlyinthefulltrustsecurityzone.

Thedefaultvalueis"domain".IfthetrustLevelattributeisnotpresent,thedefaultvalueisalso"domain".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthetrustLevelattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:schemas-microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">dataFormSolution="yes"requireFullTrust="yes"trustLevel="restricted"trustSetting="manual"publishUrl="http://MyServer/InfoPathTemplates/MyTemplate.xsn">...</xsf:xDocumentClass>

ShowAll

trustSettingAttribute

Specifiesthetrustsettingofaformtemplate.

Typexsf:xdManualAuto

ParentElements

Element DescriptionxDocumentClass Therootelementoftheformdefinitionfile(.xsf).

Containsallotherelementsandattributesoftheformdefinitionfile.

Definition

<xsd:attributename="trustSetting"type="xsf:xdManualAuto"use="optional"></xsd:attribute>

RemarksThedefaultvalueis"manual".IfthetrustSettingattributeisnotpresent,thedefaultvalueisalso"manual".

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthetrustSettingattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:schemas-microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">dataFormSolution="yes"requireFullTrust="yes"trustLevel="restricted"trustSetting="manual"publishUrl="http://MyServer/InfoPathTemplates/MyTemplate.xsn">...</xsf:xDocumentClass>

ShowAll

typeAttribute(editWithElement)

SpecifiesthetypeofeditingforthefieldsthatmatchtheXPathexpressionspecifiedbytheitemattributeofthexmlToEditelement.

Type

xsd:enumeration

RemarksThetypeattributeisanoptionalattributeoftheeditWithelement.

ThetypeattributeisusedwiththexFieldeditingcomponent,anditsupportsthefollowingvalues:"plain","plainMultiline","formatted","formattedMultiline",and"rich".Thedefaultvalueis"plain".

NotethatifthematchedXMLDocumentObjectModel(DOM)nodedoesnotsupportthefulleditingservicesspecified,theeffectivetypeisdowngradedappropriately(thismeansdowngradingto"plain").Forexample,anattributenodewillbehaveasplainevenifsettorich.OnlydatathatisinaCDATAsection,orthatcorrespondstoXHTML,cansupportvaluesotherthan"plain".

ExampleThefollowingisanexampleofthetypeattributeasitisusedintheeditWithelement:

<xsf:xmlToEditname="Label_4"item="/CustomUISample/CDCollection/CD/Label"><xsf:editWithtype="rich"autoComplete="no"component="xField"></xsf:editWith></xsf:xmlToEdit>

typeAttribute(errorMessageElement)

Identifiesthetypeoferrormessagetoreturn.

Type

xsd:NMTOKEN

RemarksThetypeattributeisanoptionalattributeoftheerrorMessageelement.

Allowedvaluesare"modeless"and"modal".Defaultvalueis"modeless".

Adialogboxwiththelongmessageisreturnedfor"modal"errors.Whenthedialogboxisclosed,thefieldismarkedwithadashedredbordertoindicatethatthevalueisinvalid.Ausercanreadtheerrormessagebyright-clickingthefield.

For"modeless"errors,nodialogboxisdisplayed.Thefieldismarkedwithadashedredbordertoindicatethatthevalueisinvalid.Ausercanreadtheerrormessagebyright-clickingthefield.

NoteIfthefieldisinvalidasaresultofscriptingcodeorbecauseitwasinvalidtobeginwith,buthasnotbeenedited,thenitwillbemarkedwitharedunderline.

ExampleThefollowingisanexampleofthetypeattributeasitisusedintheerrorMessageelement:

<xsf:customValidation><xsf:errorConditionmatch="/exp:expenseReport"expressionContext="exp:reportDate"expression="msxsl:string-compare(.,../exp:startDate)<0and../exp:startDate!="""showErrorOn="."><xsf:errorMessagetype="modeless"shortMessage="Thereportdateoccursbeforetheendoftheexpenseperiod.">Thereportdateoccursbeforetheendoftheexpenseperiod.Verifythatthisiscorrect.</xsf:errorMessage></xsf:errorCondition></xsf:customValidation>

ShowAll

typeAttribute(fieldElement)

IdentifiesthestandardXMLSchemadatatype.

Type

xsd:NMTOKEN

RemarksThetypeattributeisarequiredattributeofthefieldelement.

ExampleThefollowingisanexampleofthetypeattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

typeAttribute(hwsOperationElement)

SpecifiestheMicrosoftBizTalkServer2004HumanWorkflowServices(HWS)operationtype.

Typexsd:string

ParentElements

Element DescriptionhwsOperation DefinestheHWSoperationtype,suchasaddingan

actiontoanewactivityflow,addinganactiontoanexistingactivityflow,orrespondingtoatask.

Definition

<xsd:attributename="type"type="xsd:string"use="required"></xsd:attribute>

RemarksTheallowedHWSoperationtypesare:

addActionToNewActivityFlowStartsanewworkflow.

addActionToActivityFlowStartsanewworkflow,orifoneexists,extendstheworkflow.

sendTaskResponseRespondstoatask.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthetypeattributeasitisusedinthehwsOperationelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

ShowAll

typeAttribute(propertyElement)

Definesthetypeoftheproperty.

Type

xsd:QName

RemarksThetypeattributeisarequiredattributeofthepropertyelement.

AllsimpleXMLSchemadatatypesareallowed.

ExampleThefollowingisanexampleofthetypeattributeasitisusedinthepropertyelement:

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

ShowAll

typeIDAttribute

Containsthegloballyuniqueidentifier(GUID)fortheMicrosoftBizTalkServer2004HumanWorkflowServices(HWS)operation.

Typexsd:string

ParentElements

Element DescriptionhwsOperation DefinestheHWSoperationtype,suchasaddingan

actiontoanewactivityflow,addinganactiontoanexistingactivityflow,orrespondingtoatask.

Definition

<xsd:attributename="typeID"type="xsd:string"use="required"></xsd:attribute>

RemarksTheGUIDisautomaticallygenerateduponsubmitofthehwsAdapterelement,anditupdatestheprocessinginstructionsoftheXMLinstancefile.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthetypeIDattributeasitisusedinthehwsOperationelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

ShowAll

uiAttribute(exportToExcelElement)

SetswhethertheusercanexportthecontentsoftheformtoaMicrosoftOfficeExcel2003workbook.

Typexsf:xdEnabledDisabled

ParentElements

Element DescriptionexportToExcel Specifieswhethertheusercanusetheform'smenus,

toolbars,orkeyboardshortcutstoexporttheformtoanMicrosoftOfficeExcel2003workbook.

Definition

<xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute>

RemarksSettingthisattributetoavalueotherthan"enabled"or"disabled"willresultinanerrormessagewhenyouattempttoopentheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheuiattributeasitisusedintheexportToExcelelement:

<xsf:exportToExcel ui="disabled"/>

ShowAll

uiAttribute(exportToWebElement)

SetswhethertheusercanexportthecontentsoftheformtoaWebpage.

Typexsf:xdEnabledDisabled

ParentElements

Element DescriptionexportToWeb Specifieswhethertheusercanusetheform'smenus,

toolbars,orkeyboardshortcutstoexporttheformtoaWebpage.

Definition

<xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute>

RemarksSettingthisattributetoavalueotherthan"enabled"or"disabled"willresultinanerrormessagewhenyouattempttoopentheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheuiattributeasitisusedintheexportToWebelement:

<xsf:exportToWeb ui="disabled"/>

ShowAll

uiAttribute(printElement)

Setswhethertheusercanprinttheform.

Typexsf:xdEnabledDisabled

ParentElements

Element Descriptionprint Specifieswhethertheusercanusetheform'smenus,toolbars,

orkeyboardshortcutstoprinttheform

Definition

<xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute>

RemarksSettingthisattributetoavalueotherthan"enabled"or"disabled"willresultinanerrormessagewhenyouattempttoopentheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheuiattributeasitisusedintheprintelement:

<xsf:printui="disabled"/>

ShowAll

uiAttribute(saveElement)

Setswhethertheusercansavetheform.

Typexsf:xdEnabledDisabled

ParentElements

Element Descriptionsave Specifieswhethertheusercanusetheform'smenus,toolbars,

orkeyboardshortcutstosavetheform.

Definition

<xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute>

RemarksSettingthisattributetoavalueotherthan"enabled"or"disabled"willresultinanerrormessagewhenyouattempttoopentheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheuiattributeasitisusedinthesaveelement:

<xsf:saveui="disabled"/>

ShowAll

uiAttribute(sendMailElement)

Setswhethertheusercansendtheformasane-mailattachment.

Typexsf:xdEnabledDisabled

ParentElements

Element DescriptionsendMail Specifieswhethertheusercanusetheform'smenus,

toolbars,orkeyboardshortcutstosendtheformasane-mailattachment.

Definition

<xsd:attributename="ui"type="xsf:xdEnabledDisabled"use="required"></xsd:attribute>

RemarksSettingthisattributetoavalueotherthan"enabled"or"disabled"willresultinanerrormessagewhenyouattempttoopentheform.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheuiattributeasitisusedinthesendMailelement:

<xsf:sendMailui="disabled"/>

ShowAll

urlAttribute

ContainstheUniformResourceLocator(URL)foraMicrosoftBizTalk2004HumanWorkflowServices(HWS)Webservice.

Typexsd:string

ParentElements

Element Descriptionlocation ThelocationoftheHWSWebservice.

Definition

<xsd:attributename="url"type="xsd:string"use="required"></xsd:attribute>

RemarksTheurlattributeisarequiredattributeofthelocationelement.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheurlattributeasitisusedinthelocationelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

useDataSetAttribute

SpecifieswhetheranadapterwillsupportanADO.NETDataSet.

Typexsf:xdYesNo

ParentElements

Element DescriptionwebServiceAdapter DefinesaWebservicedataadapterthatretrieves

datafromaWebserviceorsubmitsdatatoaWebservice.

Definition

<xsd:attributename="useDataSet"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksDefaultis"no".

UseoftheuseDataSetattributerequiresMicrosoftOfficeInfoPath2003ServicePack1.

AnADO.NETDataSetcannotbeusedasaqueryparameterforthewebServiceAdapterelementoranyotherdataadapter.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheuseDataSetattributeasitisusedinthewebServiceAdapterelement:

<xsf:webServiceAdapterwsdlUrl="http://www.contoso.com/DataSet.asmx?WSDL"queryAllowed="yes"useDataSet="yes">...</xsf:webServiceAdapter>

ShowAll

useFilterAttribute

Indicatestheuserwantsafilterwidget.

Typexsd:simpleType

ParentElements

Element DescriptioneditWith (Optionalelement)Specifiesaninstanceofanediting

component,andprovidesthecorrespondingparameterstodetermineitsexactbehavior.

Definition

<xsd:attributename="useFilter"use="optional"><xsd:simpleType><xsd:restrictionbase="xsd:string"><xsd:enumerationvalue="yes"/><xsd:enumerationvalue="no"/></xsd:restriction></xsd:simpleType></xsd:attribute>

RemarksTheuseFilterattributeisanoptionalattributeoftheeditWithelement.Itsdefaultvalueis"no".Iftheuserselectsthefilterwidgetcheckboxinthepropertydialogofarepeatingsectionorrepeatingtable,andtheuseFilterattributeissetto"yes",thewidgetIconattributeissetto"Filter".TheuseFilterattributeisonlyapplicableforrepeatingsectionsandtables.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheuseFilterattributeasitisusedintheeditWithelement:

<editWithcomponent="xCollection"widgetIcon="filter|standard"useFilter="yes|no"filterDependency="xpath1|xpath2|xpath3>

useScriptHandlerAttribute

SpecifieswhethertousetheeventhandlerdefinedfortheOnMergeRequesteventwhenimporting(merging)forms.

Typexsf:xdYesNo

ParentElements

Element DescriptionimportParameters Containsalltheparametersthatdefinehowthe

import(merge)formsfeatureworksfortheform.

Definition

<xsd:attributename="useScriptHandler"type="xsf:xdYesNo"use="optional"></xsd:attribute>

RemarksIfyoucreateaneventhandlerfortheOnMergeRequesteventofaformtemplate,youmustsettheuseScriptHandlerattributeto"yes"beforeitwillrun.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheuseScriptHandlerattributeasitisusedintheimportParameterselement:

<xsf:importParametersenabled="yes"useScriptHandler="yes"><xsf:importSourcename="MySource"schema="MySchema.xsd"transform="schematransform.xslt"/></xsf:importParameters>

valueAttribute(attachmentFileNameElement)

ContainsthevalueoftheattachmentFileNameelement.

Typexsd:string

ParentElements

Element DescriptionattachmentFileName Containsthefilenameofthefileattachmenttobe

includedwithane-mailmessagewhentheformissubmittedusingtheemailAdapterelement.

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

RemarksIfthevalueattributeisanemptystring,thee-mailmessagewillnotincludeafileattachment.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthevalueattributeasitisusedintheattachmentFileNameelement:

<xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/>

valueAttribute(attributeDataElement)

Specifiesthevalueoftheattributetobeinserted.

Type

xsd:string

RemarksThevalueattributeisarequiredattributeoftheattributeDataelement.

ExampleThefollowingisanexampleofthevalueattributeasitisusedintheattributeDataelement:

<xsf:editWithcomponent="xOptional"><xsf:fragmentToInsert><xsf:chooseFragmentparent="report"><xsf:attributeDataattribute="author"value="authorname"/></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith>

valueAttribute(bccElement)

Specifiesthevalueofthebccelement,asaliteralstringorasanexpressionbasedonthevalueTypeattribute.

Typexsd:string

ParentElements

Element Descriptionbcc Containstherecipientinformationforthebcclineofane-mail

messagewhentheformissubmittedusingtheemailAdapterelement.

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

RemarksMultipleaddressesonthebcclineofane-mailmessagemustbeseparatedbysemicolons.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthevalueattributeasitisusedinthebccelement:

<xsf:bccvalue="someone@example.com"valueType="literal"/>

valueAttribute(ccElement)

Specifiesthevalueoftheccelement,asaliteralstringorasanexpressionbasedonthevalueTypeattribute.

Typexsd:string

ParentElements

Element Descriptioncc Containstherecipientinformationforthecclineofthee-mail

messagewhentheformissubmittedusingtheemailAdapterelement.

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

RemarksMultipleaddressesonthecclineofane-mailmessagemustbeseparatedbysemicolons.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthevalueattributeasitisusedintheccelement:

<xsf:ccvalue="my:ccNames"valueType="expression"/>

ShowAll

valueAttribute(fileNameElement)

SpecifiesthevalueofthefileNameelement,asaliteralstringorasanexpressionbasedonthevalueTypeattribute.

Typexsd:string

ParentElements

Element DescriptionfileName ContainsthenameofthefileasaliteralstringorXPath

expression.

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthevalueattributeasitisusedinthefileNameelement:

<xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/>

ShowAll

valueAttribute(folderURLElement)

SpecifiestheUniformResourceLocator(URL)oftheWeb-basedDistributedAuthoringandVersioning(WebDAV)serverorserverthatisrunningMicrosoftWindowsSharePointServicestowhichthefileissubmitted.

Typexsd:string

ParentElements

Element DescriptionfolderURL ContainstheURLoftheservertowhichthefileissubmitted.

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

RemarksTheURLmustbeginwith"http://"or"https://".Othercommonprotocolswillcauseanerror.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthevalueattributeasitisusedinthefolderURLelement:

<folderURLvalue="http://some_server/some_doc_lib"/>

valueAttribute(introElement)

Containsthevalueoftheintroelement.

Typexsd:string

ParentElements

Element Descriptionintro Containstheintroductionforthee-mailmessagewhentheform

issubmittedusingtheemailAdapterelement.

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthevalueattributeasitisusedintheintroelement:

<xsf:introvalue="Seebelow"/>

ShowAll

valueAttribute(propertyElement)

Forsimpleproperties,specifiesavaluefortheproperty.Forcomplexandmulti-valuedproperties,thespecifiedvalueisdefinedasacontainerXMLtreeusinganopencontentmodel.

Type

xsd:string

RemarksThevalueattributeisarequiredattributeofthepropertyelement.The.cabfilesthatareincludedinanInfoPathformpackagearelistedinthepackageandfileselementsofan.xsffile.AfileTypevalueof"ActiveX-CAB"identifiesthatthefileisa.cabfileaddedbythedesignerandindicatesthatthefileshouldbemanagedbytheActiveXsupportfeaturesofthedesigner.

ExampleThefollowingareexamplesofthevalueattributeasitisusedinthepropertyelement:

<xsf:files><xsf:filename="example.cab"><xsf:fileProperties><xsf:propertyname="fileType"type="string"value="ActiveX-CAB"/><xsf:propertyname="timestamp"type="string"value="xyz"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

<xsf:package><xsf:files><xsf:filename="view_1.xsl"><xsf:fileProperties><xsf:propertyname="lang"type="string"value="1033"/></xsf:fileProperties></xsf:file></xsf:files></xsf:package>

valueAttribute(subjectElement)

Containsthevalueofthesubjectelement,eitherasanexpressionorasaliteralstring.

Typexsd:string

ParentElements

Element Descriptionsubject Containsthesubjectlineofthee-mailmessagewhentheform

issubmittedusingtheemailAdapterelement.

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthevalueattributeasitisusedinthesubjectelement:

<xsf:subjectvalue="Myreport"valueType="literal"/>

valueAttribute(toElement)

Specifiesthevalueofthetoelement,asaliteralstringorasanexpressionbasedonthevalueTypeattribute.

Typexsd:string

ParentElements

Element Descriptionto Parentelementthatcontainsthe"to"lineinformationofthe

emailAdapterelement.

Definition

<xsd:attributename="value"type="xsd:string"use="required"></xsd:attribute>

RemarksMultipleaddressesonthe"to"lineofane-mailmessagemustbeseparatedbysemicolons.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthevalueattributeasitisusedinthetoelement:

<xsf:tovalue="someone@example.com"valueType="literal"/>

ShowAll

valueTypeAttribute(attachmentFileNameElement)

SpecifieswhetherthevalueattributeoftheattachmentFileNameelementshouldbeinterpretedasaliteralvalueoranXPathexpressionwhichreturnsavalue.

Typexsf:xdExpressionLiteral

ParentElements

Element DescriptionattachmentFileName Containsthefilenameofthefileattachmenttobe

includedwithane-mailmessagewhentheformissubmittedusingtheemailAdapterelement.

Definition

<xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthevalueTypeattributeasitisusedintheattachmentFileNameelement:

<xsf:attachmentFileNamevalue="StatusReport"valueType="literal"/>

ShowAll

valueTypeAttribute(bccElement)

SpecifieswhetherthevalueattributeofthebccelementshouldbeinterpretedasaliteralvalueorasanXPathexpressionthatreturnsavalue.

Typexsf:xdExpressionLiteral

ParentElements

Element Descriptionbcc Containstherecipientinformationforthebcclineofane-mail

messagewhentheformissubmittedusingtheemailAdapterelement.

Definition

<xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthevalueTypeattributeasitisusedinthebccelement:

<xsf:bccvalue="someone@example.com"valueType="literal"/>

ShowAll

valueTypeAttribute(ccElement)

SpecifieswhetherthevalueattributeoftheccelementshouldbeinterpretedasaliteralvalueorasanXPathexpressionthatreturnsavalue.

Typexsf:xdExpressionLiteral

ParentElements

Element Descriptioncc Specifiesthevalueoftheccelement,asaliteralstringorasan

expressionbasedonthevalueTypeattribute.

Definition

<xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthevalueTypeattributeasitisusedintheccelement:

<xsf:ccvalue="my:ccNames"valueType="expression"/>

ShowAll

valueTypeAttribute(fileNameElement)

SpecifieswhetherthevalueofthefileNameelementshouldbeinterpretedasaliteralvalueorasanXPathexpressionthatreturnsavalue.

Typexsf:xdExpressionLiteral

ParentElements

Element DescriptionfileName ContainsthenameofthefileasaliteralstringorasanXPath

expression.

Definition

<xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthevalueTypeattributeasitisusedinthefileNameelement:

<xsf:fileNamevalue="my:myFields/my:fileName"valueType="expression"/>

ShowAll

valueTypeAttribute(subjectElement)

SpecifieswhetherthevalueattributeofthesubjectelementshouldbeinterpretedasaliteralvalueorasanXPathexpressionthatreturnsavalue.

Typexsf:xdExpressionLiteral

ParentElements

Element Descriptionsubject Containsthesubjectlineofane-mailmessagewhentheform

issubmittedusingtheemailAdapterelement.

Definition

<xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthevalueTypeattributeasitisusedinthesubjectelement:

<xsf:subjectvalue="Myreport"valueType="literal"/>

ShowAll

valueTypeAttribute(toElement)

SpecifieswhetherthevalueattributeofthetoelementshouldbeinterpretedasaliteralvalueorasanXPathexpressionthatreturnsavalue.

Typexsf:xdExpressionLiteral

ParentElements

Element Descriptionto Parentelementthatcontainsthe"to"lineinformationofthe

emailAdapterelement.

Definition

<xsd:attributename="valueType"type="xsf:xdExpressionLiteral"use="optional"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthevalueTypeattributeasitisusedinthetoelement:

<xsf:tovalue="someone@example.com"valueType="literal"/>

ShowAll

versionAttribute

SpecifiestheActiveXcontrolversionnumber.

Typexsd:string

ParentElements

Element DescriptionallowedControl SpecifiestheActiveXcontrolsthatareallowedtobe

instantiated.

Definition

<xsd:attributename="version"type="xsd:string"use="optional"></xsd:attribute>

RemarksIftheclsidattributeforanActiveXcontrolisincludedintheallowedControlelementinaformdefinitionfile(.xsf),butthecontrolisnotinstalledontheuser'scomputer,thecontrolwillbeinstalledautomaticallyifthecabFileattributeforthecontrolispresentandtheCABfileispresentintheformtemplatefile(.xsn)orinthesamedirectoryastheformdefinitionfile.Ifthecontrolisalreadyinstalledontheuser'scomputerbutisanearlierversionthantheonelistedintheversionattribute,theinstallprocessstillwillinitiateiftheCABfileforthecontrolispresent.IftheCABfileisnotpresentforsomereasonortheinstallationfailsorisstopped,theformwillnotopen.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheversionattributeasitisusedintheallowedControlelement:

<xsf:permissions><xsf:allowedControlcabFile="{84F32C01-78D8-4B93-8ED4-106DA70224C2}.cab”clsid="{84F32C01-78D8-4B93-8ED4-106DA70224C2}"version=”1,0,0,1”/><xsf:allowedControlclsid="{F08DF954-8592-11D1-B16A-00C0F0283630}"/></xsf:permissions>

ShowAll

viewAttribute

Containsthenameoftheviewthatisswitchedtoasaresultoftheruleelementaction.

Typexsf:xdViewName

ParentElements

Element DescriptionswitchViewAction Definesaviewswitchaction.

Definition

<xsd:attributename="view"type="xsf:xdViewName"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleoftheviewattributeasitisusedintheswitchViewActionelement:

<xsf:rulecaption="Receipts"condition="my:expense>75"><xsf:dialogBoxMessageAction>Don'tforgetyourreceipts!</xsf:dialogBoxMessageAction><xsf:switchViewActionview="ApprovalView"/><xsf:assignmentActiontargetField="my:group8/my:group9/my:target"expression="sum(my:expenses/my:expense)*my:taxRate"/><xsf:queryActionadapter="ExchangeRates"/><xsf:submitActionadapter="ExchangeRates"/><xsf:openNewDocumentActionsolutionURI="uri:microsoft-ExpenseReport"/><xsf:closeDocumentActionpromptToSaveChanges="yes"/><xsf:dialogBoxExpressionAction>my:group/my:field1</xsf:dialogBoxExpressionAction><xsf:exitRuleSet/></xsf:rule>

viewableAttribute

Identifieswhetherthefieldshouldbeaddedtothedefaultview.

Type

xsf:xdYesNo

RemarksTheviewableattributeisanoptionalattributeofthefieldelement.

Valuesinclude"yes"and"no".Thedefaultvalueis"no".

ExampleThefollowingisanexampleoftheviewableattributeasitisusedinthefieldelement:

<xsf:listProperties><xsf:fields><xsf:fieldtype="xsd:date"name="TravelDate"columnName="TravelDate"required="yes"viewable="yes"node="TravelReport/Header/travelDate"aggregation="first"/></xsf:fields></xsf:listProperties>

ShowAll

viewContextAttribute

SpecifiesastringthatidentifiesanHTMLelementintheview.

Type

xsd:string

RemarksTheviewContextattributeisanoptionalattributeofthexmlToEditelement.

TheviewContextattributenamesanHTMLelementthathasthexd:CtrlIdattribute.Forexample,viewContext="myID"intheformdefinition(.xsf)filecorrespondstoxd:CtrlId="myID"intheXSLT/HTMLcodefortheview.

NoteIfthexd:CtrlIdattributeisnotusedintheXSLT/HTMLcodefortheview,thentheviewContextattributeisignored.

TheviewContextattributecanbeusedtodisambiguatecontrolswhentwoinstancesofthesamecontrolhavethesameXMLcontext(sothattheXMLcontextisidentical).Anexampleisatableofcontentswithchaptertitles,andbelow,thesamechaptersrepeatedwithfullcontent.TwoeditWithelementsforitem="chapter"butdifferentviewcontextscanspecifydistinctbehavior.

ExampleThefollowingisanexampleoftheviewContextattributeasitisusedinthexmlToEditelement:

<xsf:editing><xsf:xmlToEditname="CD_10"item="/CustomUISample/CDCollection/CD"container="/CustomUISample">viewContext="cdID"<xsf:editWithcaption="CD"xd:autogeneration="template"component="xCollection"><xsf:fragmentToInsert><xsf:chooseFragmentparent="CDCollection"><CD><Title></Title><Artist></Artist><Tracks><Track></Track><Track></Track></Tracks></CD></xsf:chooseFragment></xsf:fragmentToInsert></xsf:editWith></xsf:xmlToEdit></xsf:editing>

ShowAll

widgetIconAttribute

Specifieswhetheramodifiediconwillbeshownforfiltereditems.

Typexsd:simpleType

ParentElements

Element DescriptioneditWith (Optionalelement)Specifiesaninstanceofanediting

component,andprovidesthecorrespondingparameterstodetermineitsexactbehavior.

Definition

<xsd:attributename="widgetIcon"use="optional"><xsd:simpleType><xsd:restrictionbase="xsd:string"><xsd:enumerationvalue="standard"/><xsd:enumerationvalue="filter"/></xsd:restriction></xsd:simpleType></xsd:attribute>

RemarksThewidgetIconattributeisanoptionalattributeoftheeditWithelement.Itsdefaultvalueis"standard".

ThepropertiesdialogboxesforrepeatingsectionsandtableshaveaFilterDatabuttonontheDisplaytab.BelowtheFilterDatabuttonisacheckboxthatallowstheusertoselectwhetheramodifiediconwillbeshowntoindicatefiltereditems.Iftheuserappliesafilterandselectsthischeckbox,thewidgetIconattributeintheformdefinitionfile(.xsf)issetto"filter".ThewidgetIconattributeisonlyapplicableforrepeatingsectionsandtables.

NoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthewidgetIconattributeasitisusedintheeditWithelement:

<editWithcomponent="xCollection"widgetIcon="filter|standard"useFilter="yes|no"filterDependency="xpath1|xpath2|xpath3>

ShowAll

wsdlUrlAttribute

ContainstheUniformResourceLocator(URL)oftheWebServicesDescriptionLanguage(WSDL)filethatdescribestheWebservicespecification.

Type

xsd:string

RemarksThewsdlUrlattributeisarequiredattributeofthewebServiceAdapterelement.

ExampleThefollowingisanexampleofthewsdlUrlattributeasitisusedinthewebServiceAdapterelement:

<xsf:query><xsf:webServiceAdapterwsdlUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx?WSDL"queryAllowed="yes"submitAllowed="no"><xsf:operationname="getOrders"soapAction="http://tempuri.org/getOrders"serviceUrl="http://localhost/infopathwebservicesample/infopathwebservicesample.asmx"><xsf:inputsource="Submit.xml"></xsf:input></xsf:operation></xsf:webServiceAdapter></xsf:query>

ShowAll

wsdlUrlAttribute(hwsAdapterElement)

ContainstheUniformResourceLocator(URL)oftheMicrosoftBizTalk2004HumanWorkflowServices(HWS)Webservice.

Typexsd:string

ParentElements

Element DescriptionhwsAdapter DefinestheHWSdataadaptertostartorextendanactivity

floworrespondtoatask.

Definition

<xsd:attributename="wsdlUrl"type="xsd:string"use="required"></xsd:attribute>

RemarksNoteThisitemisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003EditionsServicePack1orlaterisnotinstalled.Anyformdefinedbyaformdefinitionfile(.xsf)thatincludesthisitemcannotbeopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.

ExampleThefollowingisanexampleofthewsdlUrlattributeasitisusedinthehwsAdapterelement:

<xsf:hwsWorkflowtaskpaneVisible="yes"><xsf:locationurl="http://www.contoso.com/hwsservice/hwsservice.asmx"/><xsf:allowedActions><xsf:actionname="approval"actionTypeID="123"canInitiateWorkflow="yes"caption="GetApproval"/><xsf:actionname="delegate"actionTypeID="234"canInitiateWorkflow="no"caption="Delegate"/></xsf:allowedActions><xsf:allowedTasks><xsf:taskname="getManagerApproval"taskTypeID="435"caption="SendResponse"/><xsf:taskname="getVPApproval"taskTypeID="436"caption="SendResponse"/><xsf:taskname="delegateToManager"taskTypeID="420"caption="Respond"/></xsf:allowedTasks></xsf:hwsWorkflow>

<xsf:hwsAdaptername="StartApproval"wsdlUrl="http://www.contoso.com/hwsservice/hwsservice.asmx?WSDL"submitAllowed="yes"><xsf:hwsOperationtype="addActionToNewActivityFlow"typeID="{guid}"serviceUrl="http://www.contoso.com/hwsservice/hwsservice.asmx"><xsf:inputsource="HWSMessage1.xml"><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param1"replaceWith="/my:myFields/my:param1"/><xsf:partFragmentmatch="/ns1:HWSMessage/ActionSection/param2"

replaceWith="/a:some/b:thing"dataObject="Aux1"/></xsf:input></xsf:hwsOperation></xsf:hwsAdapter>

xmlnsAttribute

Definesthexsfnamespace.

Type

xsd:string

RemarksThexmlnsattributeisarequiredattributeofthexDocumentClasselement,andisthestandardmechanismfordeclaringXMLnamespaces.

ExampleThefollowingisanexampleofthexmlnsattributeasitisusedinthexDocumentClasselement:

<xsf:xDocumentClassxmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"name="urn:microsoft-com:myTravelReport"author="AuthorName"description="TravelReportformforenteringtravelreports,issues,expenses,etc."dataFormSolution="yes"solutionVersion="1.0.0.1"productVersion="11.0.5106"solutionFormatVersion="1.0.0.0">...</xsf:xDocumentClass>

xmlToEditAttribute

SpecifiesthenameofanxmlToEditelement,forwhichthebuttonisused.

Type

xsd:NMTOKEN

RemarksThexmlToEditattributeisanoptionalattributeofthebuttonelement,butisrequiredforbuttonsusedwitheditingcomponents.

ExampleThefollowingisanexampleofthexmlToEditattributeasitisusedinthebuttonelement:

<xsf:menuAreaname="msoInsertMenu"><xsf:menucaption="&amp;Section"><xsf:buttonaction="xCollection::insert"xmlToEdit="CD_10"caption="CD"showIf="always"></xsf:button><xsf:buttonaction="xCollection::insert"xmlToEdit="Track_14"caption="Track"showIf="always"></xsf:button><xsf:buttonaction="xOptional::insert"xmlToEdit="Label_16"caption="Label"></xsf:button></xsf:menu></xsf:menuArea>

XDocumentProperty(SaveEventObject)

Aread-onlypropertythatreturnsareferencetotheXDocumentobjectthatisassociatedwiththeSaveEventobjectinanOnSaveRequestevent.

expression.XDocument

expressionRequired.ReturnsareferencetoaSaveEventobject.

SecurityLevel2:Canbeaccessedonlybyformsrunninginthesamedomainasthecurrentlyopenform,orbyformsthathavebeengrantedcross-domainpermissions.

RemarksNoteThisobjectmodelmemberisnotsupportedwhentheDisableServicePackfeaturesoptionontheAdvancedtaboftheOptionsdialogboxinInfoPathisselectedorwhenMicrosoftOffice2003ServicePack1orlaterisnotinstalled.AnyformthatimplementsthisobjectmodelmemberinitscodewillgenerateanerrormessageifitisopenedinInfoPathwhenservicepackfeaturesaredisabledorunavailable.