You are viewing limited content. For full access, please sign in.

Question

Question

Forms formats SQL Lookup and removes spaces. How do I keep the formatting?

asked on February 13, 2017

In Forms 10 I have a SQL lookup that starts with a job number (60000-) then pulls the available Phases for the job number (0100-12345-) then attempts to lookup the the available cost codes for the match.

I can get the job number no problem as well as lookup and get the Phases, but when the Phase number is returned, the spacing is formatted so the next lookup fails.

The Phase field in SQL is a 4R-5R-5RN.  So a value of (0100-   60-) would return (0100- 60-) and truncate the spaces. A value of (0100- 9000-) works perfectly as it is 5 characters after the dash.  Anything less than 4 characters after the 4R- fails.

Is there a way to hold the value format so that the next lookup works?

Is there a CSS format or javascript I could employ to format the lookup returned value?

Any help is appreciated.  My workaround is to build another table eliminating the spaces and then updating that table with live data daily.

0 0

Answer

SELECTED ANSWER
replied on February 15, 2017

Rui,  You are my hero.  Looking at your video showed me the way.  My fields have all been setup as drop-downs (failing) and your test field was just a single line.  When I switched my fields to single line, it worked perfectly!!!!

0 0

Replies

replied on February 13, 2017

Hi Ken,

I tested on 10.1.0.642 and 10.2.0.789, the consecutive spaces were not truncated and lookup return value is "0100-   60-".

Which version of Forms are you using?

0 0
replied on February 14, 2017

Hi, we are running 10.2.0.774

0 0
replied on February 14, 2017

I updated to Forms 10.2.0.789 and still experience the same results.  I have a SQL connection to test as well as an ODBC connection to a spreadsheet with sample data.  Both ways fail and truncate the white space.

0 0
replied on February 14, 2017

I tried ODBC with Excel and it worked as well:

http://www.screencast.com/t/21FkmaGTJC

Can you open a support case and provide lookup data and business process if available? Thanks.

0 0
SELECTED ANSWER
replied on February 15, 2017

Rui,  You are my hero.  Looking at your video showed me the way.  My fields have all been setup as drop-downs (failing) and your test field was just a single line.  When I switched my fields to single line, it worked perfectly!!!!

0 0
replied on February 15, 2017

Hi Ken, I just realized you were using dropdown field and yeah, it did not work in that way.

Please use single line field as a workaround at this moment, sorry for the inconvenience. 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.