Set field value based on value selected in drop-down - InfoPath Dev
in

InfoPath Dev

Set field value based on value selected in drop-down

Last post 03-06-2012 09:48 AM by Anson Hidajat. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-05-2012 09:50 AM

    Set field value based on value selected in drop-down

    A user selects a J Number from a drop-down. This j number carries a WNumber, and is populated from a data connection.

     I want to set the value of a hidden field in the main data source to equal the WNumber that is selected in the drop-down. Here is the rule setup on the drop-down:

    Set fields value: ID = WNumber [_ID = current()]

    ID -main data source
    WNumber - secondary data source that populates the drop-down (WNumber is equivalent of the id)
    _ID - secondary data source that gets data to populate other fields on the form

    Here is the XPath: xdXDocument:GetDOM("getJList")/dfs:myFields/dfs:dataFields/tns:getJListResponse/tns:getJListResult/NewDataSet/JList/WNumber[xdXDocument:GetDOM("W Data")/dfs:myFields/dfs:dataFields/dfs:W_Data/@\_ID = current()]

    My main issue is that I can't figure out how to properly filter the ID. The WNumber/ID is selected from the drop-down. I just want whatever that value is to be copied into this other hidden field. Seems simple, but i cannot get the filter right.

  • 03-06-2012 09:48 AM In reply to

    Re: Set field value based on value selected in drop-down

    Perhaps this video tutorial might help: http://www.youtube.com/watch?v=SH7xUEcQwwg
    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

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