Search criteria, showing data with some restriction criteria

Hi. How can I create restriction in browsing some page using ADF BC, for example if I create Search page I will browse some data which satisfy WHERE condition where something = search parameter.
I tried with ...Action.java and method prepareModel(DataActionContext) to catch search criteria. My code looks like:
public void onSearch(DataActionContext ctx) {
HttpServletRequest request = ctx.getHttpServletRequest();
DCBindingContainer bc = ctx.getBindingContainer();
DCIteratorBinding deptIter = bc.findIteratorBinding("browsePersonsView1Iterator");
String cName = request.getParameter("company_name");
String countryName = request.getParameter("country");
String lName = request.getParameter("lname");
String stamp = request.getParameter("stamp");
String orderBy = request.getParameter("orderby");
if(cName.equals("")) cName="%";
if(lName.equals("")) lName="%";
if(stamp.equals("")) stamp="%";
if(countryName.equals("Any")) countryName="%";
deptIter.getViewObject().setWhereClause("Compname like '"+cName+"'" + " and Pp_Cname_Gbr like '"+countryName+"'" + " and lname like '" + lName + "' and id like '" + stamp +"'");
if(!orderBy.equals("-1"))
if(orderBy.equals("lname") || orderBy.equals("id") || orderBy.equals("compname") || orderBy.equals("compid"))
deptIter.getViewObject().setOrderByClause(orderBy);
deptIter.executeQuery();
Is there a smarter way for doing this? Second thing, when I change Sync to Immediate this code gave me an error.

You really need to read the OTN Howto/tip by Steve Muench on how to create a search page with fixed and dynamic criteria here:
http://www.oracle.com/technology/products/jdev/howtos/10g/dynamiccrit/index.html

Similar Messages

  • Need a Tcode Similar to CJR2 with some restrictions in the selection scr

    Hello Experts,
    I need a Tcode which is Similar to CJR2 but with some restrictions in the selection screen.
    CAN ANYONE THROW A LIGHT HOW TO ACHIVE THIS.
    Thanks a lot in advance.
    Regards,
    Vasanth M

    Hello Experts,
    I have tried with the Transaction Variant. It works but I want to make display only for the version,Starting and closing period and Year. Other fields should be open for input(Cost Element and WBS element)
    But the transaction variant is making DISPLAY ONLY for all the fields.
    Please tell me a suggestion how I could achieve it.
    Thanks a lot in advance.
    Best Regards,
    Vasanth M

  • Certain Crystal reports don't show data - are there restrictions

    Hello,
    We created quite a few reports in Crystal Reports (like invoice, deliverynote, picklist etc.).
    When we connect some reports in SBO (layout- and design manager) they do not show any data. Only text fields are shown.
    In these reports we use tables, UDF and Views. We also have subreports.
    The reports are working fine in Crystal itself and also when using Crystal Wave (add-on). All parameters are set the right way, otherwise we would become a parameter error.
    We did a test with one of the reports to remove the subreport and then it did show data (not the data from the subreport of course).
    Another report with tables, UDF, views and a subreport doesn't give an error. It shows all the data.
    So I was wondering what could cause this. Are there any restrictions to a report when connecting a Crystal Report to SBO using the layout- and design manager.
    Tim

    Do you maybe have inner joins for all of your tables and views?
    Maybe it's a parameter issue causing no rows to be displayed.  Did you test the exact DocEntry@ for your layouts?
    No, from my experience I have not seen any limits when using SBO and CR inside the client.
    Mike

  • How to show date with format conforming to system date format ?

    Hi all,
    I write Java program running on Windows 2000 Advanced Server.
    I want to show date in a status bar with the format the same as that in system date format where the program resides, so when I change the date format through the regional setting, I expect that the date format in the status bar will adjust accordingly.
    But it seems that program fails to do so, the program keeps showing short date format MM/dd/yy. I've tried to use SimpleDateFormat.getDateInstance() method, but the result is the same.
    Any suggestion would be greatly appreciated.
    Setya

    Hello Setya !!
    I have the same problem as you.. Did you find any solution for this?
    Thank you,
    Claudia

  • Finder search results show MP3s with incomplete or changed filenames in Yosemite

    Under Yosemite, when performing a search for "mp3" in Finder, certain search results will not display their true filename under the "Name" column:
    For example, the "Name" column above should display the entire filename (as shown in the Status Bar), not just what I can only assume is the track title.
    This does not apply to all mp3s, only to some. Probably something to do with ID3 tags, or perhaps with certain hyphen usage in the filename.
    Anyway, I'd just like the "Name" column to show me the filename as it should, and not metadata. I can't find how to change the results to display the correct filenames.
    This causes several problems. First it makes sorting by an album's track number, which is frequently included in the actual filename, in the search results impossible, as now the numbers are not part of the list. Therefore if I want to drag an album into an iTunes Playlist in the correct album order I have to go to the source folder and can't do it straight from the search window. Also I can't see separate versions of the same song, which may have the same track title but different filenames. Also I can't see the filename at a glance, which may include other important information other than the track title. And so on.
    I can't find anyone else who has this problem on Yosemite. Mavericks yes... and sadly no help. Hoping it's fixable.

    I have the same problem with AIFF's too...
    It's a big problem for me as I'm currently doing some sound design.
    I need to see the file name in the finder, not the title/track name.

  • Show dates with no corresponding values

    Howdy all....
    I have a report that quantifies newspaper draws by the day of the week for the purpose of giving to the delivery persons. I am trying to use a cross-tab to show the amount of papers for each location, in columns by the day of week. When a location is closed on a particular day (having a null entry in the draw record), there is simply no record for that day, leading to a situation where as one looks down the column in the cross tab table, one is not necessarily looking at the same day's data in the column. For instance, if Sunday is the first day of the sales week, I would like Sunday to be the entire first column, irrespective of the amount allocated to that location, so that the entire column sums to be the total for that date rather than for the first day that the location has papers assigned to it. Every location would have a value for all seven days, regardless of the number of days with draws assigned.
    Hope that make sense. I'm certain that it's something that should be apparent to me, but it just isn't. Any help is greatly appreciated!
    Edited by: MicahY on May 3, 2011 4:47 PM

    YOu will need to build a manual cross tab where you have formula to define your columns.
    eg
    @sunday
    if dayofweek(yourdatefield) = 1 then valuefield else 0
    repeat for each day. add these to details and suppress detail section
    Add sum summary to your relevant group.
    Now you will get a column for each day irresepective as to whether there is data or not.
    Ian

  • TDMS viewer not showing data with time stamp

    Need help with time stamping data in a TDMS file generated by DAQ Assistant.
    When I use the TDMS Viewer, with the x-scale set to absolute time, the date starts at 1903. If I use Excel to look at the file the start time is correct (i.e. 2013).
    Solved!
    Go to Solution.

    Bo_Xie, I have simplifed my VI and now able to display the correct time stamp. Thank for your time!

  • Query data with some value & display in datatable at page

    hi,
    I have bean and when user enter some page i use datatable to display some data from oracle:
    <h:dataTable id="dt1" value="#{GetDataOracle.rep_tcok_pl2_connects}" var="item" bgcolor="#F1F1F1" border="10" cellpadding="5" cellspacing="3" width="70%" dir="LTR" frame="hsides" rules="all" summary="This is a JSF code to create dataTable." >i want to first user defined start date and end date of report, type it into the form and later click submit and display report.
    I know how to do that not using framework, please tell me how to do that in JSF?
    I have main Controller servlet and my Bean is sth like this:
    package logic;
    import java.util.ArrayList;
    import java.util.List;
    import javax.naming.*;
    import java.sql.*;
    import exception.NoConnectionException;
    * @author pawel
    public class GetDataOracle {
    Connection con = null;
    Statement ps = null;
    ResultSet rs = null;
    private List perInfoAll = new ArrayList();
    private List rep_dws_wnioski_wstrzymane_cnt = new ArrayList();
    private List rep_dws_wnioski_wstrzymane_graph = new ArrayList();
    private List rep_tcok_ppi_connects = new ArrayList();
    private List rep_tcok_pl_connects = new ArrayList();
    private List rep_windyk_hip_umowa_to_call = new ArrayList();
    private List rep_tcok_pl2_touchpoint_count = new ArrayList();
    private List rep_tcok_pl2_connects = new ArrayList();
    public List getperInfoAll() {
        int i = 0;
        try {
        con = Database.createConnection();
        ps =    (Statement) con.createStatement();
        rs = ps.executeQuery("select sso, fname, sname, lev, last_login, login_count from stg123054130.oraclereports_user order by sname");
        while(rs.next()){
          perInfoAll.add(i,new getUsersData(rs.getString(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5),rs.getString(6)));
          i++;
        } catch (NamingException e) {
            e.printStackTrace();
            throw new NoConnectionException(); 
        } catch (SQLException e) {
            e.printStackTrace();
            throw new NoConnectionException(); 
        } catch (NullPointerException e) {
            e.printStackTrace();
            throw new NoConnectionException();  // obsluga bledy na wypadek jesli braknie wolnych polaczen do bazy
        } finally {
        try {
            if(con != null)
            con.close();
        } catch (SQLException e) {
            e.printStackTrace();
        } catch (NullPointerException e) {
            e.printStackTrace();
            throw new NoConnectionException();  // obsluga bledy na wypadek jesli braknie wolnych polaczen do bazy
    return perInfoAll;
    public class getUsersData {
    String sso;
    String fname;
    String sname;
    String lev;
    String last_login;
    String login_count;
    public getUsersData(String sso, String fname, String sname, String lev, String last_login, String login_count) {
        this.sso = sso;
        this.fname = fname;
        this.sname = sname;
        this.lev = lev;
        this.last_login = last_login;
        this.login_count = login_count;
    public String getsso() {
        return sso;
    public String getfname() {
        return fname;
    public String getsname() {
        return sname;
    public String getlev() {
        return lev;
    public String getlast_login() {
        return last_login;
    public String getlogin_count() {
        return login_count;
    }How should i send to my Bean info that i want data where:
    select sso, fname, sname, lev, last_login, login_count from stg123054130.oraclereports_user
    where last_login > to_date('20091101','YYYYMMDD')
    order by sname;
    ?

    Hi 404116,
    Here's another method :
    1. After you have queried the Block-3 <Subject Block> you have the Student-id from Block-2 which you can use to query the Block-1.
    -- I will use the following code to query the Block-1
    1. Check the Block Status of Block-1. As you have queried the Block-3 and Not Block-1, the Block Status of Block-1 should not be 'QUERY'.
    2. If status of Block-1 is not 'QUERY' And
    status of Block-2 is 'QUERY'
    Then
    /* The query process is reverse from Block-3 first */
    2a. Use the Set_Block_Property Built-In to define the Where Condition for the Block-1.
    Where column to Query = : Block-2.Student Id
    2b. Remove the Relation between Block1 and Block-2 at Run Time.
    2c. Go_Block ('Block-1');
    Clear_Block (No_Validate);
    Execute_Query;
    And Remember,
    1. To remove the Where Condition set in Block-1 when you query from Block-1 first
    2. And re-define the MD relation from Block-1 to Block-2
    -- Shailender Mehta --

  • Need a Tcode Similar to CJR2 with some restrctions in the selection scr

    Hello Experts,
    I need a Tcode which is Similar to CJR2 but with some restrictions in the selection screen.
    CAN ANYONE THROW A LIGHT HOW TO ACHIVE THIS.
    Thanks a lot in advance.
    Regards,
    Vasanth M

    Hello Experts,
    I have tried with the Transaction Variant. It works but I want to make display only for the version,Starting and closing period and Year. Other fields should be open for input(Cost Element and WBS element)
    But the transaction variant is making DISPLAY ONLY for all the fields.
    Please tell me a suggestion how I could achieve it.
    Thanks a lot in advance.
    Best Regards,
    Vasanth M

  • Can't show data labels in pie graphs as decimal number if the crosstab data

    I want to show my data labels in diagrams, as percent values, with three decimals.
    It occurs (in version Oracle Business Intelligence Discoverer Plus 10g (10.1.2.55.26)) it is only possible if the data format of the crosstab data also shows data with decimals. If the data are in integer format, the graphs data labels can only be shown in integer as well.
    Does anyone know how to fix the problem?
    In version Oracle Business Intelligence Discoverer Plus 10g (10.1.2.48.18) we can have a crosstab showing integers and a pie graph showing labels of pie slices where the labels are in percent with three decimals. It seems it does not work in the newer version Oracle Business Intelligence Discoverer Plus 10g (10.1.2.55.26)
    Thanks in advance

    It seems I have another similar problem in version Oracle Business Intelligence Discoverer Plus 10g (10.1.2.55.26):
    I have a Bar (Percent) graph based on a crosstab where the data is formatted as number with two decimals.
    The labels in the graph shows as number (0,76 instead of 76% and 0,13 instead of 13%). I want them to be shown in percent format.
    The Data Label format is set to “Number” with two decimals. I can change the Data Labels to Percent with two decimals and then it shows the data labels in the graph exactly as I want it. But after I have saved the workbook and then opened it again the changes has been “revoked” and is once again set to number with two decimals instead of percent.
    thanks (again) in advance

  • I have set up two users, one for myself and one for children.  The computer automatically logs in for the children with no password required.  When the children go to spotlight and type in a search criteria all of my files show up.  How do I prevent this?

    I have set up two users, one for myself and one for children.  The computer automatically logs in for the children with no password required.  When the children go to spotlight and type in a search criteria all of my files show and open up.  How do I prevent this?

    Log in to your account, and move all your files to your home folder. No other users should be able to access them there and they won't show up with a Spotlight search.
    Make sure your kids' account(s) do not have admin privileges.

  • Interdependent Search Criteria with FPM Search GUIBB

    Hello everyone,
    I have the requirement to implement a FPM Search GUIBB where some search criteria are interdependent on each other. I will explain this with an example:
    We have two search criteria, "Country" and "City". All possible values of "Country" are shown in a drop down list box. When a value in that drop down list box is selected, the other drop down list box of possible cities should only show those values which fit to the selected country. So, when I select “Germany” the second drop down list box should only show Berlin, Frankfurt and Munich. When I select Spain it should only show Barcelona and Madrid, etc.
    I already found out, that something similar is possible with OVS Value Helps. Nevertheless, I would prefer to find a solution with drop down list boxes.
    Thanks in advance for your advices!

    Hi SF,
    As you said, It is actually a look-up field on the main catalog table.
    It will visible in MDM data Manager Drill down search if and only if you set Property Search Tab as Yes for field in main table which is look up to some sub table using MDM Console.
    Once you done , you will see this field as well in Drill down search and can pick more than one value using CTRL key.
    Other alternative i would suggest you is that, if you have any field of type text is blank in you main table say FIELDGA. Populate this field against the records who has USAGE = Group A using assignment.
    So, in this way you would have two fields in Free Form Search criteria, select value Group A from field FIELDGA in search selection and using original field USAGE select GROUP B. In this way u can achieve this.
    Better to go with property Search Tab = Yes for that lookup field in main table using MDM console.
    Kindly revert with the result.
    Thanks and Regards,
    Mandeep Saini

  • Regarding date ranges in search criteria in oracle forms

    I am using employee number,name, person type, and date ranges as search criteria in custom form.
    when I enter employee number, hit the find button, I am getting the exact info in the result block.
    Result block contains
    employee name,personid,emp numb,org,start_date.
    Similarly when I enter employee number,dept, I am getting correct values.
    My question here is, when I enter date range. Iam unable to filter data.
    When i enter START_DATE between nvl(:BLOCKNAME.START_DATE,'01-JAN-1901') and nvl(:BLOCKNAME.END_DATE,'31-DEC-4712') at where clause in the result block. I got data for the date range also.
    if I give condition in the where clause, results are taking so much time when i search with employee name,number,dept,person type.
    If i query with date, persormance is good.
    Do u any know,how to prevent START_DATE between nvl(:BLOCKNAME.START_DATE,'01-JAN-1901') and nvl(:BLOCKNAME.END_DATE,'31-DEC-4712') when we search with employee name,number,dept,person type.

    Initailly Ididnt given any code in the where clause of the result block. I got data in the result block when i search with employee name,number,person type,dept etc except date range.
    If i give date range, irrespective of the date, getting all the data.
    after that i added code to the where clause of the result block. Now i am getting data for everything.
    like, when i query with employee name,number,even date range also.
    My question here, performance.
    when I query with date range, data is coming in expected time in the result block.
    when i query with dept, taking much time since date range logic exist in the where clause of the result block.
    I need to restrict the where clause only to the data ranges. Where clause should not necessary for employee number,name,person type dept search criteria
    Tahnks for your reply

  • How to display the data according to the search criteria

    Hi ,
    I want to display the order data in my application.
    I have certain search criteria in my application like
    ordernumber , date etc.
    If I click the submit button without giving any criteria , all the data is getting displayed properly in the table.
    But,If I want to display the data according to the order number, all the orders present are getting displayed , but actually it should display the order only for that particular order number.
    The code is  like : onActionSearch()
    wdThis.wdComponentController().executeGetlist_Input();
    Can any one tell me how to display the orders depending upon the search criteria.
    Ideas & suggestions are truely welcome.
    Thanks & Regards
    Neha Mahanty

    Hi Neha,
    Design ur RFC in such a way that it should display the result according to your search criteria.
    If you are making a search on "Order Number" pass some input(search criteria along with some parameter, if order number is not null then pass "X" as parameter) to RFC so that it will return the result accordingly. And same with date also.
    Thanks n Regards,
    Jhansi Miryala

  • Restrict No: of input Search Criteria to 1 dropdown field

    Dear Experts,
    We have a custom BP_Search AB where we have 4 fields. We added these 4 fields in the UI Configuration.
    Now on the search screen, these appear as 4 lines. However, our requirement is:
    We just need to show 1 search criteria as dropdown box with the 4 available fields i.e we do not want the "Copy Line" and "Remove Line" functionality as in Standard Account Search.
    Similar requirement was posted in thread :Removing + and - icons from AdvancedSearchHelp pages but the solution suggested does not serve our purpose and modification of suggested standard classes would affect searches everywhere but we want the + and - to be removed only for our custom AB.
    How do we go about achieving this?
    Regards
    Nisha

    Hi Hariharan,
    Please use the Mark_tab parameter of the FM F4IF_INT_TABLE_VALUE_REQUEST as below.
    data: MARK_TAB TYPE DDSHMARKS.
    data: mark like line of mark_tab.
    mark = '2'.
    append mark to MARK_TAB.
    *-- Call fucntion for search help
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = l_retfld
    dynpprog = sy-repid
    dynpnr = sy-dynnr
    dynprofield = l_dynfld
    MULTIPLE_CHOICE = 'X'
    callback_program = sy-repid
    MARK_TAB = mark_tab
    TABLES
    value_tab = l_i_value
    field_tab = l_i_fields
    return_tab = l_i_return
    EXCEPTIONS
    parameter_error = 1
    no_values_found = 2
    OTHERS = 3.
    IF sy-subrc 0.
    MESSAGE i000
    WITH 'No search help found'(090) .
    ENDIF.
    Regards,
    Amit.

Maybe you are looking for

  • When publishing to a folder page looks awful once uploaded. Can anyone help

    Hi, I've read through at least 30 pages on this forum and seem to be unable to find something to help me remedy my problem. I made a really simple site in iWEB. When I publish to a folder and click the "visit this site now" button, everything looks p

  • How do I use an external monitor on my MacBook. v.NoLCD

    I have a MacBook with no LCD (was removed) but when I hook an external up to install an OS on, all I get is the Leopard default background. I can't figure out how to make the external the primary.

  • Can you associate a note with a To Do in iCal?

    I'm struggling to make sense of Apple's Notes and To Do functionality. I know I can create a note or a to do item in Mail, and the to do's will show up in a special calendar in iCal. I'm fine with that as it's a somewhat similar model as Outlook, wit

  • Tax Code in Scheduling agreement

    Hello In PO i can find the Tax code entry in Invoice tab at item level.. then where shall i find thisTax code entry in Scheduling agreement? sapman

  • Reliable file upload using JDev, AS and other

    Hello, I'm not sure this is the right place to post this message, sorry if I was wrong to put it here. The question is our company is developing software, for active data exchange with other systems. We decided to exchange in xml format, by means of