Set a textbox value with a dusaplyname of a dropdown - InfoPath Dev
in

InfoPath Dev

Set a textbox value with a dusaplyname of a dropdown

Last post 12-02-2012 03:16 AM by daniweb. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-02-2012 02:29 AM

    Set a textbox value with a dusaplyname of a dropdown

    Hi,

    I have a drop-down, button and text-box. The Data of the drop-down is filled from a Share-Point list(but I don't think this matters).

    When I click the button, I want to fill the text-box with the display name of the selected value of the drop-down, I was able to fill only the value but not the display name, how can I do it?

    I tried(in the set fields value):

    dfs:dataFields/my:SharePointListItem_RW/my:FirstValue[@DisplayName]

    dfs:dataFields/my:SharePointListItem_RW/my:FirstValue[@Name]

    dfs:dataFields/my:SharePointListItem_RW/my:FirstValue/@DisplayName]

    dfs:dataFields/my:SharePointListItem_RW/my:FirstValue/@Name

    non of them work

    Thank in advance for the help.

  • 12-02-2012 03:16 AM In reply to

    Re: Set a textbox value with a dusaplyname of a dropdown

    Some times you find a solution after posting a question...

    I'm posting the answer for other to come, here we go:

    1.  add a rule for the button.

    2, add an action of: "set a field's value" in "rules menu"

    3.  in field, look-up for the text-box in the main data source.

    4. in value(pay good attention here) :

    • click the Fx
    • click insert a field or group
    • choose the data source that you used to fill the drop-down
    • click on the parameter that you used for the display name
    • click on filter data, pay attention again! Now you filter the data of the list
    1. click add
    2. click the fields data source(mine was value) that you used to display in the value of the drop-down.
    3. click is equal to
    4. click select a field or a group, Pay attention again!
    • choose(again) the main Data source.
    • choose the drop-down.

    click ok 5 times!

     

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