Confused about how InfoPath handles data. - InfoPath Dev
in

InfoPath Dev

Confused about how InfoPath handles data.

Last post 06-28-2011 10:46 AM by plighty. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 06-27-2011 02:33 PM

    Confused about how InfoPath handles data.

    I think this is a basic question to understand InfoPath 2007 and it's datasource mechanism.

    - I have a field "projectLead" (type:string, directly under "myfields" folder). I can use an expression control and the xpath: my:projectLead and the field contents display properly as expected.  However, if I set up a text field control and set the default value to be the same projectLead it shows the xpath as: ../my:projectLead and doesn't display anything.  If I try to manually change the xpath to say my:projectLead I get an error saying that the path doesn't point to a valid location.

    What am I missing here?

  • 06-27-2011 02:41 PM In reply to

    Re: Confused about how InfoPath handles data.

    Your expression box is most likely sitting in a section bound to a node higher up the tree than your text box. So, definitely, the expression box would use the XPath my:projectLead and your text box would use ../my:projectLead. The ../ is taking you up the tree - so let's say your text box is bound to a field under the myFields folder called my:leadName - you'd need to go up to myFields (../) then to the project lead field (my:projectLead), giving you ../my:projectLead.

    Now, as to why the value isn't showing in your text box - well, it should. Your text box isn't also bound to the my:projectLead field, is it? Can you attach your template to the Options tab so I can take a quick peek at it?

    Hilary Stoupa

  • 06-28-2011 08:51 AM In reply to

    Re: Confused about how InfoPath handles data.

    I've attached a quick sample form that duplicates the issue.  The read only view has the expression box displaying data and the text box not. 

    Thanks!

  • 06-28-2011 09:34 AM In reply to

    Re: Confused about how InfoPath handles data.

    Do you have all your service packs installed? I ask because this form behaves as anticipated for me.


    Hilary Stoupa

  • 06-28-2011 10:45 AM In reply to

    Re: Confused about how InfoPath handles data.

    Ug, I hate when stuff like this happens, cause now it's working fine for me.  However when I opened up the form I originally tested with it was still not working.  Oh well, at least I'm not going crazy, glad it's working in one instance, I have no idea what could have changed from one to the other, I didn't do anything significant that I'm aware of.

     


  • 06-28-2011 10:46 AM In reply to

    Re: Confused about how InfoPath handles data.

    The original one just to show I wasn't being insane.


  • 06-28-2011 12:33 PM In reply to

    Re: Confused about how InfoPath handles data.

    Think I figured it out.  I was adding this to existing forms and using this as a default value for a text field, which would pretty much only apply to new BLANK forms that would require a DEFAULT value :-/.

Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.