Increasing date through Expression builder?

Hi,
we have requirement of validating the date range.
The date entered should not be greater that 3 days of current(todays) date and min date should be be less that last three days.
I am using Daterangevalidator and i need to know how to set a EL expression to satisfy the above condition.
we have a current date in El coming from "#{bindings.startedDate.inputValue}" now i just want to know how to increase and decrease the days using EL.
<af:validateDateTimeRange
maximum="#{bindings.startedDate.inputValue + 3}"
     minimum="#{bindings.startedDate.inputValue - 3}"
The above code is not working.
Edited by: user11285758 on Apr 25, 2013 7:45 PM

Thanks for your reply.....
When I put above code
<af:validateDateTimeRange
maximum="#{bindings.startedDate.inputValue + 259200000}"
minimum="#{bindings.startedDate.inputValue - 259200000}" />
and deploy the application to server. page is failing while loading at that particular code. Please find error below
ERROR:
]] Root cause of ServletException.
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key el.convert
at java.util.ResourceBundle.getObject(ResourceBundle.java:393)
at java.util.ResourceBundle.getString(ResourceBundle.java:353)
at com.sun.el.util.MessageFactory.getArray(MessageFactory.java:86)
at com.sun.el.util.MessageFactory.get(MessageFactory.java:66)
at com.sun.el.lang.ELArithmetic.coerce(ELArithmetic.java:384)
Truncated. see log file for complete stacktrace
Any idea what needs to be done to fix the issue?
Edited by: user11285758 on Apr 28, 2013 9:38 PM
Edited by: user11285758 on Apr 28, 2013 9:39 PM

Similar Messages

  • How to use TRUNC function with dates in Expression Builder in OBIEE.

    Hi There,
    How to use TRUNC function with dates in Expression Builder in OBIEE.
    TRUNC (SYSDATE, 'MM') returns '07/01/2010' where sysdate is '07/15/2010' in SQL. I need to use the same thing in expression builder in BMM layer logical column.
    Thanks in advance

    use this instead:
    TIMESTAMPADD(SQL_TSI_DAY, ( DAYOFMONTH(CURRENT_DATE) * -1) + 1, CURRENT_DATE)

  • How to find the size of an arrayList through Expression Builder.

    Hai OTN,
    How to find the size of an arrayList through Expression. I have a managed bean in View Scope.I am using Jdeveloper 11.1.1.2 with ADF Faces components.
    Managed Bean :
    ArrayList<IllnessEmployeesObj> employeeGridList =
    new ArrayList<IllnessEmployeesObj>();
    JSPX :
    Value="#{viewScope.PandIVH.employeeGridList.size}"
    Error : java.lang.NumberFormatException: For input string: "size"

    Hi Dinil,
    I have provided you with a sample that would show you the how you can get the size of an arraylist
    the sample has a page untitled1 and a bean named test.
    I have run in on jdev 11.1.2 and it is ok, it will be ok on 11.1.3
    after running the sample you will see the 2.
    please remember that you must add the JSTL taglib on the viewcontroller.
    just right click on viewcontroller, go to tag lib select the jstl.
    page
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>untitled1</title>
    </head>
    <body>
    <h:form>
    <h:outputText value="#{fn:length(test.a)}"/>
    </h:form>
    </body>
    </html>
    </f:view>
    bean
    import java.util.ArrayList;
    public class Test {
    public Test() {
    a= new ArrayList();
    Object o=new Object();
    a.add(o);
    a.add(o);
    ArrayList a;
    public void setA(ArrayList a) {
    this.a = a;
    public ArrayList getA() {
    return a;
    I hope this sample came handy.
    regards,

  • Compare Date in Expression Builder

    Hallo,
    I'm trying to build the following sql:
    select * from (select * from TABLE1 where CODE =#myCode AND EFFECTIVE_DATE <=#myDate AND EFFECTIVE_DATE >=
    ADD_MONTHS(#myDate,(-1)*#ageMaxMonth) ORDER BY EFFECTIVE_DATE DESC ) WHERE ROWNUM < 2
    Vector args = new Vector();
    args.add(myCode);
    args.add(myDate);
    args.add(ageMaxMonth);
    ExpressionBuilder expBuilder = raq.getExpressionBuilder();
    Expression exp = expBuilder.get("myCode").equal(expBuilder.getParameter("myCode"));
    exp.and(expBuilder.get("effectiveDate").lessThanEqual(expBuilder.getParameter("myDate")));
    exp.and(expBuilder.get("effectiveDate").greaterThanEqual(expBuilder.getParameter("myDate").addMonths(ageMaxMonth.intValue() * -1)));
    raq.setSelectionCriteria(exp);
    raq.addDescendingOrdering("creationDate");
    raq.addArgument("myCode");
    raq.addArgument("myDate");
    raq.addArgument("ageMaxMonth");
    // Include rownum
    raq.setFirstResult(1);
    raq.setMaxRows(1);
    raq.setRedirector(new OracleRowNumRedirector());
    Vector vectors= (Vector) uow.executeQuery(raq, args);
    The request ist not working. Im get the entries where the effectiveDate EFFECTIVE_DATE <=
    ADD_MONTHS(#myDate,(-1)*#ageMaxMonth)
    Thanks
    Edited by: user11344339 on 25.01.2013 00:25

    cdelahun wrote:
    It maybe a cut and paste error, but the code shown is not setting exp to the new exp:
    exp =exp.and(expBuilder.get("effectiveDate").lessThanEqual(expBuilder.getParameter("myDate")));
    exp = exp.and(expBuilder.get("effectiveDate").greaterThanEqual(expBuilder.getParameter("myDate").addMonths(ageMaxMonth.intValue() * -1)));
    raq.setSelectionCriteria(exp);
    If this is not a cut and paste error, it would result in the effectiveDate range restriction not being included in the where clause at all.Hello,
    Thanks, this was a part of the problem. the generated SQL is now Ok and the query is working for the object already persisted in the Database.
    But for the Objects in the cache I’m still get records where the ‘effectiveDate’ <= ADD_MONTHS(mydate, ageMaxMonth *-1)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Compare only DATE portion of a datetime field in Expression builder

    Hi! All,
    This may be a simple question, but I couldn't find the answer. I have a query where I want to say :
    Expression exp = exp1.get("startDateTime").equal(pDate);
    here pDate is a java.util.Date class with a time stamp.
    I wish to basically compare just the DATE portion of the value stored in the data base with only the DATE portion of "pDate" and ignore the time component.
    How do I do this in expression builder?
    By the way we are on Toplink 9.0.4.5
    Thanks

    There are a couple of ways to accomplish this. You could use between(beginningOfDay,endOfDay) where beginning of day is 12:00:00am on the date specified in pDate and end of day is 11:59:59pm on pDate. Or you could consider using a combination of dateName(), datePart(), and/or truncateDate() expressions to compare at the day, month, year level. I am not sure which would give you better performance, so you might need to do some testing to verify.
    In the first case, create beginningOfDay and endOfDay based upon the date housed in pDate. Then:
    Expression selectionCriteria = exp1.get("startDateTime").between(beginningOfDay,endOfDay);
    In the second case, there would be a little more code to write:
    Expression startDateTimeExp = exp1.get("startDateTime");
    Expression dayExp = startDateTimeExp.datePart("day");
    Expression monthExp = startDateTimeExp.datePart("month");
    Expression yearExp = startDateTimeExp.datePart("year");
    int desiredDay = get day of month from pDate;
    int desiredMonth = get month of year from pDate;
    int desiredYear = get year from pDate;
    Expression selectionCriteria = dayExp.equal(desiredDay).and(monthExp.equal(desiredMonth)).and(yearExp.equal(desiredYear));
    Check out the TopLink API docs on the Expression class for more details on what these Expression building methods do : http://download-west.oracle.com/docs/cd/B10464_05/web.904/b10491/index.html
    Hope that helps,
    Doug

  • Max date by month in expression builder

    Hello
    I'd need to create a new logical column and use the expression builder to make this column return only the last day of each month. I know at answers level I can write something like this in the formulas: Max(Date by month). However I can't do that in expression builder as it doesn't like the word 'by'..
    Is there a way to get it done?
    Thanks in advance!

    Hello,
    The max(date) should work in logical layer. As when you pull in month it automatically groups by month.
    thanks,
    deep

  • Expression builder in BPEL

    Im trying to manipulate a file name at runtime. Right now I have the inbound header mapped to the outbound header so that the file gets to its destination with a dynamic filename. We are picking up multiple files Ex. KL* and the customer wants the same file name as was picked up. So anyway now they want it picked up as a .dat file and dropped off as .txt
    I am lokoing through the expression builder via jdeveloper and see there are many funtions. From the looks of it there is something to modify this extension i want to change but im having a hard time finding one or documentation explaining what each of these functions do
    any help please

    Well assuming the below would be my Xpath statement because there is no statement in here that says read a specific file.txt it is read in in dynamic what i mean is we say pick up DEF*.dat so we want any DEF.dat to get read in but at the same time we want the original name stay on the file as it gets processed. So we may have DEF123, DEF456, DEF789 get read in but they will keep their file names as going through
    <variable name="Inbound_Head" messageType="ns3:InboundHeader_msg"/>
    So first off when creating variables i never knew there was a way to make a "temp variable" so if I could create a "temp" one then
    concat(substring(bpws:getVariableData('gdotltest.dat')), 1, string-length(ns3:InboundHeader_msg('gdotl.dat')) -3 '.dat')
    ok and then when you are saying
    "First save your fileName " Are you saying the name as the file name i want as in right now it is gdotltest.dat
    are you saying assign the variable for ns3:InboundHeader_msg as 'gdotltest.dat
    I am sort of seeing where you want to to go with this just help me out a little more if you could
    So i got this variable that is associated with DEF*.dat filename right
    Ex. ns3:InboundHeader_msg = DEF*.dat
    So then i want to create a temp variable name something like ns7:InboundHeader_msg_TempVar <--------- just saying for example correct me on any syntax error and im going to want to associate this variable i made up with DEF*.txt so that when my bpel interacts with this hmmmmmmm thinking about this now how will this keep the dynamic file naming convention still going if now im associating a new variable with a file coming throguht that is suppose to keeps it s name ? Sorry to sound confusing but explain one last time how we are keep the first half of the file name dynamic and making the .dat or .txt or .doc unique to just output as .dat ?

  • Expression Builder: convert string to number

    Hi all,
    I'm having trouble building a field validation rule for bank account numbers.
    The numbers have 12 positions, so I cannot use a string or text number.
    The validation rule to be implemented is that the last two digits are calculated based on the first 10 (modulo 97).
    However, when I use the Mid function to pick the first characters, I am unable to do any calculations on it. Apparently, the string to number conversion doesn't work (it should work when I read the manual, as it says that when using an operator between two data types, the second type is converted to the first (cf. example of 1234+abcd (should result in 1234 as to the manual))). So I tried '1*Mid(...)' or '0+Mid(...)'. Syntactically the expression builder accepts it and I can save it. BUT when I change the particular value on the screen, it gives me an SSO error (not the Field Validation error message I entered).
    Why isn't there simply a function ToNumber (like ToChar)????? How could I workaround this?
    Any input very welcome!
    Frederik

    Apparently, I was a bit confused when typing the first sentence, it should be:
    The numbers have 12 positions, so I cannot use an integer or number data type, but have to use String.

  • Error while Loading data through .csv file

    Hi,
    I am getting below date error when loading data through into Olap tables through .csv file.
    Data stored in .csv is 20071113121100.
    TRANSF_1_1_1> CMN_1761 Timestamp Event: [Mon Mar 29 15:06:17 2010]
    TRANSF_1_1_1> TE_7007 Transformation Evaluation Error [<<Expression Error>> [TO_DATE]: invalid string for converting to Date
    ... t:TO_DATE(u:'2.00711E+13',u:'YYYYMMDDHH24MISS')]
    TRANSF_1_1_1> CMN_1761 Timestamp Event: [Mon Mar 29 15:06:17 2010]
    TRANSF_1_1_1> TT_11132 Transformation [Exp_FILE_CHNL_TYPE] had an error evaluating output column [CREATED_ON_DT_OUT]. Error message is [<<Expression Error>> [TO_DATE]: invalid string for converting to Date
    ... t:TO_DATE(u:'2.00711E+13',u:'YYYYMMDDHH24MISS')].
    TRANSF_1_1_1> CMN_1761 Timestamp Event: [Mon Mar 29 15:06:17 2010]
    TRANSF_1_1_1> TT_11019 There is an error in the port [CREATED_ON_DT_OUT]: The default value for the port is set to: ERROR(<<Expression Error>> [ERROR]: transformation error
    ... nl:ERROR(u:'transformation error')).
    TRANSF_1_1_1> CMN_1761 Timestamp Event: [Mon Mar 29 15:06:17 2010]
    TRANSF_1_1_1> TT_11021 An error occurred moving data from the transformation Exp_FILE_CHNL_TYPE: to the transformation W_CHNL_TYPE_DS.
    TRANSF_1_1_1> CMN_1761 Timestamp Event: [Mon Mar 29 15:06:17 2010]
    TRANSF_1_1_1> CMN_1086 Exp_FILE_CHNL_TYPE: Number of errors exceeded threshold [1].
    Any help is greatly appreciated.
    Thanks,
    Poojak

    1) Wrong format, you wont get much support loading OLAP cubes in here I think.
    2) Has your CSV file been anywhere near excel by chance the conversion of 20071113121100 to 2.00711E+13 looks very much like what I see when Excel has an invalid number mask / precision specified for a cell.
    *** We are using EBS. File was already generated by consultants through SQL query. Getting error while loading though Informatica. Target table is setup as date datatype and source is String(19).
    Expression in Informatica is setup as below.
    IIF(ISNULL(CREATED_ON_DT), NULL, TO_DATE(CREATED_ON_DT, 'YYYYMMDDHH24MISS'))
    Thanks,
    Poojak

  • Logical SQL about Expression Builder

    Dear all
    I am Michel.
    When I was always trouble,
    everyone will go to support this Forum, I am glad.
    I want to fix Logical SQL about Expression Builder of Oracle BI 11.1.1.3.
    In detail, Business each year, fiscal year you want to make is to display
    the beginning of the fiscal year of April 1, always, the data,
    "OUTPUT_DATE" from April until March the following year.
    Currently being output error is as follows.
    :[nQSError: 22020] Function Subtring ( argument 1) does not support non-text types. (HY000)
    I want to fix logical SQL is as follows.
    case when substring("app_support"."TABLE_NAME"."OUTPUT_DATE" from 4 for 5)
    in ('04','05','06','07','08','09','10','11','12')
    then Cast
         Concat
    Substring(
                   Cast(
                        "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
              FROM 4 for 8
         '04-01'
    AS DATE
    when substring("app_support"."TABLE_NAME"."OUTPUT_DATE" from 4 for 5)
    in ('01','02','03')
    then timestampadd(SQL_TSI_YEAR,-1,
         Cast
         Concat
              Substring(
                   Cast(
                       "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
                   FROM 4 for 8
              '04-01'
    AS DATE
    For reference, logical SQL follows,
    there is no error, and it is operating normally.
    Cast
         Concat(
              Substring(
                   Cast(
                        "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
              FROM 0 for 5
         '-01')
    AS DATE
    I will grad to reply message.
    Thanks and regards.

    Dear Fame and all
    Hello.Thanks you for reply.
    Hi,
    You Missed END key word in the statement.Sorry,I mistake copy & paste only.
    So,The problem is still not resolved.
    The following shows, that the error has been corrected in the first message.
    Dear all
    I am Michel.
    When I was always trouble,
    everyone will go to support this Forum, I am glad.
    I want to fix Logical SQL about Expression Builder of Oracle BI 11.1.1.3.
    In detail, Business each year, fiscal year you want to make is to display
    the beginning of the fiscal year of April 1, always, the data,
    "OUTPUT_DATE" from April until March the following year.
    Currently being output error is as follows.
    :[nQSError: 22020] Function Subtring ( argument 1) does not support non-text types. (HY000)
    I want to fix logical SQL is as follows.
    case when substring("app_support"."TABLE_NAME"."OUTPUT_DATE" from 4 for 5)
    in ('04','05','06','07','08','09','10','11','12')
    then Cast
    Concat
    Substring(
    Cast(
    "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
    FROM 4 for 8
    '04-01'
    AS DATE
    when substring("app_support"."TABLE_NAME"."OUTPUT_DATE" from 4 for 5)
    in ('01','02','03')
    then timestampadd(SQL_TSI_YEAR,-1,
    Cast
    Concat
    Substring(
    Cast(
        "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
    FROM 4 for 8
    '04-01'
    AS DATE
    end
    For reference, logical SQL follows,
    there is no error, and it is operating normally.
    Cast
    Concat(
    Substring(
    Cast(
    "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
    FROM 0 for 5
    '-01')
    AS DATE
    I will grad to reply message.
    Thanks and regards.

  • Object type mappings in expression builder

    Hi,
    I'm trying to use expression builder to give me a query returning all instances of an object with a particular foreign key, and where 'active' = true.
    'active' is a CHAR field in the database with values 'T' or 'F' and this is mapped to a Boolean in workbench as true and false.
    All works fine in normal operations, retrieving and writing the data.
    I've written the expression as
    myId EQUAL arg
    AND
    active EQUAL 'true'
    where 'true' is a literal of type Boolean.
    Unfortunately, running this query generates an error that no mapping exists for 'true'.
    I've also tried changing it to
    active EQUAL 'T'
    where 'T' is a literal of type String.
    This also generates an error.
    It seems to me as though the object type mapping is confusing the expression builder and it can't generate the sql correctly.
    Any ideas?

    Can you post the specific version of TopLink, the exact code you are using to construct and execute your query, as well as the error message with stack trace. With these items we should be able to provide an answer for you.
    Doug

  • Validate Filter in Expression Builder of a Join Node

    Validating a filter query in the expression builder of a Join Node seems to take abnormally long.
    I'm mining a star schema with 1 fact table (750million rows) and 4 dimension tables. The join node merges facts and dimensions on a subset of the data that is specified in the filter query. The query is pretty simple:
    SUBSTR("L_PRESCRIBABLE_ITEM"."BNF_CODE" , 1,7 ) IN ('0601011','0601012')
    AND "L_LAST_DAY_TIME"."CALENDAR_YEAR" = '2010'
    When I press 'validate' it takes about 20 minutes to validate the syntax. When this completes successfully, when I press the OK button to get back to the Join Node, it seems to validate it for a second time, again taking about 20 minutes to complete.
    Is this something to do with the validation doing its processing on the raw data (i.e. the 750m rows x 4 dimension tables), rather than simply validating the structure of the query syntax? If so why is it doing it twice (not inculding the time taken to actually run the node).
    Cheers
    Brad
    Using Data Mining in SQL Developer 3.0.04

    Hi Brad,
    Actually the EA2 has an improvement but the final fix which uses strictly a parse validation, will be not be out till the next SQL Dev 3.1 release after EA2.
    Thanks, Mark

  • How to connect oracle data through BlazeDS in flex 4

    How to connect oracle data through BlazeDS in flex 4

    Hi
                   If u want to connect to the database oracle just paste the Ojdbc14.jar file into the lib folder of blazeds project..
                             Normally blazeds distribution version contains blazeds.war file... upload that war file to the tomcat or any other application server..
                          u will get the build path and in lib folder paste the ojdbc14.jar file to connect to the oracle and do u r stuff at server side java ....
                      if this will reslove ur problem please mark as answered..

  • Bw 7.0 uploading data through r3

    hi all ,
                  can anybody plz send me any document or any snap short for uploading data through r3 at this time i make the connection between r3 and bw system
    and create source system plz tell me the procedure for this
    thanks.

    dear Ankit,
    please refer to the following link of best practices:
    http://help.sap.com/bp_biv270/html/BW/I08_EN_DE.htm
    on this page, click on the BI connectivity link in the building blocks. This doc will give u a detailed step by step approach for your problem.
    hope it helps...

  • Expression Builder In Oracle Rule Authoe

    Hi,
    I am using expression builder for making this kind of expression:
    x = y* (new Double(.02))
    where x and y are Double.
    after inserting the variables and operator, validation always fails showing the following message:
    Cannot perform operation. 'RUL-01726: Data type operator for *, at position 10: java.lang.Double * java.lang.Double '
    Please tell me where i am going wrong. It's very urgent.

    Thanks for the reply Phil.
    I think that when I am updating datamodel, it is updating every thing in data model i.e. variables, constraints, functions, facts everything.
    Do you have knowledge of any method in the API which updates only variables??
    Also, i followed a different methodolgy be using RuleSession. have a look at code snippet:
    String rsrl ;
    * Double testValue = 6000.0;*
    * Double discount = new Double(0);*
    * try {*
    * rsrl = dict.ruleSetRL( ruleSetName );*
    * String dmrl = dict.dataModelRL();*
    * RuleSession session = new RuleSession();*
    * session.executeRuleset( dmrl );*
    * session.executeRuleset( rsrl );*
    * discount = (Double)session.callFunctionWithArgument("DM.calculateDiscount",testValue);*
    * System.out.println(" Discount "+discount);*
    * } catch (Exception e) {*
    * e.printStackTrace();*
    Here instead of updating dataModel i am executing ruleSet using session and callingFunction to calculate discount.
    Now if disocunt is populated independent of any other vairable (e.g. discount = 10.0d instead of discount = 10.0*salesValue)
    then it should work. But if discount is dependent on some variable (which has to be global Variable) then it would not populate it.
    This is what i have thought.
    But the above code snippets always give following exception :
    oracle.rules.rl.exceptions.InvocationException: wrong argument type in function or method invocation
    even when function takes arguments in my dictionary.
    Your help is much awaited!! Thanks in advance.

Maybe you are looking for

  • Retrieve path from File Name

    Hello, I have a string that contains a full FileName; i.e., The path and the file name. How can I get just the path out of that string? I tried "File(FileName.path)" but it returned something like "0000 temp" Seemingly, that only works on a file obje

  • How to put my java applet application inside a browser

    currently I have a java applet appilcation but it pops-out outside the browser. does anyone can show me how to embed it on my browser

  • My iphone got stuck while downloading IOS8

    While i was downloading IOS 8 on my Iphone 5 the screen after downloading the software it rebooted and then the apple icon with a line bar showing the progress has stopped in middle ( 50% ) , please help

  • Partial page rendering making the transaction very slow

    Hello, I have partial page rendering enabled to 3 radio buttons in a page. Whenever i click a radio button, its taking around 15 to 20 seconds to finish the transaction and select the radio button. Not sure how to make it react faster. Any advice? Th

  • Do I need install web analysis on client machine?

    I have installed web analysis in the server, to let the user to access web analysis, should I also install web analysis in the user's machine, or just let them access the web analysis URL, http//hostname:16000/webanalysis ?