Criteria of programmatic view adding the date condition

Hi all

I use Jdev 12.1.3. I wrote a method in AMImpl to filter my viewobject based on custom search screen of the user interface.

I create the criteria for the view programmatically. I have check SMSDate field in my VO date between the criteria in the field settings start date and end date.

How to define this condition by programming

' Public Sub searchInfo (String attribut1, String fullname, startDate, endDate oracle.jbo.domain.Date oracle.jbo.domain.Date) {}

ViewObjectImpl vo = getSmsInfoVO1();

ViewCriteria vc = vo.createViewCriteria ();

ViewCriteriaRow vcRow = vc.createViewCriteriaRow ();

If (attribut1! = null & &! attribute1.isEmpty ()) {}

vcRow.setAttribute ("attribut1", attribute1);

vc.addRow (vcRow);

}

If (fullname! = null & &! fullname.isEmpty ()) {}

vcRow.setAttribute ("full name", fullname);

vc.addRow (vcRow);

}

Need a logic here set VO attribute SMSDate and check the date between the startDate and endDate parameters method

vo.applyViewCriteria (vc);

vo.executeQuery ();

}

Check this box:

setOperator ("between")

Tags: Java

Similar Questions

  • If Condition get spent during execution, even when the data Condition fails

    Hi gurus,

    We came back to condition in the procedure below


    / * Condition in a procedure * /.

    If i.effective_end_date > p_end_date and i.effective_start_date < = p_end_date

    then

    Start

    If l_future_rec_flag then

    -Call API with update insertion mode

    l_datetrack_mode: = hr_api.g_update_change_insert;

    on the other

    -Call API with Update Mode

    l_datetrack_mode: = hr_api.g_update;

    end if;

    -api call

    end;

    end if;

    / * Condition in a procedure * /.

    data sent to this if condition during execution is as below, I printed it using fnd_file.put_line (fnd_file.log).

    i.effective_end_date > p_end_date and i.effective_start_date < = p_end_date

    31 December 12 > 31 March 13 and 1 January 13 < = 31 March 13

    , my doubt is that the above data made it clear the if condition fails with past data. but during the execution, the condition happened and will block to start and run the api and get api error.

    Error occurred during the assignment process. Check the log file for more details. ORA-20001: unable to change the update of insert mode when there is no future lines

    Cause: The insert DateTrack change update mode can be done if there is no future lines after the current date.

    Action: Perform an update operation DateTrack or erase your changes.

    Error occurred during the assignment process. Check the log file for more details. ORA-20001: unable to change the update of insert mode when there is no future lines

    Can anyone help on this.

    Thanks in advance

    Hi gurus,

    Now, it has been resolved, we used the to_date for date comparison function and now it works perfectly.

  • Extracting data from table using the date condition

    Hello

    I have a table structure and data as below.

    create table of production
    (
    IPC VARCHAR2 (200),
    PRODUCTIONDATE VARCHAR2 (200),
    QUANTITY VARCHAR2 (2000).
    PRODUCTIONCODE VARCHAR2 (2000).
    MOULDQUANTITY VARCHAR2 (2000));

    Insert into production
    values ('1111 ', '20121119', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20121122', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20121126', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20121127', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20121128', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20121201', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20121203', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20121203', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20130103', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20130104', ' 1023', 'AAB77',' 0002');

    Insert into production
    values ('1111 ', '20130105', ' 1023', 'AAB77',' 0002');


    Now, here I want to extract the data with condition as

    PRODUCTIONDATE > = the current week Monday

    so I would skip only two first rows and will need to get all the lines.

    I tried to use it under condition, but it would not give the data for the values of 2013.

    TO_NUMBER (to_char (to_date (PRODUCTIONDATE, 'yyyymmdd'), 'IW')) > = to_number (to_char (sysdate, 'IW'))

    Any help would be appreciated.

    Thank you
    Mahesh

    Hello

    HM wrote:
    by the way: it is generally a good idea to store date values in date columns.

    One of the many reasons why store date information in VARCHAR2 columns (especially VARCHAR2 (200)) is a bad idea, it's that the data invalid get there, causing errors. Avoid the conversion of columns like that at times, if possible:

    SELECT     *
    FROM     production
    WHERE     productiondate     >= TO_CHAR ( TRUNC (SYSDATE, 'IW')
                              , 'YYYYMMDD'
                           )
    ;
    
  • Check for the empty table row before adding the date

    On the form below, when I click on the green button (extreme right) plus a new row in the table is created with today's date. the user can then enter more text to the right of the date. Problem is when the form is saved and reopened, the text that the user entered is removed and today new is added because it is in the intialize event. How do I script to check and make sure that each dated line is empty before you add today's date?

    https://Acrobat.com/#d=qTINfyoXA-U6cDxOGgcSEw

    Thank you

    ~ Gift

    Hi Don,

    One possibility would be to use the box caption of the textfield for the date and leave the value part free for the user to enter their data:

    if (xfa.resolveNode("this.caption.value.#text").value === "") {
              this.caption.value.text = util.printd("[mm/dd/yy] ", new Date() );
    }
    

    See here: https://acrobat.com/#d=VjJ-YsXLKmV6QU84JrAAIw.

    Hope that helps,

    Niall

  • Added the Dates of application

    What I'm trying to achieve.
    I have 3 tables.

    tblCUSTDETAILS - contains information of customers.
    tblFLTNUMS - contains defects the customer has
    tblCONTACTS - contains the monthly Volume of Contacts by the customer.

    I want to do is show the amount of contacts of 3 months after the date of the fault. So I can say things like 3 months after a fault of the customer always contact us because they lost trust with our service. etc.

    The problem is that if the customer has not called for a specific month then it does not save 0 and that's what I want.

    WITH tblCUSTDETAILS AS (
        SELECT  '11111' AS CUST_ID, 'John Smith' AS CUST_NAME FROM DUAL UNION ALL
        SELECT  '11112' AS CUST_ID, 'Andy Wilson' AS CUST_NAME FROM DUAL
    ), tblFLTNUMS AS (
        SELECT  '11111' AS CUST_ID, TO_DATE('JAN-10', 'MON-YY') AS FLT_DT FROM DUAL UNION ALL
        SELECT  '11112', TO_DATE('FEB-10', 'MON-YY') FROM DUAL UNION ALL
        SELECT  '11112', TO_DATE('APR-10', 'MON-YY') FROM DUAL  
    ),
       tblCONTACTS AS (
        SELECT  '11111' AS CUST_ID, TO_DATE('JAN-10', 'MON-YY') AS CONTACT_DT, 5 AS CONTACT_VOL FROM DUAL UNION ALL
        SELECT  '11111', TO_DATE('FEB-10', 'MON-YY'), 3 FROM DUAL UNION ALL
        SELECT  '11112', TO_DATE('MAR-10', 'MON-YY'), 1 FROM DUAL UNION ALL
        SELECT  '11112', TO_DATE('MAY-10', 'MON-YY'), 2 FROM DUAL 
    )
    SELECT  t1.cust_id, 
            t2.cust_name,
            t1.flt_dt,
            t3.contact_dt,
            t3.contact_vol 
    FROM    tblFLTNUMS t1
    JOIN    tblCUSTDETAILS t2
        ON t1.cust_id = t2.cust_id
    JOIN    tblCONTACTS t3
        ON t1.cust_id = t3.cust_id
    ORDER BY flt_dt, contact_dt, cust_name DESC
    ;   
    As you can see by the example atttached Joh Smith had a flaw on 01/01/2010 and contacted us on 01/01, 01/02, not 01/03 but I want 01/03 to say 0.

    It's just a report that I can't rebuild the tables so a SQL-based solution is required.

    I hope you can help.

    I'm not sure what you are really after, but I gave it a shot:

    SQL> WITH tblCUSTDETAILS AS (
      2      SELECT  '11111' AS CUST_ID, 'John Smith' AS CUST_NAME FROM DUAL UNION ALL
      3      SELECT  '11112' AS CUST_ID, 'Andy Wilson' AS CUST_NAME FROM DUAL
      4  ), tblFLTNUMS AS (
      5      SELECT  '11111' AS CUST_ID, TO_DATE('JAN-10', 'MON-YY') AS FLT_DT FROM DUAL UNION ALL
      6      SELECT  '11112', TO_DATE('FEB-10', 'MON-YY') FROM DUAL UNION ALL
      7      SELECT  '11112', TO_DATE('APR-10', 'MON-YY') FROM DUAL
      8  ), tblCONTACTS AS (
      9      SELECT  '11111' AS CUST_ID, TO_DATE('JAN-10', 'MON-YY') AS CONTACT_DT, 5 AS CONTACT_VOL FROM DUAL UNION ALL
     10      SELECT  '11111', TO_DATE('FEB-10', 'MON-YY'), 3 FROM DUAL UNION ALL
     11      SELECT  '11112', TO_DATE('MAR-10', 'MON-YY'), 1 FROM DUAL UNION ALL
     12      SELECT  '11112', TO_DATE('MAY-10', 'MON-YY'), 2 FROM DUAL
     13  ), tblMonthParameters AS (
     14          SELECT  MIN(FLT_DT) AS startMonth
     15          ,       ADD_MONTHS(MAX(FLT_DT),2) AS endMonth
     16          FROM    tblFLTNUMS
     17  ), tblMONTHS AS (
     18          SELECT  ADD_MONTHS(startMonth,ROWNUM - 1) AS DT
     19          FROM    tblMonthParameters
     20          CONNECT BY LEVEL <= MONTHS_BETWEEN(endMonth,startMonth) + 1
     21  )
     22  SELECT  t1.cust_id,
     23          t2.cust_name,
     24          t1.flt_dt,
     25          t3.dt,
     26          NVL(t3.contact_vol,0)   AS CONTACT_VOL
     27  FROM    tblFLTNUMS t1
     28  JOIN    tblCUSTDETAILS t2
     29      ON t1.cust_id = t2.cust_id
     30  JOIN    (
     31                  SELECT  CUST_ID
     32                  ,       CONTACT_VOL
     33                  ,       DT
     34                  FROM    tblCONTACTS PARTITION BY (tblCONTACTS.CUST_ID)
     35                  RIGHT JOIN tblMONTHS  ON tblCONTACTS.CONTACT_DT = tblMONTHS.DT
     36          ) t3
     37      ON  t3.CUST_ID = T1.CUST_ID
     38      AND MONTHS_BETWEEN(t3.DT,t1.FLT_DT) BETWEEN 0 AND 2
     39  ORDER BY flt_dt, dt, cust_name DESC
     40  ;
    
    CUST_ CUST_NAME   FLT_DT              DT                           CONTACT_VOL
    ----- ----------- ------------------- ------------------- --------------------
    11111 John Smith  01/01/2010 00:00:00 01/01/2010 00:00:00                    5
    11111 John Smith  01/01/2010 00:00:00 02/01/2010 00:00:00                    3
    11111 John Smith  01/01/2010 00:00:00 03/01/2010 00:00:00                    0
    11112 Andy Wilson 02/01/2010 00:00:00 02/01/2010 00:00:00                    0
    11112 Andy Wilson 02/01/2010 00:00:00 03/01/2010 00:00:00                    1
    11112 Andy Wilson 02/01/2010 00:00:00 04/01/2010 00:00:00                    0
    11112 Andy Wilson 04/01/2010 00:00:00 04/01/2010 00:00:00                    0
    11112 Andy Wilson 04/01/2010 00:00:00 05/01/2010 00:00:00                    2
    11112 Andy Wilson 04/01/2010 00:00:00 06/01/2010 00:00:00                    0
    
    9 rows selected.
    

    I have added more than two tables to your WITH clause. The tblMonthParameters calculates the minimum FLT_DT and maximum FLT_DT + 2 month based on your requirement of fault for three months. The tblMonths use these input parameters and generates a number of dense months.

    This dense months range is then outside connected by the PARTITION OF the table tblCONTACTS syntax to generate months for each customer. This result is then used as a subquery in the main original query you had to join based on the customer and FLT_DT. When the customer has not contacted for any given month, I put a 0 in the CONTACT_VOL column.

    If this is not correct please let me know. This solution depends on 10g, so if you do not, you may need to find another way to do this.

    HTH!

  • Rename the files in a directory by adding the date and time

    Hello

    I am looking for a way to rename all the files that are in a directory with an add-on at the end with the date and time.

    for example:

    File1-> file1ddmmyyhhmi

    File2-> file1ddmmyyhhmi

    for example:

    $A = get-date-Format "yyyymmddhhmm.

    foreach-object - process ...

    Thank you.

    You can try something like this

    $A=get-date -Format "yyyymmddhhmm"
    Get-ChildItem "C:\folder" | %{
         Rename-Item -NewName ($_.Basename + $A + $_.extension) -Path $_.FullName
    }
    

    This assumes that the files are stored in C:\folder

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • Numbers with comma in the data Cube Viewer

    Hello

    I want to know what to do to display numbers with comma in the data Cube Viewer. The data type of the measure in the cube is NUMBER (4.3). The default aggregation is AVERAGE. When I load the cube with the numbers of the exactly NUMBER format (4.3) - in the data Cube Viewer I see only rounded integer values without decimal point.


    If I load the test instead of cube table - the numbers are loaded in the correct format.


    What should I do to load the cube with point numbers? Is this possible in OWB?

    Now, I decided to use a way to go around it - simply put 1453 instead of 1.453. Then it works (but this isn't a great solution). It is the only way?

    Thanks in advance for any help

    Peter

    Hi Peter

    The cube data viewer has a toolbar with a lot of options... formatting, you can add and remove the numbers after the decimal point. From memory, I think you have to select the cells you want, you can click and select all the cells in the table and then use the button Add digits after the decimal point.

    See you soon
    David

  • How to consume the data model library adf for the project?

    Hello

    I use Jdev 11.1.1.6.

    I have a workspace Jdev containing the business component (entity objects, view and application module objects exposing the your). This workspace is deployed to a library of the ADF. This library is packed with DB connection details.

    I have a different workspace Jdev which needs to consume this library of ADF data model. This workspace is actually just the layer view (no business at all components).
    I added the data library ADF model to his draft opinion and it is showing application module and your sub of the data controls.

    My question is: how will this project view to connect to DB when running?
    It allows the connection of packaged data model ADF Libabry? If so, how?
    or should I create a business under this workspace view, just the purpose of connection project? If Yes, then what is the use of connections, including creating the library of the ADF?

    Thank you
    JAI

    Hello

    It uses the connection in the library of the ADF. However, I recommend that not save you the database connect information in the library of the ADF. Instead:

    -set the ADF BC model to use JDBC data sources
    -In the library of the ADF, configure it to contain only the name of data source
    -In the view project (the workspace) set up the database connection that is exposed by the library

    When the library is imported, verify the Application resources--> connections and right click on the name of the connection that is imported to configure

    Frank

  • my e-mail messages now all the data the path below the shipping date. The path data also appears when I send a message. How to disable this option?

    Here's what I see below the date. This problem just started a few days ago. I must have turned on something in my settings but I've searched and can't find what it is.

    Message transferred-

    From: 57 2015 <>
    X key account: account 1
    X-UIDL: 11e5-690d-7a459b6a-9997-002128145bba
    X-Mozilla-Status: 0000
    X-Mozilla-Status2: 00000000
    X-Mozilla-keys:
    Status: U
    Return-Path: < [email protected] >
    Received: from carlin.mail.atl.earthlink.net ([207.69.200.104]) by mdl - gnash.atl.sa.earthlink .net (of EarthLink SMTP server) with SMTP id 1zI0PI6Hs3Nl3710; Friday, October 2, 2015 09:57:10-0400 (EDT)
    Received: from boell.org ([62.96.251.171]) by carlin.mail.atl.earthlink.net (SMTP of EarthLink server) with ESMTP id 1zI0PF4wg3Nl3q80 for < [email protected] >; Friday, October 2, 2015 09:57:08-0400 (EDT)
    Received: from gate_dom-MTA by boell.org with Novell_GroupWise; Friday October 2, 2015 15:57:07 + 0200
    Message-Id: < [email protected] >
    X-Mailer: Novell GroupWise Internet Agent 14.0.1
    Date: Friday 2 October 2015 15:56:41 + 0200
    From: < [email protected] > Nelson Mackenzie
    To: [email protected]
    Subject: Re: update/invitation
    References: < [email protected] > < [email protected] >
    In-Reply-To: < [email protected] >
    MIME-Version: 1.0
    Content-Type: multipart/mixed; Boundary = 'is __PartB483E109.0__ is'
    X ELNK-receipt-Info: spv = 0;
    X-authentication-results: dkim = "failed"; (2:no or failed processing dkim); dMarc = "none"; (1) ; DWL = 'miss '; den = "not exempt".
    ELNK-AV: 0 X
    X ELNK-Info: sbv = 0; sbrc =. 0; SBF = bb; SBW = 000;

    You can see the full headers.

    You can change this option to view only the data OF WORMS regular Date topic.
    'View' > 'Headers' > 'Normal '.

  • multiple columns when the data connection to a txt file

    I am eager to write for different columns third example of a single txt file when recording data. Can someone show me examples of code how get 3 groups of data with several points, write them in their own columns and then go back and write more data points to the columns by adding the data... Please and thank you.

    Hi Tony,.

    Here's a basic example to do so.

    In newer versions of LV, you will find a 'write in the spreadsheet file' function which performs the task of the two functions to the right of the block diagram, but the version reported is more flexible IMHO because it allows to add easily the headers and footers...

  • When I export the report to EXCEL files and filter the data, it will display incorrect data

    Hi experts,
    In OBIEE 11.1.1.6, when I export the report to EXCEL file and open this file to view all the data, it is correct.
    However, as the amount of data is so, so I add filter for each column (click on the sorting-> filter filter)
    When I select data in the filters, I'm afraid that I find the value of 'White' in the last line in the filter area, but in the table, there no null data. Why? Are you facing the same issue?
    Secondly, when I select a value, it will generate a data line.

    For example:
    2008 - Region1
    -The region.2
    -Elle3
    2009 - Region1
    -The region.2
    -Elle3


    When I select 2008 data in EXCEL, it will display unexpected data, as below:
    2008 - Region1

    Exactly... If you export to the format you will not face question of null data or incorrect when filtered.

    Kind regards
    DpKa

  • diff between the view and the materialized view

    Hi all

    Whats different between the view and the materialized view?

    could someone help me pls this topic

    thnks in advance

    See nothing else that a set is a set of sql statements that join the single or multiple tables and shows the data... However views do not have the data themselves but point to the data.

    Whereas the materialized view is a concept used primarily in the Datawarehousing... these views contain the data itself. Reason being, it is more easy/quick access to the data. The main objective of Materialized view is to perform calculations and display data from multiple tables by using joins.
    check out the link for more information below.
    http://www.geekinterview.com/question_details/29332

    rajeysh
    http://oracleinstance.blogspot.com

  • Display of the data in a recordset object

    Hello

    I created a recordset and returns 6 rows of data when tested. These are products of a catalog online and I would like to do is show 6 products per page. I created 6 areas and added the data dynamically and what happens, is that the first row of data appears 6 times. Is it possible to display all rows on a page? I read "Recordset Paging and go to the next page" and I can get this working, but what I need is to display 6 products on one page. I use PHP and MySQL with Dreamweaver. No doubt it something to do with $mysql_num_row, but is there a simple way in Dreamweaver to do this? If not, anyone know the syntax of PHP to get this working?

    Hope you can help me.

    Concerning

    Nikki

    Wednesday, August 30, 2006 04:23:37 p, Nikki Cade wrote
    Macromedia.Dreamweaver.AppDev:

    > I created a recordset and returns 6 rows of data when tested.
    > These are products of a catalog online and I would like to
    > show 6 products per page. I created 6 areas and added the
    > data dynamically and what happens, is that the first line of data is
    > displays 6 times. Is it possible to display all the lines on one
    > page? I read "Recordset Paging and go to the next page" and I
    > can get this job, but what I need is to display 6 products on a
    > page. I use PHP and MySQL with Dreamweaver. No doubt it
    > something to do with $mysql_num_row, but is there a simple way
    > Dreamweaver to do this?

    Instead of 6 regions on a single page, put a single region and fill
    It is with the database fields. Then select the entire region, including
    any container and add a repeat region. Tell him you want 6 records by
    page. You can then add the Recordset paging.

  • Read attribute values of criteria see the Date in ViewObjectImpl

    Hello

    I have a View object and have added a view Criteiria that has a bunch of search items added to it. I also added a Date column to the criteria for the view that has the "between".

    Now, I'm reading all the Research Articles coming from the JSF page (query Panel + table). When I try to read the date column it give me only the first Date (what date). How can I get the date 'To' too?

    ViewCriteria vc = this.getViewCriteriaManager () .getViewCriteria ("ReportVOCriteria");

    The list l = vc.getRows ();

    VCR = (ViewCriteriaRow) l.get ViewCriteriaRow (0);

    String myDate = vcr.getAttribute("MyDateColumn").toString ();

    This code could give me a single value, how do the two values 'From' and 'To '?

    JDev 11.1.2.4

    Check the api ViewCriteriaRow (Oracle Fusion Middleware Java QAnywhere for Oracle ADF Model)

    First try to call ViewCriteriaRow (Oracle Fusion Middleware Java QAnywhere for Oracle ADF Model)

    getCriteriaItemArray and check the table to display the elements of criteria. If you get only one item for him between the criteria, check the element by calling the getValues method ViewCriteriaItem (Oracle Fusion Middleware Java QAnywhere for Oracle ADF Model) which should give you all the values.

    Timo

  • Photos of El Capitan only sort by date added, no date of the photo.  Can I change this?

    I use Photos (not iPhoto) and find it very annoying that the fate apparently immutable are default by date added.  I use multiple cameras and it does everything just for me.

    and find it very annoying that the apparently immutable fate are default by date added.

    Only the album 'Pictures' is sorted by date added. The goal is to help you find your most recent matter quickly.

    View Photos of the library (Moments, Collections, years) is sorted by the date of capture.

    Any other album is sorted by the date of capture.

    You can create your own album 'All the Photos' as a smart album and ascending or descending sorting, for example like this:

Maybe you are looking for

  • Format duration takes over my own format

    Hi all The process is fairly simple. I use a cell because of the multiplication of 2 other cells. One is a price. The other is a duration in days, resulting in a difference of dates. I want to set the format of my own for the result of the cell, but

  • Question about reversal of pin of the PXI-6562

    I have a PXI-6562 card with cable which is the note. Note  If you create a customized with connector wiring solution (779157 - 01) and cable (192744-01), the NI 656 x pinout is reversed at the level of the end fitting. For example, the signal on pin

  • Error: "this application has requested enforcement in an unusual way."

    I don't know if it was caused by a recent update of Windows Vista but my laptop Toshiba Satellite computer has worked fine when he began to display a dialog box stating "Microsoft Visual C++ Runtime Library... This application has requested execution

  • HP proliant ML 310 problem with raid

    Hello I have a problem with replacement hard 160 GB of drive for raid 1. RAID consists of 2 160 GB drives. Local dealer told me that some configurations must take place in the BIOS and set the new drive. could you please send me some if available doc

  • EMP 11.1.2.4: Cube refresh error: Application %s does not exist

    Hi allWe had applied the corrective update EMP 11.1.2.4 on EMP 11.1.2.3.While doing post task upgrade planning I found that a single planning application has been corrupted as follows,While in the epm 123 someone changes the password for the admin, a