Setting a text box to = DD List Displayname without a secondary data source - InfoPath Dev
in

InfoPath Dev

Setting a text box to = DD List Displayname without a secondary data source

Last post 05-14-2015 01:20 PM by justinf10000. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 05-14-2015 12:27 PM

    Setting a text box to = DD List Displayname without a secondary data source

    Basically the title says it all.

     I have a drop down list containing 16 options valued 1-16. This was all manually entered and not from another datasource. How can I display the Text name in another box instead of the value?

     

    I have tried many things and nothing will work!! Is there a function that can do this? Ideally I do not want to create another datasource just for this sole reason!

     

    Thanks in advance 

  • 05-14-2015 12:39 PM In reply to

    Re: Setting a text box to = DD List Displayname without a secondary data source

    You'd have to add 16 rules on the field connected to the drop down.

    Each one would have a condition.

    For example, if the value of the field is "2", you'd set your text box to the "display" for value 2.

    It seems to me it would be a lot easier to create an XML file with the options, add it to the form as a resource file, create a data connection to it, and then change the dropdown to use that data source. Then you can use a default value in your text field.

    Hilary Stoupa

  • 05-14-2015 12:43 PM In reply to

    Re: Setting a text box to = DD List Displayname without a secondary data source

     I was worried that that was the only option :(

     

    I'm surprised there is no easier function for this. I wanted to avoid creating additional datasources because I am making this form for my company, and once my contract ends they will not know how to edit anything. Ideally I wanted to keep it as simple as possible.

     

    Why is InfoPath able to dynamically change the value in a text box (based off DD selection) but there is no simple way to just display the name corresponding to that value? It makes no sense to me

     

    Thanks for the reply tho 

  • 05-14-2015 12:52 PM In reply to

    Re: Setting a text box to = DD List Displayname without a secondary data source

    When you hardcode the options, they are in the view file (the XSL) - there are no functions in InfoPath for getting data back from the view. Is the company using SharePoint at all? Then you could put the data in a list - which is pretty easy to add items to if needed down the road. Is there a reason for using 1, 2, etc for the values instead of just using the display for both?

    Hilary Stoupa

  • 05-14-2015 12:56 PM In reply to

    Re: Setting a text box to = DD List Displayname without a secondary data source

     No there isn't at the time, but I thought I may have a use for them in the future. Maybe you are right and I should just set both as the text.

     

    And as for sharepoint yes. That is the whole purpose of this. The problem I was having is I want the dropdown selection to appear as text in the form library. Right now it is only displaying the numeric value. Again, I should probably just set both the value and name as the text, but I'm not sure what that could affect in the future.

     

    Btw I just learned InfoPath and sharepoint about a week ago, so making quite a few errors and easy things more difficult :D 

  • 05-14-2015 01:03 PM In reply to

    Re: Setting a text box to = DD List Displayname without a secondary data source

    Is this form currently in production? Has anyone filled it out? If so, you are now stuck w/ numbers for the values. But if the numbers don't actually have any meaning, and the form is not yet being filled out, you should be able to just change your dropdown so that the value and display are the same.

    Hilary Stoupa

  • 05-14-2015 01:20 PM In reply to

    Re: Setting a text box to = DD List Displayname without a secondary data source

     Alright thanks I'll just do that then. The form is not live yet 

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