Drop Down List Trimming Spaces - InfoPath Dev Sign in | Join | Help in General InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » General » Drop Down List Trimming Spaces Drop Down List Trimming Spaces Last post 02-09-2011 04:50 PM by dlcj21. 3 replies. Page 1 of 1 (4 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 01-28-2011 11:25 AM dlcj21 Joined on 01-28-2011 Posts 22 Drop Down List Trimming Spaces Reply Contact Hi, I have a field that concatenates 3 values together separated by a |. I'm using a drop down list to display the concatenated field. Those 3 values are all variable length so I wrote a SQL query that pads in spaces to make it so that they are all the same length and use a fixed length font so that the | line up. It works in SQL and returns the expected result, but when the drop down is populated, it looks to be trimming off all of the spaces I've added. Is there a setting I can change or a work around I can do other than adding in underscores? 01-31-2011 01:26 PM In reply to Greg Collins Joined on 08-07-2006 Posts 2,126 Re: Drop Down List Trimming Spaces Mark as Not AnswerMark as Answer... Reply Contact I'm not seeing this behavior in either InfoPath 2010 or 2007--at least not if I manually add options to a drop-down list. The extra spaces I type in are shown when I preview the form and open the drop-down.Perhaps the changes are occuring when pulling down the data from SQL? Please Visit:BraintroveGreg's Paintings 01-31-2011 05:32 PM In reply to Jimmy Joined on 07-03-2008 Posts 2,595 Re: Drop Down List Trimming Spaces Mark as Not AnswerMark as Answer... Reply Contact Could you try padding the values with char(160) instead of ordinary spaces? I think you might be encountering the behavior described here: http://en.wikipedia.org/wiki/Non-breaking_space#Use_as_non-collapsing_white-space Jimmy Rishe / Software Developer / Microsoft MVPQdabra Software 02-09-2011 04:50 PM In reply to dlcj21 Joined on 01-28-2011 Posts 22 Re: Drop Down List Trimming Spaces Mark as Not AnswerMark as Answer... Reply Contact Thanks Jimmy, that did the trick. Just in case others are having the same issue, you can type a non breaking white space by holding down alt, typing 0160 on your number pad, then release alt. It will insert a non breaking white space. Page 1 of 1 (4 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
I'm not seeing this behavior in either InfoPath 2010 or 2007--at least not if I manually add options to a drop-down list. The extra spaces I type in are shown when I preview the form and open the drop-down.
Perhaps the changes are occuring when pulling down the data from SQL?
Could you try padding the values with char(160) instead of ordinary spaces? I think you might be encountering the behavior described here:
http://en.wikipedia.org/wiki/Non-breaking_space#Use_as_non-collapsing_white-space
Thanks Jimmy, that did the trick. Just in case others are having the same issue, you can type a non breaking white space by holding down alt, typing 0160 on your number pad, then release alt. It will insert a non breaking white space.