Pashman's InfoPath Goldmine

This is where Tim Pash posts all of the juicy nuggets of stuff on how to get the job done using InfoPath.

Browse by Tags

Tagged Content List
  • Blog Post: Copying Data from a Secondary Datasource to a Child Table in a Main Datasource

    This code sample documents a block of VB.Net code I had to write recently for retrieving a block of data from a secondary datasource, and then copying that data into a child table of a dataset in the main datasource. I've copied it over as is for my benefit as much as yours - I lost this code recently...
  • Blog Post: XPathNavigator Control in VB.NET

    VB.NET and probably the other managed code languages uses a new syntax for specifying nodes and traversing XML in a form. I don't claim to have a firm grasp on this, I only know what works. Let's say you've got a field in your form whose value you set via rules or defaults, like a datetime field. Below...
  • Blog Post: Custom Task Panes in InfoPath 2007 Using VB.NET

    Folks, Just starting to get involved in dealing with VB.NET and VSTA in InfoPath 2007. A lot of what I've taken for granted in InfoPath 2003 and JScript no longer applies. Take Custom Task Panes for example. A neat idea, and super-useful. Doesn't work the same way in InfoPath 2007. Well some of it...
  • Blog Post: Getting Current User in InfoPath 2007 via C#

    Folks, Got a little code sample from a fellow watcher of Pashman's Goldmine (thanks Huseyin) on how to retreive the username of the current user via C# code. Since all code samples are useful, I've posted it below: public void FormEvents_Loading( object sender, LoadingEventArgs e) { string...
  • Blog Post: Programmatically Launching Another Form from Within a Form

    Application.XDocuments.NewFromSolution(urlToXsnFile) or Application.XDocuments.Open(urlToXmlFile) Your form will need to require full trust in order to use either of these OM methods. Keep it simple, right? Tim
  • Blog Post: Manipulating Secondary Datasources using C#

    Hey folks, Like many of you, I'm being dragged into the land of managed code in order to achieve things that I've had oodles of JScript code samples to do for a long time. The InfoPath Toolkit for VS.NET allows you to write code in either VB or C#; since C# looked more like JScript, and I had both...
  • Blog Post: Increasing the TimeOut Value on Database Submit

    Folks, Had an issue recently where a user of one of my solutions had pretty terrible bandwidth to the SQL server where they needed to submit data. The default timeout value on submits is 30 seconds. As it turn out, the default for queries too is 30 seconds. You can reset that value fairly easily in...
  • Blog Post: Drop the Solution Version Number in a Field

    Simple question, simple answer. Let's say you want to tell a user what version of the solution they are using. Technically the way the InfoPath works they don't need to worry about that, but let's just say you wanted to tell them. The following code shows you how to grab a node and push the solution...
  • Blog Post: Dynamic Efficient Querying of Large Datasets

    Folks, I have done a lot of work with making InfoPath live up to it's promise of providing an offline experience. That promise becomes a lot harder to fulfill when you are querying large datasets in your form to populate one dropdown lists or more likely a series of cascading dropdowns. The issue...
  • Blog Post: Jumping Around in a Long Form

    Hi Everybody, Hey sometimes you get a long form that requires you to do a lot of scrolling around to get to to the different sections. I use a lot of tricks with views and/or conditionally hidden sections to make things look like they all fit on one page. Nevertheless, there are some of you that just...
  • Blog Post: Adding Data to Dropdowns and Requerying in One Step

    Folks, Ran into a sticky issue the other day where a customer wanted a drop down list to be bound to a table (they put it as enforced referential integrity), but wanted to allow the users the ability to add values to the dropdown on the fly. The idea that I came up with was to put a button on the...
  • Blog Post: More on Programmatically E-Mailing via InfoPath Code

    Folks, In this post http://blogs.msdn.com/timpash/archive/2005/11/03/Alternate_Ways_To_Send_Mail.aspx I was a bit lax in getting the novice to a 100% solution. What I left out is that most often a user is going to want to pluck values out of the form and then use those values as recipients or in the...
  • Blog Post: Getting InfoPath and BizTalk to Play Nicely Together

    Folks, Been a little remiss in posting for a while. Been busy! In any case, I've encountered some nuances about interacting with BizTalk that I'd like to share. I often talk about how BizTalk and InfoPath are perfect bedfellows in that they are both XML centric and are "designed to work together"...
  • Blog Post: Programmatically Writing Files to Directories

    Ok, so it's easy to send an e-mail, post to a web service or post to a WSS/SPS Form Library using the canned data connections. That's all fine and well. It's not easy however to push a file to a file directory, either locally or to a file share somewhere on the intranet. I had a problem recently where...
  • Blog Post: Getting a Unique Value for a Field

    I've been asked multiple times on how to get a guaranteed unique value for a field in a form. It normally comes up in the context of a tracking id, or a request id - something that you know will be unique and will be a way to recall that entry at some point in the future. Because of the nature of InfoPath...
  • Blog Post: Getting Just Unique Values in a Dropdown via XPATH

    Something that has dogged me for a long time is the fact that when I'm doing cascading filtered dropdowns I've had to set up more than one data connection in order to accommodate the right behavior. I generally have a two column datasource coming from SQL; one column that contains values that will repeat...
  • Blog Post: How to Populate Current User in Form Without Needing a Code Signing Certificate

    Folks, On my Blog I have two code samples that talk about pulling the Current User information based on the user's authentication to Active Directory and populating it into a form. One sample uses JScript and the other uses VB.Net. The JScript sample requires that the solution be signed with a Level...
  • Blog Post: Switching Views After Merge

    Here's a little code snippet on how to programmatically switch views. This example switches the view after a merge event on a Form Library, which is very cool. function XDocument::OnAfterImport(eventObj) { XDocument.View.SwitchView("ManagerView"); } This sample had two views on it, an...
  • Blog Post: Definitive Source for Code to Automate E-Mailing Forms

    You will find that at some point you need to be a little more clever with sending mail than what InfoPath will allow you to do with just the GUI and dataconnections. A colleague of mine, Scott Heim, sent me an awesome little XSN file that had 4 buttons in it that highlighting four different ways to kick...
  • Blog Post: More Ways to Pull Info from Active Directory

    Here is a posting from Tom Mata, a colleague of mine from Armstrong Industries, who found an alternate way to reach into AD and get information on the current logged on user (compare and contrast this to Lab 15 in the InfoPath Labs that I reference on 10/17/05). I...
  • Blog Post: Calling the Outlook Address Book from InfoPath

    Ok, so I'm no code slinger, but once in a while I get my hands dirty and write (more like customize existing) code. Many times I have to break the bad news to customers that Outlook as a forms tool linking to Public Folders is going the way of the dodo. Therefore I get requests on how to convert Outlook...
  • Blog Post: JScript Sample That Finds Blank Rows and Removes Them

    I had a solution that aggregated multiple XML posts in a SharePoint Form Library into one document. It was to consolidate multiple employee end of month reports into one big report. The problem was that many of the areas of the InfoPath form that were supposed to be filled out weren't - for valid reasons...
  • Blog Post: Use of the Current() Function

    One of the most annoying things that can happen in InfoPath is a problem that occurs when you are using Filtered Data to populate a second dropdown from the results picked in an initial dropdown in a repeating section or repeating table (a.k.a. cascading filtered dropdowns). The problem can also arise...
  • Blog Post: Retrieve username from logon environment.

    The following is the most common code snippet I offer to people. The original authors are mentioned in the post below. http://www.infopathfaq.com INFOPATHFAQ010124 - from the web, can you pass a users login to a form? - 8 Comments - stephencummins - Mon, Aug 18th, 2003 - Development If the...
Page 1 of 1 (24 items)