Having a problem using Workflow to update a field based on ZIP code

I created a Workflow to update a Yes/No picklist called eligibility based on a Text (Short) field called Applicant ZIP code.
It's set to update on the Opportunity page:
Before modified record saved
And the value function is:
IIf(InStr("60601_60602",[<stApplicant_Zip_Code_ITAG>|http://forums.oracle.com/forums/]+)>0,"Yes","No")+
That was a guess of how to try it while relying on my limited MS SQL & Access knowledge.
It does work correctly using what I did. The problem I have is that I actually need to choose from over 600 ZIP codes. The function window only allows for 256 characters. (And I suspect my way is fairly inelegant for search a multi-thousand character string.)
Any suggestions?

I created a Workflow to update a Yes/No picklist called eligibility based on a Text (Short) field called Applicant ZIP code.
It's set to update on the Opportunity page:
Before modified record saved
And the value function is:
IIf(InStr("60601_60602",[<stApplicant_Zip_Code_ITAG>|http://forums.oracle.com/forums/]+)>0,"Yes","No")+
That was a guess of how to try it while relying on my limited MS SQL & Access knowledge.
It does work correctly using what I did. The problem I have is that I actually need to choose from over 600 ZIP codes. The function window only allows for 256 characters. (And I suspect my way is fairly inelegant for search a multi-thousand character string.)
Any suggestions?

Similar Messages

  • Using AJAX to load city, state, metro area based on zip code

    I'm new to getting APEX to work with AJAX properly. I've been reading some tutorials and trying to apply what they do to my situation, but I'm running into a problem. I have a text field item for zip code. What I want to happen is that when someone enters in a zip code, I want to use AJAX to populate 3 different select lists (1 each for state, city, and metro area) and to populate a checkbox (of neighborhoods based on the zip code as well). I'm looking at the examples in:
    http://www.oraclealchemist.com/wp-content/uploads/2006/11/s281946.pdf
    and
    http://apex.oracle.com/pls/otn/f?p=11933:63
    But they all use examples where the value of a text field item is used to populate 1 select list. I can't figure out how to apply that methodology to populate 3 select lists and 1 checkbox item. I've got all my SELECT statements written to populate these fields based on the value of the zip code text field item, but don't know how to convert what I already have to use AJAX.
    Here are my SELECT statements:
    P2805_STATE lov:
    ===========================================================================================
    SELECT INITCAP(GEO_DATA_STATE.STATEFULLNAME) d,GEO_DATA_STATE.STATE v
    FROM GEO_DATA_STATE, GEO_DATA_ZIP
    WHERE isPrimary = 'P' and
    trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
    GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
    ORDER BY STATEFULLNAME
    P2805_CITY lov:
    ===========================================================================================
    SELECT UNIQUE (INITCAP(GEO_DATA_CITY.CITY)) d,GEO_DATA_CITY.CITY v
    FROM GEO_DATA_STATE, GEO_DATA_ZIP, GEO_DATA_CITY
    WHERE
    trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
    trim(upper(GEO_DATA_ZIP.CITY)) = trim(upper(GEO_DATA_CITY.CITY)) and
    GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
    ORDER BY GEO_DATA_CITY.CITY
    P2805_METRO_AREA lov:
    ===========================================================================================
    SELECT UNIQUE (INITCAP(GEO_DATA_METRO.METRO_AREA)) d,GEO_DATA_METRO.CODE v
    FROM GEO_DATA_STATE, GEO_DATA_ZIP, GEO_DATA_METRO
    WHERE
    trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
    trim(upper(GEO_DATA_ZIP.METROCODE)) = trim(upper(GEO_DATA_METRO.CODE)) and
    GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
    ORDER BY 1
    P2805_NEIGHBORHOOD lov:
    ===========================================================================================
    SELECT UNIQUE (INITCAP(GEO_DATA_HOOD.HOOD)) d,GEO_DATA_HOOD.HOOD v
    FROM GEO_DATA_STATE, GEO_DATA_ZIP, GEO_DATA_METRO, GEO_DATA_HOOD
    WHERE
    trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
    trim(upper(GEO_DATA_ZIP.METROCODE)) = trim(upper(GEO_DATA_METRO.CODE)) and
    GEO_DATA_HOOD.METRO_CODE = GEO_DATA_METRO.CODE and
    GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
    ORDER BY 1Do all these statements need to go in 1 on-demand process? Where do I go from here?

    Andy, cool. This is starting to make more sense. THANKS A BUNCH! OK. I've gone ahead and modified the on demand process to suit my needs, so I have:
    begin
      owa_util.mime_header('text/xml', FALSE );
      htp.p('Cache-Control: no-cache');
      htp.p('Pragma: no-cache');
      owa_util.http_header_close;
      -- Building States list
      htp.prn('<SELECT>');
      FOR i in (
        SELECT INITCAP(GEO_DATA_STATE.STATEFULLNAME) d, GEO_DATA_STATE.STATE v
        FROM GEO_DATA_STATE, GEO_DATA_ZIP
        WHERE isPrimary = 'P' and
        trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
        GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
        ORDER BY STATEFULLNAME
      LOOP
        htp.prn('<OPTION VALUE=''' || i.v || '''>' || i.d || '</OPTION>');
      END LOOP;
      htp.prn('</SELECT>');
      -- Building Cities list
      htp.prn('<SELECT>');
      FOR i in (
        SELECT UNIQUE (INITCAP(GEO_DATA_CITY.CITY)) d, GEO_DATA_CITY.CITY v
        FROM GEO_DATA_STATE, GEO_DATA_ZIP, GEO_DATA_CITY
        WHERE
        trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
        trim(upper(GEO_DATA_ZIP.CITY)) = trim(upper(GEO_DATA_CITY.CITY)) and
        GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
        ORDER BY GEO_DATA_CITY.CITY
      LOOP
        htp.prn('<OPTION VALUE=''' || i.v || '''>' || i.d || '</OPTION>');
      END LOOP;
      htp.prn('</SELECT>');
      -- Building Metro Area list
      htp.prn('<SELECT>');
      FOR i in (
        SELECT UNIQUE (INITCAP(GEO_DATA_METRO.METRO_AREA)) d, GEO_DATA_METRO.CODE v
        FROM GEO_DATA_STATE, GEO_DATA_ZIP, GEO_DATA_METRO
        WHERE
        trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
        trim(upper(GEO_DATA_ZIP.METROCODE)) = trim(upper(GEO_DATA_METRO.CODE)) and
        GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
        ORDER BY 1
      LOOP
        htp.prn('<OPTION VALUE=''' || i.v || '''>' || i.d || '</OPTION>');
      END LOOP;
      htp.prn('</SELECT>');
      -- Building Neighborhood list
      htp.prn('<SELECT>');
      FOR i in (
        SELECT UNIQUE (INITCAP(GEO_DATA_HOOD.HOOD)) d, GEO_DATA_HOOD.HOOD v
        FROM GEO_DATA_STATE, GEO_DATA_ZIP, GEO_DATA_METRO, GEO_DATA_HOOD
        WHERE
        trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
        trim(upper(GEO_DATA_ZIP.METROCODE)) = trim(upper(GEO_DATA_METRO.CODE)) and
        GEO_DATA_HOOD.METRO_CODE = GEO_DATA_METRO.CODE and
        GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
        ORDER BY 1
      LOOP
        htp.prn('<OPTION VALUE=''' || i.v || '''>' || i.d || '</OPTION>');
      END LOOP;
      htp.prn('</SELECT>');
    end;It doesn't look like I would have to modify the appendToSelect function at all, correct? Is the checkbox that I need to populate handled the same way as these select lists? And it seems like I only need to make the 2 changes that you mentioned to get_AJAX_SELECT_XML function, right? So my javascript function should be like:
    <script language="JavaScript1.1" type="text/javascript">
    function get_AJAX_SELECT_XML(pThis,pSelect1,pSelect2,pSelect3,pSelect4){
    if  (document.getElementById('P2805_ZIPCODE').value.length == 5)
         var l_Return = null;
         var l_Select1 = $x(pSelect1);
         var l_Select2 = $x(pSelect2);
         var l_Select3 = $x(pSelect3);
         var l_Select4 = $x(pSelect4);
         var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=otn_Select_XML',0);
         get.add('TEMPORARY_ITEM',pThis.value);
         gReturn = get.get('XML');
         var sels = gReturn.getElementsByTagName("select");
         if(gReturn && l_Select1){
              var l_Count = sels[0].getElementsByTagName("option").length;
              l_Select1.length = 0;
              for(var i=0;i<l_Count;i++){
                   var l_Opt_Xml = sels[0].getElementsByTagName("option");
                   appendToSelect(l_Select1, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue)
         if(gReturn && l_Select2){
              var l_Count = sels[1].getElementsByTagName("option").length;
              l_Select2.length = 0;
              for(var i=0;i<l_Count;i++){
                   var l_Opt_Xml = sels[1].getElementsByTagName("option")[i];
                   appendToSelect(l_Select2, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue)
         if(gReturn && l_Select3){
              var l_Count = sels[2].getElementsByTagName("option").length;
              l_Select3.length = 0;
              for(var i=0;i<l_Count;i++){
                   var l_Opt_Xml = sels[2].getElementsByTagName("option")[i];
                   appendToSelect(l_Select3, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue)
         if(gReturn && l_Select4){
              var l_Count = sels[3].getElementsByTagName("option").length;
              l_Select4.length = 0;
              for(var i=0;i<l_Count;i++){
                   var l_Opt_Xml = sels[3].getElementsByTagName("option")[i];
                   appendToSelect(l_Select4, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue)
         get = null;
    &lt;/script&gt;
    And then since all 4 items (3 select lists and 1 checkbox item) are populated based on the value inputted in the text field item, I would only need to add the following to the html form element attribute of my text field item, right?
    onKeyUp="javascript:get_AJAX_SELECT_XML(this,'P2805_STATE','P2805_CITY','P2805_METRO_AREA','P2805_NEIGHBORHOOD');"Denes, thanks for the example. It seems like what I need to do is somewhere inbetween what you have and what's in the example on http://apex.oracle.com/pls/otn/f?p=11933:37. I have 3 select lists and 1 checkbox item that should all be populate depending on the value entered for the text item. Do I still need to split everything up then into a function and an on demand process for each select list and checkbox?

  • Good Morning.  I'm having a problem using both my Photoshop elements and premiere programs.  I've installed the programs, redeemed my code and entered the serial numbers, and created the adobe log-in.  I am able to open up the organizer without problems,

    Good Morning.  I'm having a problem using both my Photoshop elements and premiere programs.  I've installed the programs, redeemed my code and entered the serial numbers, and created the adobe log-in.  I am able to open up the organizer without problems, but when I try to open up the photo editor (either by trying to open up the program from the main menu, or right-clicking on a photo in the organizer to edit in elements), the program asks me to sign in to adobe (which I can do and it doesn't give an an "incorrect password" or log-in ID error) then accept the terms and conditions.  When I click to accept the terms and conditions, nothing happens and the editor fails to open.  Everytime I click on the program, I get this same "loop" of signing in and accepting T&C's, but the program fails to open.  Any advice?

      Premiere Elements 10 is now 64 bit, but not PSE10.
    Take a look at your scratch disk set-up and if you have a spare volume, allocate that first before the C drive. Elements use scratch disks when it gets low on RAM.
    Click image to enlarge
    Turn off face recognition and the auto-analyzer to improve performance.
    When editing photos or videos check the task manager to see what background processes may be running and end them temporarily if not needed.

  • I am having a problem using the help menu in Adobe elements 5

    I am having a problem using the help menu in Adobe elements number five.
    When I open the help menu, the dialogue box defaults to an unreadable display font. Is there any way to change that default font? Using the help menus to find a solution is not possible for I cannot read what it is displaying.

    For product, there is an option in preferences where we can set fonts. There are two options: One is application font and other is system font. I am talking about elements 8 which I have but not sure that will solve your problem which is help related.
    Hope Help in 5th version is html which opens in Browser? Please confirm.

  • I am having a problem using Acrobat Pro in trying to merge documents.

    I am having a problem using Acrobat Pro to merge documents.   I can still use other functions withing Acrobat Pro.  Help - I have a deadline to meet!

    For product, there is an option in preferences where we can set fonts. There are two options: One is application font and other is system font. I am talking about elements 8 which I have but not sure that will solve your problem which is help related.
    Hope Help in 5th version is html which opens in Browser? Please confirm.

  • Hello i am having a problem in my 4s that it dosent run any USSD code it goes on calling , can any one help me i am mack from Karachi Pakistan

    Hello i am having a problem in my 4s that it dosent run any USSD code it goes on calling , can any one help me i am maqsood  from Karachi Pakistan

    Ok so I've done what you said and this is what it's come back ....
    I don't know that these are the errors , but they're the things which don't look right ...
    Throughout the shut down there is a recurring line ;
    It says ;
    Com.apple.launchd 1 0x100600e70.anonymous.unmount 301 PID still valid
    Then there are 2 more which I think are related ;
    Com.apple.securityd 29 PID job has I overstayed its welcome , forcing removal.
    Then the same with fseventd 48 and diskarbitrationd 13
    Oh and on Launchd1 : System : stray anonymous job at shut down : PID 301 PPID13 PGID 13 unmount...
    Then the last process says "about to call: reboot (RB_AUTOBOOT).
    Continuing...
    And stops ...
    Hope this means something to you ... Thanks again for your help so far :-)

  • I am having major problems with the latest update for my itunes!

    I am having problems with the latest update for itunes, it says 'itunes has an invalid signature'. I have completely uninstalled itunes but now it wont download at all. Have tried downloading it 4 times tonight already. Anyone know how to get it to download? Or what to do?

    I am having problems with the latest update for itunes, it says 'itunes has an invalid signature'.
    That suggests that the installer is getting damaged during the download.
    I'd first try downloading an installer from the Apple website using a different web browser:
    http://www.apple.com/itunes/download/
    If you use Firefox instead of IE for the download (or vice versa), do you get a working installer?

  • Problem using workflow with ess leave requests

    Hello, I have been experiencing some problems using wf for approval with leave request in ess.
    I customized ws12300111 for request approval and it is working fine. But when we try to cancel a request in ess, there are strange things happening:
    - If the request is in status sent: the workflow gets in error.
    - If the request is already in db: it starts a new workflow (ws12300111).
    We don't want this because we have customized ws12300111 only for new requests. I have tried to customize absences in SPRO so that onlu new requests start the WS12300111, Onlu new requests have the workflow field filled with 12300111, but even like that, the WS12300111 starts whenever that is a cancelling or modification of a request.
    I have also tried using a different workflow for canceliing (WS12400007), but in this case there is an error in ess when we try to submit.
    This is really annoying, I have tried everything...

    Hello,
    "If the request is in status sent: the workflow gets in error."
    Please always say what the error is.
    " If the request is already in db: it starts a new workflow (ws12300111"
    You first have to find out how this is done. Look in SWEL, it's probably via some sort of CHANGED event.
    regards
    Rick Bakker
    hanabi technology

  • In a JSP having a problem using out.println in method

    I am trying to update a field on a form using JAVASCRIPT generated by JSP. The following code works fine when in the main body of the code.
    The field tota on form mainform is updated based on the contents of strTest.
    out.println("<SCRIPT LANGUAGE='JavaScript'>")
    out.println("document.mainform.tota.value = " + strTest);
    out.println("document.mainform.tota.focus()");
    out.println("</SCRIPT>");
    But if you have 10 flds that you want updated, it would be nice NOT to have to use 40 lines of code to do it. I am trying to build a method that will accept a field name and some data to put in a form field. I started small and just wanted to update 1 fld using the method below:
    <%!
    //Declare method to update form fields
    void Update_Frm_Fld()
    out.println("<SCRIPT LANGUAGE='JavaScript'>")
    out.println("document.mainform.tota.value = " + strTest);
    out.println("document.mainform.tota.focus()");
    out.println("</SCRIPT>");
    %>
    I keep getting the error:
    Time_Entry_jsp.java:21: cannot resolve symbol
    symbol : variable out
    location: class org.apache.jsp.Time_Entry_jsp
    out.println("");
    ^
    Help.....

    try this:
    <%@ page import="java.io.*" %>
    <%!
    //Declare method to update form fields
    public void Update_Frm_Fld(HttpServletResponse response)
         throws ServletException, IOException{
              PrintWriter out=response.getWriter();
              out.println("<SCRIPT LANGUAGE='JavaScript'>");
              out.println("document.mainform.tota.value = "+1);
              out.println("document.mainform.tota.focus()");
              out.println("</SCRIPT>");
    %>and when you call the function use this:
    <%Update(response);%>

  • Anyone having this problem after the IOS5 update?

    I uploaded the new software into our 4 iphone 4's. Two of them have no problem and are working fine. The other 2 keep searching for signal. They will show 4-5 bars and all of a sudden say "searching" for about 7-8 seconds, then show the bars again. We have tried restaring the phones several times and nothing. Our carrier is AT&T. Anyone else having this problem?

    I uploaded the new software into our 4 iphone 4's. Two of them have no problem and are working fine. The other 2 keep searching for signal. They will show 4-5 bars and all of a sudden say "searching" for about 7-8 seconds, then show the bars again. We have tried restaring the phones several times and nothing. Our carrier is AT&T. Anyone else having this problem?

  • Error using Bapi_PO_Change for update custom fields

    Dear Expert,
    I have requirement for update custom field in table ekko. I used BAPI_PO_CHANGE with PO_number as a key. Then i put the value of custom field in segment TABLES - EXTENSIONIN.
    But I get error : "ERROR TRANSFERING EXTENSIONIN DATA FOR ENHANCEMENT CI_EKKODB".
    When I checked, I found the difference between data type the value for BAPI_PO_CHANGE (Usinf structure BAPIPAREX) and data type for custom field in table EKKO.
    Data Type in BAPI_PO_CHANGE is CHAR (you can see in structure BAPIPAREX). And data type for the custom field is DECIMAL.
    I found the note '1124803', but the correction note was not applicable for us because our released system is 500.
    Is there any suggestion or solution for resolve our problem?
    Really appreciate your help.
    Thanks.

    Hi Laxmikanth Bethi ,
    I tried with BAPI_PO_CHANGE in level header, and SAP was support the BAPI. And also i tried to appending the same fields in MEPOHEADR & MEPOHEADERX structures, but the problem is the type of my custom fields are DECIMAL, then the type MEPOHEADR & MEPOHEADERX structures are CHARACTER. So i got the error :  "ERROR TRANSFERING EXTENSIONIN DATA FOR ENHANCEMENT CI_EKKODB".
    Because the types are difference.
    Have you any suggestion to solve this problem?
    Really appreciate for your input.

  • SC Workflow not updating standard field

    Hi,
    I am using SRM 5.0 .After approval of SC which have multiple item not updating standard field of source_ind to all the line items .
    It's getting updated in only first line item .
    Recent Package : SAP_ABA SAPKA70011
    Thanks ,
    Sachin

    Hi,
    DO you mean to tell that after the shopping cart is approved , only the first item is send to the sourcing cockpit?
    ANd the other items of the shopping cart are not send to the sourcing cockpit?
    Can you please compare the category for the two lines? is it the same?
    can you check wether the category mentioned for the second line has got category which has been configured for sourcing cockpit?

  • Timebased workflow to update Status field

    Hi,
    Our requirement is to set status to 'Closed' after 15 days of opening an SR. Please let me know if any of you addressed similar requirement.
    Thanks in advance!
    m

    A new feature in R18 allows you to update a field through Workflow after waiting for a certain period I guess that should help you
    Regards,
    Deepak

  • Anyone else having this problem after 4.0 update?

    I just updated my Ipod Touch to the latest version, 4.0 software, as I'm sure most of you have.
    I'm wondering if anyone else is having an issue with the battery draining very very quickly? I have changed nothing on my Itouch, except for the update. All my push notifications are off and I have double checked that. I haven't downloaded any new apps, still using the same ones I always use. My internet connection is still the same as I have checked that too.
    My battery is running down so quickly without using any apps that I have had to charge it twice in the last 8 or so hours. Where as before the update, I used to charge is either once a day or everyone few days, depending on what I did with it.
    So if anyone else is experiencing this, please let me know. Or if you know how to fix this problem I would appreciate some advice on that too!

    I am having this same exact issue with my 2nd generation touch. I saw on some other topics that having wifi on all the time is the problem. I tried turning it off, but it didn't help. You could try that though and see if it helps. But on my iPod, even in Airplane Mode, it drains the battery like a Hummer wastes gas. Incidentally, if turning off wifi works for you, great! Except to me that pretty much defeats the whole purpose of having a touch. Might as well have a nano or Classic. Having to turn of wifi each time you want to check email or use an app that requires wifi is silly. wifi should simply go off when you put the iPod to sleep. But here's the thing. Even with the old version of the software, I could listen to Pandora for 3-4 hours a day (of course requires wifi) and I wouldn't need to charge the iPod but once every couple of days. Now, I can't go 8 hours without the thing draining to 20% warning. To me that says that something else is running the background and that wifi isn't the only problem.

  • Having extreme problems using the new iMac, adobe CS5 (in particular InDesign) and OSX 10.8.2 (and now also 10.8.3) Mountain Lion

    Is anyone else experiencing the same thing? My computer is 2 months old and has hardly any files stored on it. Also, my
    Graphics  NVIDIA GeForce GT 650M 512 MB and my memory is 16 GB 1600 MHz DDR3.
    I am only running one thing on the computer as we speak - making a small pattern in InDesign - yet is has been frozen for over 20 mins, and that's not the first time this has happened.
    I updated to the latest Mountain lion this morning (10.8.3) and its exactly the same.
    I dont understand why this is happening, but on the older iMac i could run several windows of the entire creative suite without a problem - i was also using Snow Leopard.
    please help!

    noellia wrote:
    Is anyone else experiencing the same thing? My computer is 2 months old and has hardly any files stored on it. Also, my
    Graphics  NVIDIA GeForce GT 650M 512 MB and my memory is 16 GB 1600 MHz DDR3.
    I am only running one thing on the computer as we speak - making a small pattern in InDesign - yet is has been frozen for over 20 mins, and that's not the first time this has happened.
    I updated to the latest Mountain lion this morning (10.8.3) and its exactly the same.
    I dont understand why this is happening, but on the older iMac i could run several windows of the entire creative suite without a problem - i was also using Snow Leopard.
    please help!
    Do you have any Security/Anti-Virus software installed? Mackeeper? Any Third Party programs you have installed recently?
    Pete

Maybe you are looking for