[SOLVED]:Is it possible to use functions like decode in 'setWhereClause()'?

Hello,
My requirement is that I have 2 poplists - Country and States.
When I select a country,the corresponding states of that country should get populated in the states poplist.
The approach I took is that :
I selected firePartialAction as ActionType in Country poplist. Then I called a function to VOImpl of StatesVO and set the where clause there.
Now I was thinking about using decode as there is no direct connection between the CountryVO and StatesVO.
Is it possible to use functions like decode in 'setWhereClause()'?
For Example:
setWhereClause("DECODE(LOOKUP_TYPE,'XXC_IND_STATES','IND','XXC_US_STATES','US') = :1");
setWhereClauseParam(0,Country);
executeQuery();
When I tried running the page,no error was given but when the country poplist was changed - there is no change in states poplist.
If its not possible to use decode in setWhereClause(), could you please guide me as to how I can write a query to retrieve a value from a table and store it in a variable 'A'- so that I can pass that variable 'A' in setWhereClauseParam function .
Message was edited by:
Anju Susan

That kewl, but for u knowledge u can add anything in ur where clause of query through ur code in Voimpl class. It is even possible to do change entire query, see Voimpl class methods in javadoc.
--Mukul                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • HT5527 Is it possible to use iCloud like Dropbox?

    I have loads of storage on iCloud, but the use seems limited?
    Is it possible to use iCloud like Dropbox, or the erstwhile MobileMe, to store Microsoft Office documents, photos et al for genernal access over the internet?
    Thank you

    Welcome to Apple Support Communities
    iCloud isn't like Dropbox. However, you can store iCloud-compatible app documents on iCloud, so in that case, you can use it like Dropbox, but you will need that app to access to your files.
    If you want iCloud to store files, use another service like Dropbox or SkyDrive. They are better for that purpose. iCloud is focused on data sync between iPhones, iPads, iPods touch, Macs and PCs

  • Is it possible to use Arch like a source-based distro?

    I installed Gentoo on a spare box recently, and rather liked the idea of a source-based distribution. It's nice to think that the natively compiled code is optimized for my processor, even though even many Gentooists admit that the practical performance gains are minimal. However, Gentoo is less KISS-oriented and less bleeding edge than Arch, and I love Arch too much to switch anyway. I was wondering if one could recompile an entire Arch system using processor-specific optimizations like Gentoo, and maybe even have some equivalent of Gentoo USE flags? I can't manually recompile every package, and then do it again every time there's an upgrade - that would be too tedious. So, is there some automated method - to essentially use Arch like a source-based distribution? Can ABS help, or maybe a community-contributed tool? And finally, for a source-based and yet Arch-like distribution, what do you guys think of CRUX? Given that their documentation and community is much smaller than ours, is it very bothersome to install and maintain a desktop system using CRUX?

    Xyne wrote:
    Rebuild everything from source:
    bauerbill --build-all -S $(pacman -Qq)
    Build all available upgrade from source, including dependencies:
    bauerbill --build-all -Syu
    Install new package by building from source, including dependencies:
    bauerbill --build-all -S <pkgname>
    Bauerbill also provides an "AutoPatch" option that enables you automatically apply patches to PKGBUILDs and install files when building from source so you only have to edit a PKGBUILD once.
    *edit*
    Of course, you could simply enable "BuildAll" in the configuration file and skip the flag.
    @Xyne
    So bauerbill will build all the deps for packages from source too [dependency resolution] and build from source packages from groups [ex. xorg, gnome, kde, xfce4, etc]?? I'm having a hell of a time with pacbuilder as it's not as functional as I had hoped, so I am thinking of using bauerbill, if it does what I need or is actually functional as pacbuilder but more functional [deps, patching, etc] then i'll use it exclusively! Thanks for any help.
    Last edited by Chaniyth (2010-08-19 02:49:14)

  • Is it possible to use format like X12 in PI 7.0 ?

    I would like to know, does PI 7.0 supports ebXML (Electronic Business using eXtensible Markup Language) and X12 EDI?

    Hi Sonal,
    you can use third party adapter like (Seeburger EDI adapter) for ANSI X12 conversions (it's sold through SAP service marketplace).
    For EbXML you need also third party communication adapter (if you choose Seeburger it's sold directly from the company).
    See link below:
    http://www.seeburger.com/ebxml-adapter/
    Regards
    Naycho

  • Is it possible to use music like ringtone for iphone 5?

    How can I put music as ringtone?
    Help me

    You have to trim a song to 40 sec or less. (Right click on a song>get info>options>set start and stop time).
    Then right click again and click on Creata AAC version.
    Find the new file (right click>show in finder/explorer) and rename the extension to m4r.
    Drug the new file to iTunes Tones section (left pane of iTunes)
    Sync your iPhone.
    Try google for detail directions

  • [SOLVED] is it possible to use Super by itself as the prefix key?

    Hi, just got through my first arch installation and I'm setting up StumpWM. I've been trying to set the super key as the sole prefix key, without success so far.
    edit: this is what I've tried:
    //in shell
    xmodmap -e 'keycode 133 = F20'
    //in stumpwm eval mode
    (stumpwm:set-prefix-key (stumpwm:kbd "F20"))
    it seems to accept the commands but doesn't want to go into prefix mode, and xev confirms that the super key is returning F20. What am I doing wrong?
    edit2: stupid, stupid me, I forgot to clear Super_L from mod4, which seemed to conflict with the F20 binding. It works!
    Last edited by spotty (2010-06-07 15:52:34)

    There have been a few threads about this, and its also covered in the wiki.
    Please search both the forum and the wiki before posting.

  • Function like decode ??

    How write a function similar to decode which takes variables arguments?
    My need is I need to get a concatanated string seperated by a separator indepedent of how many arguments I pass in to a function. How can I do that?
    Any help/pointers is highly appreciated?

    Thank you Richard.
    But to you the orignial decode function is written like your delimit function ? (just curious). If you know javascript, that a function can be written in a way that it can many parameter without defining those slots in the function parameters. Is this possible with PL/SQL too? It would be great if it can.
    Thank you again Richard, your solution you should be enough for me now.
    I'm pretty sure it's impossible to do true variable parameter lists in PL/SQL. However, you can use defaults to create a comparable effect...
    create or replace function delimit (
    delimiter varchar2,
    s1 varchar2,
    s2 varchar2 := null,
    s3 varchar2 := null,
    s4 varchar2 := null,
    s5 varchar2 := null,
    s6 varchar2 := null)
    return varchar2 is
    s varchar2(32767) := s1;
    begin
    if s2 is not null then s := s || delimiter || s2; end if;
    if s3 is not null then s := s || delimiter || s3; end if;
    if s4 is not null then s := s || delimiter || s4; end if;
    if s5 is not null then s := s || delimiter || s5; end if;
    if s6 is not null then s := s || delimiter || s6; end if;
    return s;
    end;
    /Now you can call this function with anywhere from 1 to 6 strings...
    DELIMIT('','HELLO','WORLD')
    Hello World
    DELIMIT('','HELLO',NULL,'WORLD')
    Hello World
    DELIMIT(',','RED','BLUE','YELLOW','ORANGE','GREEN')
    red,blue,yellow,orange,green
    DELIMIT('->','RED','BLUE','YELLOW','ORANGE','GREEN')
    red -> blue -> yellow -> orange -> greenJust add as many arguments as you'd like for the maximum (I think 255 is the limit in PL/SQL). Alternatively, you could pass in a table of strings as one argument and iterate through them.
    Richard

  • Using function on decode or case in query

    Hi experts
    I am using oracle 11G database,I have to check length of name column value from employee table and if length(name) > 39 then value should be substr(name,0,39)
    else value should be name only.
    i tried below code
    select CASE when length(name) > 39,substr(name,0,39)
                else name
           END
      from employee but its not working ..can I do this using decode too ? ,,which one would be better or this is not a right way ?
    Thanks

    Hi,
    siebelD wrote:
    Hi experts
    I am using oracle 11G database,I have to check length of name column value from employee table and if length(name) > 39 then value should be substr(name,0,39)
    else value should be name only.
    i tried below code
    select CASE when length(name) > 39,substr(name,0,39)
    else name
    END
    from employee but its not working ..Review the syntax of the CASE expression in the SQL Language manual. A CASE expression always has at least one THEN clause. Commas are not part of the CASE expression syntax.
    can I do this using decode too ? Sure, anything you can do with CASE you can also do with DECODE.
    ,,which one would be betterThis is one of the many situations where CASE is much shorter, clearer and more efficient than DECODE.
    or this is not a right way ?How about
    SELECT  SUBSTR (name, 1, 39)  AS employee_name
    FROM    employee;?
    If name is 39 characters (or less), then <tt> SUBSTR (name, 1, 39) </tt> will return it, unchanged.
    Edited by: Frank Kulash on Mar 3, 2013 2:07 PM

  • Use functions in parameters?

    Hi,
    is it possible to use functions in a parameter?
    We use a parameter for a field from an Oracle database - the values in this field are stored as "Employee ID - Employee Name"; however, we only would like to see the name, not the id in the parameter field list (and filter). We also have to apply the URLDecode function since we have special characters in the employee names.
    Thanks!

    Hi Dear,
                 Actually you can't directly apply function on Parameters but if u have restriction by the prameter
                 then you can apply formula in select expert on that pamaters...
    Regards
    Obaid

  • How to use function inside background job?

    I try to call function inside job. It does not work. Is it possible to use function inside job or not. I hope you can help me. Here is my example code.
    Start-Job -Name ForestJob {param($v01,$v02)
      $line = @()
      function test {
        return "testvalue"
      $t = test
      $line += $t
    } -ArgumentList $var01, $var02

    Hi,
    Just checking in to see if the suggestions were helpful. Please let us know if you would like further assistance.
    TechNet Subscriber Support
    If you are
    TechNet Subscription
    user and have any feedback on our support quality, please send your feedback
    here.
    Regards, Yan Li

  • Howto use functions inside IN conditions

    Hi all.
    Is possible to use functions after an "IN" condition?
    If it's possible, What kind of datatype must return the function? And how can I add data to this kind of datatype?
    I want to do somthing like:
    CREATE OR REPLACE FUNCTION function1 (param number) RETURN xxxxx IS
    END;
    SELECT * FROM TABLE1 WHERE codigo IN function1(10);
    Thanks a lot.
    Olver

    Since a function returns a single value you would normally use = rather than IN.
    If you need to return multiple values, depending on the version of Oracle, you could use a pipelined table function. Your query would then be
    SELECT *
      FROM my_table
    WHERE my_key IN (SELECT key FROM TABLE( pipelined_table_function( parameter ) ) );Justin

  • Use function from external Javascript file

    Hi All,
    Is it possible to use function from other javascript file. If possible then please post some example.
    Shonky

    As Harbs mentioned, you can use doScript().
    Maybe you can do something like this:
    First I created simple function in separate file and exported it JSXBIN
    function myAlert(myString){
        alert(myString);
    Then, I copied contents of that JSXBIN and put it into variable
    var securedFUNCTION = app.doScript("@JSXBIN@ES@[email protected]AffABC40BhAB0AzHjNjZiBjMjFjSjUDAC0EzAEByB");
    or
    var securedFUNC = eval("@JSXBIN@ES@[email protected]AffABC40BhAB0AzHjNjZiBjMjFjSjUDAC0EzAEByB");
    And simply called function
    myAlert('My test String');
    Also, you can use include external script with #include to call JSXBIN, but you need to wrap contents of JSXBIN file into doScript or eval().
    tomaxxi
    http://indisnip.wordpress.com/

  • Is it possible to use that in the Alert????

    Dear all,
    We have a table XTR_BOND, so i want whenever the user enter any value to get that record by anevent alert(After insert for that table)
    so is it possible to use it like that???
    select t.bond_issue_code, t.DESCRIPTION
    into &bond_issue_code, &DESCRIPTION
    from XTR_BOND_ISSUES t
    where rowid = :rowid
    Kindly help,
    Thanks in advance
    Regards....Ashraf

    BANNER
    Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production The stored procedure adds a row to a table. There's a trigger on this table that fires when this occurs. This trigger uses DBMS_SCHEDULER to run a job. This job executes a C executable program on a remote server. When the C program finishes, it updates a field in a table in the database (using OCI driver) indicating the job is complete. The stored procedure needs to see this flag has been set showing the job is complete in order to continue.
    In a nutshell, the C program produces a lot of other results, and the stored procedure retrieves these results to send back to the calling java program. Of course, it must wait until the results are ready in the database before retrieving them.
    I'm a total newbie here (maybe there's a better way). I'd like to avoid polling if possible, thus my interest in DBMS_ALERT. I haven't been able to find clear, simple, and complete example online. I think often most discussion online give snippets that assume background knowledge.
    Edited by: tem on Apr 12, 2012 4:46 PM

  • Using functions in alert text

    Post Author: RScipione
    CA Forum: Performance Management and Dashboards
    I'm using Business Objects Enterprise XI Release 2 and am having trouble with some alerts I am creating in a rule in InfoView.  According to the documentation I've seen, I should be able to use functions in the title and text of the alert, but I can't get it to recognize the functions.  If I put "metric1" (no quotes) in the text, I get the metric value, but if I try "MetricValue(metric1.id, 0)", I get an error when I try to run the rule titled "Fail to run the action" and "Error evaluating action expression.    #v1 .ID, 0) Success".  The alert is generated, but the text is "MetricValue(#v1.ID, 0)", not the value of the metric.
    Can anyone tell me what I might be doing wrong?  Is the documentation I read incorrect?
    Thanks in advance for any replies,
    Richard

    Post Author: RScipione
    CA Forum: Performance Management and Dashboards
    I'll reply to my own post so that others might benefit from the response I got from customer support.
    It is possible to use functions in alert text, but the function must be preceeded by #f and followed by %.  So to get the example from my previous post working, I used:
    #f MetricValue(metric1.id, 0) %
    The 'f' is case sensitive by the way.

  • Using Functions in DocProperties

    Hi!
    Just one quick question: Is it possible to use functions (or other DocProperties) in DocProperties and how?
    I just found the possibility to define TEXT,DATE,INT or BOOLEAN but nothing else.
    Thanks in advance for replies
    bastian

    No, it is not possible to use functions in the definition of a document property.
    You can, of course, use any expression (including functions) when you set the
    value of a document property using VBA.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

Maybe you are looking for

  • Oracle reserved and non-reserved keywords

    Hello, I'm looking for a list of reserved and non-reserved keywords for all Oracle versions starting from 9. I think Oracle starts at R1, right? So the versions needed would be: 9.1, 9.2 10.1, 10.2 and 11.1 I found lists of keywords querying Oracle v

  • Distribution VB message

    Hi, When I try to run the offline distribution wizard, I get the following message.  "You  cannot run this task with the current security settings" It goes on to tell me to enable access to VB project.  I am running MS office 2007 and have this check

  • HT201210 Error when trying to update my ipad

    I got an error when trying to update my ipad saying it could not be updated and gave an error 6.  Has anyone else had this happen and how did you rectify it?

  • After Effects does not support Quadro K4200

    After Effects CC 2014 is running on Windows 7 64bit. I installed the latest driver.. After Effects does not support Quadro K4200 Here is a copy of GPU setting in AE. Can you fix this issue? Fast Draft:    Available Texture Memory:    2048.00 MB Ray-t

  • Has "cracked screen" issue been resolved in gen 2?

    i have a 1st gen ipod nano 4gb. i got it last december 2005, and recently it started freezing now and then...that stopped on its own, but one day i looked and the screen was black/rainbowy, with an LCD crack on it. still plays, but operates more like