Infopath Updating a maindata source using Code - InfoPath Dev
in

InfoPath Dev

Infopath Updating a maindata source using Code

Last post 05-12-2009 06:43 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-12-2009 02:39 AM

    Infopath Updating a maindata source using Code

    I'm new to Infopath I am trying to update a field called 'prepared_by' using code (infopath 2003). On the load process I have : var wshShell = new ActiveXObject("Wscript.Shell"); var wshEnv = wshShell.Environment("Process"); var username = wshEnv.Item("UserName"); (Tested and works great!) I have a main datasource which update a database on a shared network called : Tbl_Main I'm using a repeating selection for users to update. I tried using: XDocument.DOM.selectSingleNode("/my:myFields/my:Prepared_By").text = username; But I get a message saying selectSingleNode is null. Can someone assist me by telling me how I can get the Field 'Prepared_By' to default or update to my Username reference?
    Ram.
  • 05-12-2009 06:43 PM In reply to

    Re: Infopath Updating a maindata source using Code

    Hi Ram,

    If you are not a developer, you should hire one. This is a simple question for a developer. We don't just work for free here. :) We will answer questions that have been researched and are thoughtful, but if someone just asks 20 questions over the weekend, it sure seems to suggest that they aren't doing their homework. This website has been around for over 5 years. We have tons of content and forum posts. Please take some time to search the forum and read previous posts first. For general programming questions, please look for examples in Microsoft's SDK. For really tricky things, please ask us. We're here to help you, but you need to try to help yourself first.

    Cheers!

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.