Xpath Expression for Infopath Developer - InfoPath Dev
in

InfoPath Dev

Xpath Expression for Infopath Developer

Last post 06-19-2011 03:44 AM by Skarn. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-03-2011 09:25 AM

    Xpath Expression for Infopath Developer

    Hi,

    I am currently attempting to create an infopath form linked with Sharepoint list that needs minimal data entry requirements.

    Short version is:

    I need to automatically set a field value from a Sharepoint list column, based on the user's selection from a drop down form control.  Is there an xpath expression for this?

    Long version is:

    I have created a annual leave request form in infopath with data connections from a Sharepoint employee list which we need to extract employee ID numbers and Leave Entitlement Available automatically when the user selects their name from the drop down box in the form control.   At this stage I am trying to solve this via a rule applied to the name drop down box which would set the value for the ID number and the leave entitlement available fields when the name field is changed.

    If you need any further information please do feel free to ask any questions.

    I would really appreciate any input for solutions to the rule or xpath expression or any other alternative that is any simpler.

    Many thanks

    Angie SSS

  • 06-19-2011 03:44 AM In reply to

    • Skarn
    • Top 50 Contributor
      Male
    • Joined on 04-20-2008
    • Australia
    • Posts 198

    Re: Xpath Expression for Infopath Developer

    You sound like you are already on the right track - what you are describing should be doable via the built in Infopath rules gui/interface - I doubt you would even need to manually write any xpath.

    e.g. sharepoint table 1 with leave entitlements

    ID leaveEntitlement
    0 250 hrs
    1 102 hrs

    sharepoint table 2 with user names

    ID name
    0 John Mowely
    1 Jane Lovely

    Populate the name drop down box (lets call it my:selectName) with a secondary data connection to table 2, but make the bound value the ID.

    Then a rule on the name drop down should query another secondary data connection to table 1 which has a filter on it to only retrieve leaveEntitlement where ID = my:selectName.
    Then set your field where the entitlement should be put from the secondary data connection.

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