Omni portlet - javascript - date field problem

I want to manipulate a database date type field with javascript in omniportlet layout.
In the source tab of omniportlet I use the SQL: (it's very simple for example)
select id, to_char(enddate, 'DD/MM/YYYY HH24:MI') edate, enddate
from tlh.auctionsession
where id = 1
In the layout tab (HTML form). I write this javascript code in Repeating Section: (it's very simple for example)
<script type="text/javascript">
document.write(##EDATE##);
</script>
It's not woking. Anytime I use the ##EDATE## or ##ENDDATE## in my javascript code, It's not working.
If I put ##EDATE## of ##ENDDATE## in the HTML's body, it's display well.
I am really mad with it.
Do you have any idea? Please help me with it. Thank you very much.
Sorry for my bad English.

// custom vaildation scirpt for entered date being today or a future date;
// date format for the field;
var cDateFormat = "mm/dd/yyyy";
// convert the entered value to a date objecta;
var oEntered = util.scand(cDateFormat, event.value);
// strip down to just the year, month and day
oEntered.setFullYear(oEntered.getFullYear(), oEntered.getMonth(), oEntered.getDate());
// convert todays date to a date object;
oToday = util.scand(cDateFormat, util.printd(cDateFormat, new Date()));
// strip down to just the year, month and day
oToday.setFullYear(oToday.getFullYear(), oToday.getMonth(), oToday.getDate());
// compare the date values
if(oEntered.getTime() < oToday.getTime()) {
// error message date before today's date
app.alert("Date must be today's date or a futuer date!", 1, 0);
// set return code to error status;
event.rc = false;
// validation is assumed to be true unless the event return code value is false;
// end custom validation script;

Similar Messages

  • DATE FIELD PROBLEMS - URGENT

    I´m having trouble with FormsCentral.
    My form is running about 8 months with no problems.
    Yesterday people started to complain that the system doesn´t accept any date.
    That means the date field restricts date entries, from date dd/mm/aaaa (brazilian format) to another dd/mm/aaaa, but every date that users input in, is considered by the system as invalid, even it´s a correct and valid date right between the interval specified!
    I need Help Urgent!!!
    I depend on these forms to finish the payrol service from here.
    Thanks
    I´ll be waiting.
    Maurício Galletti
    Message was edited by: SNOWMAUSS
    It look like the system accepts just dates starting from the date of today.
    I´m testing.
    Please help.
    Thanks
    Message was edited by: SNOWMAUSS
    It looks like the system have some problem just with the date 20/10/2013?!
    I´ve fixed the problem change the interval from 20/10/2013 to another date  and used  21/10/2013 to another date and it works!
    But I think something is wrong with the 20/10/2013 date?!
    To reproduce the erros just create a new form with date feature with this exaclty configurations and the bug appears:
    I´ll keep waiting
    Message was edited by: SNOWMAUSS

    Hi
    I´ve concluded that the problem persist if the date interval starts at the
    specific date "20/10/2013". Don´t know why?!
    Look at the screen capture above, you aks for
    Thanks a lot
    image: Imagem inline 1
    Maurício P. Galletti
    Contador
    [email protected]
    ( 55 11 3331-5567
    www.cadt.com.br
    2013/10/29 Genevieve Laroche <[email protected]>
       Re: DATE FIELD PROBLEMS - URGENT  created by Genevieve Laroche<http://forums.adobe.com/people/Genevieve+Laroche>in
    FormsCentral - View the full discussion<http://forums.adobe.com/message/5797083#5797083

  • J1inqefile - Excel output - Date field problem

    Dear All,
           I am facing a problem while executing the tcode-J1IEQEFILE.
           When choosing excel file output and executing, 3 files are created. But the problem is, the value of date field in one of the files is not in date format.
        Please help me out on this regard.
    Thank you,
    S.Sridhar

    I am also facing same problem in text file as well as in Excel file also. kindly some one could help me ( Date on which Amount paid  and Date on which tax deducted).
    Thanks
    Venkat

  • Date field problem in MS Access

    Hi
    I am doing a program in which the requirement is i am storing the system date and time in a date field with name logindate, now i want to compare with that date, by taking into a string variable but it is showing an error like "data type mismatch in criteria expression", but i didn't any problem like this in using MY Sql(taking the date into the string variable and comparing).
    So i would like to know how can i compare the present sysdate with the stored date value in the databse(MS Access) for an emp id.
    Date format i am storing in to the databse is "yyyy-MM-dd HH:mm:ss", and while retriving i am getting as of my requirement but i am unable to compare only the date part(after parsing it), plz it is urgent reply asap
    can u plz send me the code.
    sasi.

    If you say a database column has SQL DATE type, then you need to bind it to a java.sql.Date.
    If your UI takes input as String, you have to convert it to a java.sql.Date first.
    Best to use java.sql.PreparedStatement and bind Dates properly. If you do that, formatting doesn't matter (as it should not).
    %

  • Filter omni portlet output data according to portal user

    We have created an omniportlet that connects to a database, and retrives some values into a defined HTML layout.
    We want to filter output data according to our portal current user name
    When we try to use portal.wwctx_api.get_user inside of omni portlet select statement fallowing error occurs.
    Error in executing Query : [ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "PORTAL.WWCTX_SSO", line 1803 ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "PORTAL.WWCTX_SSO", line 1637 ORA-06502: PL/SQL: numeric or value error ORA-06512: at "PORTAL.WWCTX_SSO", line 1865 ORA-06512: at "PORTAL.WWCTX_API", line 183 ]
    Thanks a lot

    This is because the Omniportlet is actually operating within a different context--a separate database connection from the Portal connection. We have similar issues with Java portlets. You might try creating a public parameter on the portlet, then mapping that to the system variable USER (done on the Parameters tab of the page where you deploy it--if you don't see a parameters tab, you must enable Parameters and Events at the page group properties level). I haven't tested any of this, but it should get you going in the right direction.

  • ITS Mobile Date Field Problem

    In ITS Mobile I developed a screen which contains a date field. I click question button to select a date, it opens a new screen which includes a calendar. But I can not select a date because no clickable days in new date selection screen. What can i do for this problem.
    Thanks...

    Parameters are:
    Service parameters..
    ~THEME              99
    ~TRANSACTION               LM01
    #MOBILE             This is a mobile service
    ~ITSMOBILE       1
    #SOURCES          Template search sequence
    ~SOURCES          Z_LM01,ITSMOBILE
    #POPUPS            Show popups, default is no
    ~POPUPS            1
    #ITSMOBILEDEVICEINCLUDE     include a device specific html
    ~ITSMOBILEDEVICEINCLUDE     devicesample
    #MESSAGE         SOUND Plays a background sound if a message appears
    ~ITSMOBILEMSGSOUND             1
    #SYSTEM             MODAL POPUPS Shows express mails / system messages
    ~SHOW_SYSTEM_MODAL          1
    İnternet sevice parameters (SE80)
    ~GENERATEDYNPRO     0
    ~THEME                              99
    ~TRANSACTION               LM01

  • Date Field Problem

    Hi,
    I'm new to ApEx. In my previous life I've done web development, but am not an Oracle developer, so I don't know the in's and out's or Oracle or PL/SQL.
    I have a Updated_Date field in my table which is defined as a date field. I want that field to be updated with the current date and time when a record is updated, so I created a computation to populate the field. The item on my page that refers to the Updated_Date is defined as Displays As Text (Saves State).
    I was told my our resident Oracle developer that all I needed to use was SYSDATE to populate the field, but when I use SYSDATE it only populates the date portion (not the time).
    I have searched the forum and have found several examples of code for populating the date, but when I use them they either: 1. result in an invalid month error, or only populate the date.
    What am I doing wrong?
    Thanks, Tony

    Hi Joe,
    Sorry that I wasn't clear.
    I orignally had the item set as display only (save state) as you suggested. I was getting invalid month errors then when I tried to add the time to the on the computation.
    When I saw your response I thought I needed to change the Display As on the item to date picker with a format mask, so I did. That is what caused it to begin working for me, but I didn't know it at the time, because I changed the computation and the item.
    Then, when you said a display only (save state) would work I changed my code back, but didn't completely test. I thought it was still working, but it wasn't. When I later tried to do a save it got the invalid month error again.
    So, I changed it back to Display As - date picker. That's what I meant by changing it to a date field on the page. Sorry.
    Tony

  • Alv + date field problem

    Hi All
    I have a screen with a date field and an alv grid.
    When I hit the f4 help on the date field the date does not appear.
    When I test this screen in the screen painter the date picker shows up, but when I run the program it does not, it is like something is overwritting it.
    Can anyone help with this please
    Thank you

    Hi
    setting the search help BU_DATE_CHAR didn't work.
    When I press the button on the date field or do an F4 the alv seems to get the focus. 
    Thanks anyway

  • DATE field problem in JSF code

    Hi,
    I am a newbie on JSF and working with a JSF application development. I have a problem with a data type: DATE. Here is what had happened; I tried to write a new record to a table, in my "write" paragraphs I have the following codes:
    tabelOneDataProvider.setValue("joindate", rowKey, joinDate1.getSelectedDate());
    tableOneDataProvider.commitChanges();
    The problem is when I was running the program to write a record, I got the following error:
    Cannot append new tableOne data: java.lang.RuntimeException: Number of conflicts while synchronizing: 1 SyncResolver.INSERT_ROW_CONFLICT row 1 Can't infer the SQL type to use for an instance of java.util.Date. Use setObject() with an explicit Types value to specify the type to use.
    At that point, I was trying to write a DATE value from a "calendar' component (joinDate1 field with MM/dd/yyyy format) into a field name: "joindate' (data type is DATE) in tableOne file.
    Any advice on resolving this problem? Please help me to get more knowledge on this. Thanks!

    Hi,
    You must use sql type. So instead of:
    tabelOneDataProvider.setValue("joindate", rowKey, joinDate1.getSelectedDate());
    tableOneDataProvider.commitChanges();try something like:
    java.util.Date date = joinDate1.getSelectedDate();
    java.sql.Date dateToInsert = new java.sql.Date(date.getTime());
    tabelOneDataProvider.setValue("joindate", rowKey, dateToInsert);
    tableOneDataProvider.commitChanges();best regards
    Grzegorz

  • PCR date field problem

    Hi All,
    When we open MSS PCR Forms the Date of Change field is populating in Arabic language. All other fields are fields correctly displayed.
    We are able to change the other fields except Date of Change field.
    Does anyone have a solution for this?
    Please advice.
    Regards,
    Srinivas
    Edited by: Srinivas Rao Srungarapu on Oct 14, 2008 9:39 PM

    Before saving the data to databse u should convert the dates into internal format using FM 'CONVERT_DATE_TO_INTERNAL' .
    EX:
    REPORT ZEXAMPLE.
    TABLES: MARA, MDKP.
    DATA V_DATE(30).
    SELECT * FROM MARA UP TO 100 ROWS.
      SELECT SINGLE * FROM MDKP WHERE MATNR EQ MARA-MATNR AND
                                      BEADA NE '00000000'.
      IF SY-SUBRC EQ 0.
        V_DATE = MDKP-BEADA.
        WRITE:/ 'DATE IN INTERNAL FORMAT:', V_DATE.
        CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
             EXPORTING
                  DATE_INTERNAL            = MDKP-BEADA
             IMPORTING
                  DATE_EXTERNAL            = V_DATE
             EXCEPTIONS
                  DATE_INTERNAL_IS_INVALID = 1
                  OTHERS                   = 2.
        IF SY-SUBRC EQ 0.
          WRITE:/ 'DATE NOW IN EXTERNAL FORMAT:', V_DATE.
        ENDIF.
        CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
             EXPORTING
                  DATE_EXTERNAL            = V_DATE
             IMPORTING
                  DATE_INTERNAL            = V_DATE
             EXCEPTIONS
                  DATE_EXTERNAL_IS_INVALID = 1
                  OTHERS                   = 2.
        IF SY-SUBRC EQ 0.
          WRITE:/ 'DATE NOW BACK IN INTERNAL FORMAT:', V_DATE.
          ULINE.
        ENDIF.
      ENDIF.
    ENDSELECT.

  • SAP GUI 720 (patch level 6) - Date field problem

    Hello all,
    in selection screens (like transaction IW38) some users use the F4 help and the enter key to select a date (like field "Period"): they jump with the tab key to the field, delete the current entry and then press F4 and hit the enter key in the popup to get today's date. (Reason: faster than using the mouse, they say...)
    This does not work anymore with SAP GUI version 7.20: The enter key is not working in the popup. Does anyone know a fix for this or is it intended to work this way?
    Thanks in advance for an answer!
    Best regards
    Daniel

    Thanks for your reply. No, GuiXT is not active.
    Interesting is:
    I have a PC with an older version of SAP GUI 7.20 (patch level 2). There it works as previously with 7.10 (hitting the enter key in the calendar popup window works).
    The reason is (haven't noticed that before), that in 7.20_2 the focus in the calendar popup is in the calendar itself (the lower part). In 7.20_6 the focus is on the top line, where the current date is displayed (like 29.08.2011), and the day is highlighted. The user has to press the tab key to jump from there down to the calendar, and then can press the enter key.
    Now the question is: has this been changed from patch level 2 to 6, or is it an SAP GUI option, that can be changed (and that I cannot find)??
    Best regards
    Daniel

  • Javascript , date Field change doesn't work

    I want to display the expiration date automatically as soon as I selected a date of issue but it does not work..
    <td width="190px" valign="top" class="ms-formlabel">
    <H3 class="ms-standardheader"><nobr>StartDate</nobr></H3>
    </td>
    <td width="400px" valign="top" class="ms-formbody">
    <SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New" FieldName="StartDate" __designer:bind="
    {ddwrt:DataBind('i',concat('ff2',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@StartDate')}"/>
    <Sha
    rePoint:FieldDescription runat="server" id="ff2description{$Pos}" FieldName="StartDate" ControlMode="New"/>
    </td>
    </tr>
    <tr>
    <td width="190px" valign="top" class="ms-formlabel">
    <H3 class="ms-standardheader"><nobr>EndDate</nobr></H3>
    </td>
    <td width="400px" valign="top" class="ms-formbody">
    <SharePoint:FormField runat="server" id="ff3{$Pos}" ControlMode="New" FieldName="EndDate" __designer:bind="
    {ddwrt:DataBind('i',concat('ff3',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@EndDate')}"/>
    <SharePoint:FieldDescription runat="server" id="ff3description{$Pos}" FieldName="EndDate" ControlMode="New"/>
    </td>
    </tr>
    <script type="text/javascript" src="../../JQuery/jquery.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    alert (&quot;Test&quot;);
       $(&apos;#ff2&apos;).change(function(){
       alert (&quot;Test&quot;);
           var startVal = $(this).val();
    var month = startVal.getMonth();
    var day = startVal.getDate();
    var year = startVal.getFullYear();
    year = year  + 1;
    endVal= day+&apos;/&apos;+&apos;month&apos;+&apos;/&apos;+&apos;Year&apos;;
           $(&apos;#ff3&apos;).val(endVal);
    </script>

    Hi,
    Please add the following code into the new form page. You can also add a content editor web part into the new form page and add the code into the web part.
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
    $("input[title='Start Date']").blur(function () {
    var startVal = $(this).val();
    var startDate = new Date(startVal);
    var month = startDate.getMonth() + 1;
    var day = startDate.getDate();
    var year = startDate.getFullYear() + 1;
    $("input[title='End Date']").val(month + "/" + day + "/" + year);
    </script>
    Or here is a thread talk about the similar issue for your reference:
    http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_27765240.html
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Javascript date format problem

    I want to get the current date assigned to a variable in the "YYYYMMDD" format using Javascript

    var date = new Date();
    var d  = date.getDate();
    var day = (d < 10) ? '0' + d : d;
    var m = date.getMonth() + 1;
    var month = (m < 10) ? '0' + m : m;
    var yy = date.getYear();
    var year = (yy < 1000) ? yy + 1900 : yy;
    document.write(year + month + day);btw: JavaScript is NOT Java.

  • CRVS2010 beta -  date field not display in details section

    I use Visual stdio 2010 so i install crystal report 2010 for report.
    It work fine .
    but in report detail section there is date field then it will not be display.
    alos if we do group on date field it will give error when we try to open report.
    Plese geve me possible soluction for date field problem.
    Edited by: hitesh_tatva1 on Jun 22, 2010 11:35 AM
    Edited by: Don Williams on Jun 22, 2010 7:20 AM

    Solution Found
    Don't install sp2it sucksclassic case of the cure being worse than the disease.
    Downloading and installing the SP3 redisist fixed the issue.
    This link is probably appropriate:
    https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/bobj_download/main.htm
    Software Product->select Crystal Reports
    Version->select Crystal Reports 2008
    important part
    Software Type->Utility Click Search Download the redist install.
    Not very intuitive, but you'll need to do this so you download the runtime and not the full version.
    Hope that saves you the 5 hours it took me to figure this darn thing out...I hate unintuitive products--they aren't very professional.
    +
    SAP, where do I send the bill for supporting your own product?
    I too have the same problem. Hopefully we can get a solution to this soon as the delayed release of the 2010 runtime has us in a difficult place.
    The problem: I upgraded my project to Visual Studio 2010; therefore, I upgraded to the Crystal Reports for Studio 2010 beta.
    Everything worked fine until I modified the app.config so that I could deploy the application into our test environment. We do not have Visual Studio installed in this environment, so we needed to have a Crystal Reports Runtime. According to the SAP website deployment guide, currently the only way to deploy a 2010 app is to use the 2008 runtime by modifying the app.config file to redirect the bindings.
    __Now, none of my date fields appear on the reports.__
    Just to test, in my development environment, I commented out the redirects in the app.config and the dates appeared. I uncommented the redirects so that the 2008 runtime would be used and then my dates disappeared from the report.
    Here is the entry I put into the app.config:
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.CrystalReports.Engine" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Shared" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.ReportSource" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Windows.Forms" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Enterprise.Framework" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.1100.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Enterprise.InfoStore" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.1100.0"/>
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    Your help is much appreciated.
    Thanks,
    Michael
    Edited by: SaganDraxan on Jul 16, 2010 8:23 PM

  • Date field navigator controll problem

    Hi Friends,
    Recently i have implemented the one view with the DATE field as a input field, The date field data type is sy-datum.
    When i click the date field F4 help, the new pop up will be triggered and shows the date calander. the funcitonality is correct.
    Now my use want's restrict the date field navagator with in given period only, For example the date field low value is 01/01/2010 and high value is  31/12/2010, The user want's to see the date field calander betweeen 01/01/2010 and 31/12/2010, user do not want to see the other dates.
    Can you please help about the issues. the solution is more helpful for me , if possible please provide the solution.
    Thanks & Regards
    charan

    I noticed the same behaviour. As it turns out, it IS a JHeadstart problem that causes this error to happen. When I generate a UIX paga with both an Advanced Search region and a Quick Search region, this error only happens in the Quick Search region. The Advanced Search region works fine.
    Using the FireBug extension for Firefox I noticed this difference between Advanced Search and Quick Search: Advanced Search passes on a reference to the input element into the reference variable and no error is thrown. Quick Search passes on an array of input elements and since an array doesn;t know of the select() method, an error is thrown.
    I will create a worksround for this issue by modifying the ADF JavaScript library since I now know where this error happens. Please review this situation and try and solve this.
    Thanks a lot in advance,
    Wouter van Reeven
    AMIS

Maybe you are looking for

  • Output parameters or how to return more than one value

    My RMI server retrieves a list of Strings from the database. I need to return a status code int and an array of Strings to the RMI client. Does anybody have any ideas on how to do this. The only way I have come up with is to return an array of String

  • Convert to CMYK or Export PDF?

    I am putting together a big catalog project. In previous projects I converted all images to cmyk before ripping the pdf for final press print. Since the pdf export can convert to cmyk can I leave everything as is (RGB) and do the convert on export or

  • A Problem Uninstalling & Installing Master Collection

    I seem to be stuck in a loop trying to uninstall and reinstall a copy of the Master Collection on my new MacBook Pro. I know the problem started when I used Apple's Migration Assistant to copy 250 Gb of files from my old MacBook Pro to my new one. I

  • Human Workflow-getManager() fuction

    Hi All, Currently I am working on Human work flow activity, where my requirement is ,I will be sending 'creator' through request.aslo i ll be using getManager() fuction in Human WorkFlow Activity. ids:getManager(/task:task/task:creator) my payload is

  • Connect problems to Oracle 8i using designer 6i

    I am fairly new to Oracle products. I have installed designer 6i on my win98 machine. I am trying to connect to the 8i repository on WinNT. I can successfully use tnsping80 to connect to the repository machine but when starting Designer 6i, I get ORA