Issue with autosuggest on a numeric field

I have a form with a CFINPUT that has autosuggest to a cfc.
The cfc runs a query against a varchar field that has only numeric
values. When the match is made and the lis is returned I get an
error (Bind failed for autosuggest CUSTOMER, bind value is not a 1D
array of strings). This only happens with fields that are all
numeric, if the field has any letters or symbols I do not have this
issue.
The data returned is coming back as numeric in scientific
notation (CFC invocation response: [5.159000038E9]) The data is
matching on the phone number and that is what is being returned.
It there a way to correct this issue? Code sample is below.
<cfinput type="text" name="CUSTOMER" size="10"
maxlength="10" value="#CUSTOMER#"
autosuggest="cfc:customerInfo.getCustomerSuggest({DSN},
{cfautosuggestvalue})">
here is the function from the CFC:
<cffunction name="getCustomerSuggest" access="remote"
returntype="array" output="false">
<cfargument name="argDB" type="string" required="yes">
<cfargument name="argCUSTOMER" type="string"
required="yes">
<cfset var myarray = ArrayNew(1)>
<cfquery name="cstInfo" datasource="#argDB#"
maxrows="25">
SELECT customer
FROM custFile
WHERE customer LIKE <cfqueryparam value="#argCUSTOMER#%"
cfsqltype="CF_SQL_VARCHAR">
</cfquery>
<cfloop query="cstInfo">
<cfset arrayAppend(myarray, '#customer# ')>
</cfloop>
<cfreturn myarray>
</cffunction>

I don't understand the actual results desired. But I would
make my cffunction returntype a string and get rid of the cfloop
that creates your array. One of my autosuggest cfcs is;
<cffunction name="getJobsearch" access="remote"
returnType="string" output="false">
<cfargument name="term" type="string"
required="false">
<cfset var Jqry = "">
<cfquery name="Jqry" datasource="taxsearchdb">
SELECT J.CompanyName + ' ' + J.CompanyCity + ' ' + C.State +
' ^' + cast(J.JobOrderNumber as varchar) as Jname
FROM jorder J, Companies C
WHERE J.CompanyNumber = C.CompanyRecordNumber and
J.CompanyName LIKE <cfqueryparam cfsqltype="cf_sql_var"
value="#trim(arguments.term)#%">
</cfquery>
<cfreturn ValueList(Jqry.Jname)>
</cffunction>

Similar Messages

  • Issue with creation of a specific field for a java program.

    Hey everyone,
    This is homework which is end of chapter "challenges" to practice what we've learnt.
    The chapter covers inheritance (super class and all things related)
    I'm having quite an annoying issue with the very beginning of the instructions, where it tells me to make the following fields:
    - Employee name
    - Employee number in the format XXX-L , where each X is a digit within the range 0-9 and the L is a letter within the range A-M.
    - Hire date
    This is what I wrote for code so far
    private String name;
    //private WTF
    private String date;I really have no idea what to do for the second field, how to even constrain integers and letters in the same field with a rule for number range and letter range, and that for each character independently, for what I understand.
    Any advice with this? It's blocking me from continuing -_-, because I can't make accessors and mutators and constructors, etc, if i'm still unsure of how the fields unfold.
    Thanks in advance.

    You can create a HireDate class.
    public class HireDate{
       private final int day;
       private final String month;
       private final int year;
       public HireDate(int day, String month, int year){
          this.day = day;
          this.month = month;
          this.year = year;
    }In the HireDate Constructor you could put if statements to ensure that only correct information is present. The fields are final because the hire date will not change. Override the toString() method so that when you print it out it will be in the correct format. Create some getter methods to get the private fields.
    Then in your other class just do this
    HireDate hired = new HireDate(10, July, 1991);Now you have an object that stores all 3 fields for you. You can use the object as you like and when it prints it will be in the format you want.
    Or you could just make hireDate a String variable. That is what I always did and I never lost marks for it. The reason I suggest this way is because you mentioned rules and constraints.

  • Issue with length of form text fields in Firefox in OSX

    I've just spotted an issue with this in a page on a site, with two forms next to each other. (the limited space has highlighted it.)
    Basically FF on the Mac is making the text fields longer than any other browser :
    http://www.goodsafariguide.com/trade/loginfail2.php
    If anyone knows a fix for this, that would be great.
    If not, I'll just reduce their length so that at least they're not squashed in any browser (even though they'll be a bit short in every browser other than FF Mac).
    http://www.goodsafariguide.com/trade/loginfail2.php
    Thanks.

    Thanks guys - its just not something I've really noticed before, as most forms I do have enough width compared to this page where I have two side by side.
    Will pop that bit of CSS in.

  • Using LOV with Validation on the Numeric Fields results in Error

    Dear JHeadstart Team,
    During my work with lov I encountered another problem. I defined a lov and attached the lov to a numeric field and check the LOV for validation. Now when I use LOV using the LOV button it works fine but when I enter some numbers and then press tab the LOV was not shown correctly and resulted in the following errors and the worst thing is that you can not navigate to any other pages and all try to navigate to other pages results in errors too. When we put the same LOV on a string field (which is not desirable for us) it worked fine.
    It seems to me like a bug. Am I right? Is ther any solution or workaround for this problem?
    Thanks in advance,
    Navid
    16:31:29 DEBUG (LovItemBean) -Cleared value of item HrTrainingCourseSchedulesTitle
    16:31:29 DEBUG (LovItemBean) -Cleared value binding #{bindings.HrTrainingCourseSchedulesTitle.inputValue} of item HrTrainingCourseSchedulesTitle
    16:31:29 ERROR (ApplyRequestValuesPhase) -java.lang.ClassCastException: java.lang.Long
    javax.faces.el.EvaluationException: java.lang.ClassCastException: java.lang.Long
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
         at oracle.adf.view.faces.component.UIXComponentBase.__broadcast(UIXComponentBase.java:1079)
         at oracle.adf.view.faces.component.UIXEditableValue.broadcast(UIXEditableValue.java:247)
         at oracle.adf.view.faces.component.UIXSelectInput.broadcast(UIXSelectInput.java:215)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:249)
         at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:307)
         at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:79)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at com.pooya.controller.jsf.PooyaAuthenticationFilter.doFilter(PooyaAuthenticationFilter.java:256)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.ClassCastException: java.lang.Long
         at oracle.jheadstart.controller.jsf.bean.LovItemBean.validateWithLov(LovItemBean.java:101)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         ... 31 more

    Hi Navid,
    We ran into the same bug and have the next workaround for it:
    We extended the JHeadstart class 'LovItemBean' and we have overridden the method 'validateWithLov(...)' with:
      public void validateWithLov(ValueChangeEvent valueChangeEvent)
        Object newValue = valueChangeEvent.getNewValue();
        if(newValue != null && !(newValue instanceof String))
          newValue = newValue.toString();
          ValueChangeEvent newEvent = new ValueChangeEvent(valueChangeEvent.getComponent(), valueChangeEvent.getOldValue(), newValue);
          newEvent.setPhaseId(valueChangeEvent.getPhaseId());
          super.validateWithLov(newEvent);
        else
          super.validateWithLov(valueChangeEvent);
      }Next step is to use a custom template in your JHeaedstart Application Structure file for 'LOV_ITEM_BEAN'. In this custom template you should use your own class as 'managed-bean-class' instead of the default JHeadstart one.
    Now you can safely generate LOV with validation of number fields.
    Maybe something the JHeadstart can pcik up in the next release of JHeadstart :-)
    Hope this helps.
    Pascal

  • Problem with Action Builder and Numeric Field

    Here's my scenario:
    I have a form with a numeric field for the PO Amount and a text field for the Role.  I tried to create an action builder to do the following:
    Condition - When numeric field PO Amount is less than 250,000
    Result - Set Value of Role to be Manager
    When I enter an amount less than 250,000, nothing appears in the Role text field.
    Any help is appreciated!  Thanks!

    Hi,
    this is not so difficult.
    You have to use the script editor (about windows)
    Then you have to mark your numeric field.
    Then you have to select "EXIT" and "JAVASCRIPT".
    Then you have to copy the following script:
    (I come from germany and I don't know which amount you mean because in german is this switched 1,000.00 $ is in german 1.000,00 $) This is the only thing which you adapt maybe.
    if(this.rawValue <250)
        TextField1.rawValue = null;
    }else
        TextField1.rawValue = "Manager";
    Hope it will helps,
    Mandy

  • Issue with DEBMAS IDoc,not all fields are reflected in the IDoc Seg E1KNB1M

    For IDoc type DEBMAS, there is a segment E1KNB1M. This segment is relate to the customer correspondence details (XD02 -> company code data -> Correspondence).
    For any change to the customer master a DEBMAS IDoc is triggered which has data in segments including the E1KNB1M.
    In my case for few customers, the not all fields in the segment E1KNB1M contain data. Few fields contain data but the rest are filled with u2018\u2019. This is happening only in the production system, for the same customer in the quality system the data is there as required.
    I checked in debugging, and found that the data is correctly passed to the segment in program SAPLVV01 Include LVV01F01. And the segment contains data till the IDoc is triggered.  I.e. the fields are not getting cleared at any point.
    Can anyone suggest what is happening and how to fix this? Please note that the issue is only in the production system and not in the quality system ( for the same customer).

    BTT... Need some help on the above

  • Issue with Duplicate Results and Summary Fields

    My report is based on an Access Database. For the purposes of this current issue, there is the Master Table called u201CCnu201D and then a related u201CTable Au201D which includes multiple records related to the Master and also a related u201CTable B,u201D also with multiple records related to the Master.
    For my report, I want to output results from Table B based on criteria in Table A. This naturally produces duplicate output on the report. As a result, the Summary Fields that I want to include are incorrect.
    I have tried multiple combinations of the Select Distinct function, suppression based on u201Cprevious fieldu201D being equal, summary fields, running totals and if-then statements and still cannot find a solution that works in all of the cases involved.
    Below are descriptions of three different scenarios that are occurring:
    EXAMPLE #1: Entry 1 has 2 records in Table A and 2 Records in Table B so "Select Distinct" including the Table B ID # and then a Summary Field for the Total produces the correct results, while a Running Total is Incorrect.
    EXAMPLE #2: Entry 2 has 2 records in Table A and 1 Record in Table B so a suppression formula of the field based on the "Previous =" Table B ID # and the Running Total produce the correct results, while Summary Field is incorrect.
    EXAMPLE #3: Entry 3 has 6 records in Table A and 6 Records in Table B. Neither Summary or
    Running Totals produce correct results.
    I would greatly appreciate any advice in terms of creative formulas, etc. that would help produce correct results here.
    Iu2019ll be pulling my hair out soon! Thanks so much-

    Hi Berry
    Try to create a command with a subquery. The subquery will be returning the the duplicate records and the main query that uses this subquery will find distinct records out of the resultset returned by the subquery.
    Let me know if this helps.
    Regards
    Nikhil

  • Issue with the brightness slider (numeric value possible?)

    As a retoucher I am supposed to keep accurate color management. I create my ICC Monitor profiles with an X-Rites i1XT meter. The screen calibration includes a brightness adjustment to meet a desired luminosity value (I choose to work on a 120cd/m level). My issue is that apples "brightness slider" wont define a value or percentage which I could associate with my current ICC profile. If I would for instance watch a movie in full brightness I could never get back to my previous brightness settings in order to maintain my desired color accuracy!
    is there a way to read out or dial in a "brightness value" (maybe trough a script?)
    does anyone know about an external tool that could help me (without interfering the ICCs)
    THX a lot,
    TIM

    1. This is a user to user forum. To send Apple your requests, use the Apple - Mac OS X - Feedback link.
    2. The brightness slider sets an electrical level for screen brightness, but the actual brightness depends on the age of the screen & other components, previous brightness level, manufacturing variations, etc. For this reason, even if you set the level to the same indicated value each time, this does not guarantee the actual brightness will remain the same, nor can you calibrate indicated values directly in cd/sqm over long periods of time. You will still periodically have to use the calibrator.
    3. You can use an Applescript to set the electrical level to a repeatable numeric value (although because of #2 above, this will not guarantee a repeatable actual screen brightness). See Any ideas on adjusting monitor brightness via AppleScript? for a suggested script. Note that you will need to change "Color LCD" in that script to whatever name your System Preferences > Displays > Display tab shows & change "0.8" to whatever brightness level you want (with 0 being darkest & 1 being brightest). You must also have GUI scripting enabled.
    A more elaborate version of the script could save the current value for later recall or set different levels for different apps. For help with this, post in the AppleScript forum.

  • Left keyboard issues with windows 8.1 (numeric keys)

    hi, OK so i download windows 8.1 (which i hate) and ever since then my numeric keypad has not been working, its like computer became a freaking tablet. i try pressing the num lock button to see if it will come back on and it don't. it only worked once while i was on windows 8.1  and after i restarted my computer because of some update it had to do, the thing wont work. please help thanks

    Hello @DavePro,
    Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
    I have read your post on how you are looking to disable / limit the new tile screen in favor of the start menu. When you are referring to "miniatures", are you talking about the apps on the tile screen? Has your mother's laptop installed the most recent important Windows updates?
    In regards to minimizing the "Metro" UI on your Windows 8.1 computer, I recommend taking a look at this document on How to keep the Windows 8.1 Modern UI out of your way. This should help to utilize the desktop more than the tile menu on your mother's computer.
    Please re-post with the results of your troubleshooting, as well as the requested information above. I look forward to your reply!
    Regards
    MechPilot
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks” for helping!

  • Issue with Supplier site descriptive flex field upgrade from 11i to R12

    We ran into some issue when upgrade Supplier site descriptive flex field from 11i to R12.
    In 11i. we defined descriptive field on JG_PO_VENDOR_SITES. in the segment definition, we defined one of the attributes default value based on Form Field Value, and the statement is like this:
    SELECT decode(:SITE.COUNTRY,'IT','AP ITALIAN TRANSACTIONS','AP AUTOFATTURA') FROM dual
    All above worked fine in 11i, whenever the flexfield field is open in forms, the default valuse shows based on the real-time value in :SITE.COUNTRY.
    In R12, Supplier site management is in HTML format. There is no forms, which means no form value. Do you have an alternative soluction for implement the same logic in R12?
    Thank you and regards,
    Kate
    Edited by: user12100435 on Feb 12, 2013 9:06 AM

    Kate,
    Have you logged a SR and see if Oracle support can help?
    Thanks,
    Hussein

  • Issue with fill in the blank field and back button.

    I am working in CP4 AS2.  I have create a page of fill in the blank fields to simulate filling in a form.  On the next slide, I show the answers by extracting the variables into text boxes.  I have a back and a next button and instruct the user to review their answers and if incorrect, to select the back button in order to reenter the data.  I have the back button set to jump to the previous slide by number (i've tried previous, last slide, etc...)
    The flash movie freezes when I select the back button.  I think flash is having trouble going back to the fill in the blank fields from the displayed variables.  Any ideas? or work arounds for this.  The idea solution would take them back to the page with the data already in the fields so they could correct the errors only and then return to the review page.
    Thanks
    Scott

    Hi there
    Is scoring enabled on these? If so, perhaps your quiz settings are preventing backward movement.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • SQL Loader issue - With junk charters in Last field

    Hi
    I have a data file to load .
    I used a CTL and The Load is running fine.
    But the last record comes with some kind of junk character when loaded into the table.
    I checked if the file is in moved in binary mode or trying TRIM commands or replacing it int he code.
    I tried replacing ^M and chr(10) but of no use.
    can you please asssit men in this.. We have a go live soon

    Pl post your exact OS and database versions, along with your complete sqlldr command, the table description and a sample of your input csv file.
    See if the CONTINUEIF clause can help
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16536/ldr_control_file.htm#i1005509
    HTH
    Srini

  • Issue with AutoSuggest + UpdateContent

    Hi,
    Using Spry.Utils.updateContent when I load part of a page
    containing an AutoSuggest the AutoSuggest breaks.
    Seems like the XML datasource is not fired in that case. If I
    put the AutoSuggest code out of the destination DIV it works.
    Click here to see what I
    mean
    I'm using v1.5. Any clue ? Thanks.

    I don't understand the actual results desired. But I would
    make my cffunction returntype a string and get rid of the cfloop
    that creates your array. One of my autosuggest cfcs is;
    <cffunction name="getJobsearch" access="remote"
    returnType="string" output="false">
    <cfargument name="term" type="string"
    required="false">
    <cfset var Jqry = "">
    <cfquery name="Jqry" datasource="taxsearchdb">
    SELECT J.CompanyName + ' ' + J.CompanyCity + ' ' + C.State +
    ' ^' + cast(J.JobOrderNumber as varchar) as Jname
    FROM jorder J, Companies C
    WHERE J.CompanyNumber = C.CompanyRecordNumber and
    J.CompanyName LIKE <cfqueryparam cfsqltype="cf_sql_var"
    value="#trim(arguments.term)#%">
    </cfquery>
    <cfreturn ValueList(Jqry.Jname)>
    </cffunction>

  • PROBLEM: Text in numeric field

    Hi =)
    ..I'm having a problem with some (not all) numeric fields in a form.
    In the troubled ones I can type letters in them. When I exit the field it's displayed an error message and the field is cleared.
    How can I make the field accept only numeric characters when typing?
    I just don't understand what I changed to make this happen..
    If someone has a clue, please tell me something.
    Thank you =)

    Usually as long as your TextField is a NumericField Type in the object field properties, only numeric characters can be entered...
    if you can type in letters and the object type property is still NumericField, you probably should delete the object and recreate it...
    Otherwise, if the object type property is not a NumericField, change it to NumericField...
    If non of these options is your solution, try changing the validation pattern...
    Hope this help!

  • Why is a time/attendance form with many numeric fields slow to fill out?

    A form created in LiveCycle 9 and saved as PDF has a table with many numeric fields to fill in number of hours under days of the week and type of activity. The bottom row of the table has total numeric foelds that calculate the total hours. I tried removing the totals thinking that it would speed up filling in the document but it didn't. Is there some limit to the number of fioelds a documents can have without slowing it down? What can be done to speed it up?

    I have this issue as well. I created an expense tracking form using the Acrobat X basic calculation tool (not javascripts) and it takes 10 - 15 seconds to move to the next field on an iPad or Android device. On my PC it works great. HELP!
    I also tried using a trial version of Acrobat XI with the same result.

Maybe you are looking for

  • HT1918 How do I remove my credit card from my account?

    I've been trying to remove my card from my account but I can't seem to do it. Can anyone help me?

  • Changing the Attachment List of Generic Object Services (GOS)

    Dear Experts, i want to add columns to the attachment list of GOS depending of the given objecttype. The data to be displayed is from a customer-append of different TOAXY-tables. I want to use the functionality of the standard attachmentlist, but the

  • Still more Dropped Frames during playback

    i imported an iMovie project into FCE HD. I rendered several minutes of video, including several edits from the iMovie project. none of the windows overlap. i have Safe RT, low quality, 2 audio tracks, etc. etc. i.e. all the lowest, least demanding s

  • Computer sudden'y won't "see" digital camera.

    Here's what happened: I uploaded a whole bunch of photos that had been on my camera for about a month. Immediately took two more pictures, but when I attempted to upload - was told that they were ".jpg" and couldn't be uploaded. Now iPhoto doesn't kn

  • Why doesn't the Crop tool allow me to reverse the mouse axis?

    Dearest Adobe, When using the crop tool every axis is backwards! I know I'm supposed to move the photo, not the crop window, But for me this is not a matter of "correct" or "best practice", some people's brains do not work this way. I have been using