Apex: button to add dynamic date and user for the article page

[warning... post newbie]

I have a simple table of questions and actions.

users change/update records using the form on a table with the report.

There is a comments column to record the latest updates; users must add their name and the date at the top.

I am currently using a button that calls a dynamic action to execute javascript to insert the date and the user at the top of the text in the field comments (UPDATES_NEW_ON_TOP)

problems:

1 Insert date works on firefox/chrome but not IE

2. can't seem to find the right code to insert the currently logged in user name

extract javascript below...

Notes:

-After reviewing the packaged applications I see more elegant ways to do this but we are going the long way to learn stuff

-the JavaScript below is probably very poorly formed - apologies if it upsets anyones sensitivities of coding

-open to any means to achieve the desired result

beer on me for any assistance that you can give

var d = new Date();

var monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",]

"Jul", "Aug", "Sep", "Oct", "Nov", "December"];

document.getElementById("P3_UPDATES_NEW_ON_TOP").innerHTML =.

d.getDate () + ' - ' +.

monthNames [d.getMonth ()] + ' - ' +.

"" d.getFullYear () + ": [ID] +.

String.fromCharCode(0)) (13) + string.fromCharCode(0)) (13) + P3_UPDATES_NEW_ON_TOP.value;

;

Thank you all for your contributions and redirects

Tags: Database

Similar Questions

  • Can I add an another logon user, for the finger swipe SimplePass 2012?

    Can I add an another logon user, for the finger swipe SimplePass 2012? I have an account, connect you with SimplePass 2012, but my wife does not work! I want so she is able to use my computer, but, to do so, she had have it me slide all the time! But, if it had its own log-in, it could slip into her own! If possible, very well! If not, then not much!

    SimplePass is a HP product, not a Windows utility. I recommend that you check the faq from HP.

  • Date and days for the entire year come in the column

    Hi all

    I have 2 column 1 is the Date and day 2

    And I have a button, I need when I press enter then his show all the year date in the date and day column in the column of day for example

    Date - day+.
    * 1 - jan - 2009 - Thursday *.
    * 2 - jan - 2009 - Friday *.
    * 3 - jan - 2009 - Saturday *.



    And like on

    I hope that you guys understand

    Concerning

    Wasim Ismail

    Hai,

    This means, you must fill in the block record multi that has 2 columns (1 is the date, and the other is updated.).

    For this try this in the trigger WHEN BUTTON PRESSED the button.

    DECLARE
         Dt_Date DATE;
    BEGIN
         GO_BLOCK ('');
         CLEAR_BLOCK(NO_VALIDATE);
         FIRST_RECORD;
         Dt_Date := TO_DATE('01-JAN-2009');
         LOOP
              :.TI_DATE := TO_CHAR(Dt_Date, 'DD-MON-YYYY');
              :.TI_DAY  := TO_CHAR(Dt_Date, 'DAY');
              EXIT WHEN TO_CHAR(Dt_Date, 'YYYY') <> TO_CHAR(Dt_Date + 1, 'YYYY');   -- If next year reaches, exit from the loop.
              Dt_Date := Dt_Date + 1;
              NEXT_RECORD;
         END LOOP;
    END;          
    

    Kind regards

    Manu.

    If this answer is useful or appropriate, please mark. Thank you.

  • 2D Array element 1 duplicate an int and the other Date and time for the output to a file

    Try to change the example labview Agilent 34401 acquire and graph - SW Triggered.vi

    to display the data in a file with a date/time stamp, display things in a file delimited by commas, it's very simple in PHP, C, C++, and I heard this thing of labview was great fast tool but I work on this simple mod for 5 hours now and still cannot get this to work.

    I have attached my example updated, but I can't seem to get this thing to convert the date and time to something that can go in the same array as the data...


  • date of update of the article page field

    Hi all

    I'm trying to update a date field in a table. It looks like something that should be very simple, but apparently it does not work for me.

    It's trying to do: go look for a date on a DATE element (by using the date picker), add 30 days to that date and then update a date_field on my_table with the new date.

    I tried a lot of different things, but I keep getting a NULL value or an error during the processing of the page.

    Things I've tried:

    declare

    date date1: =: P2_MYDATE + 30;

    Start

    -Update my_table set date_field = date1 where ROW_ID =: P2_ROW_ID;

    -Update my_table set date_field = to_date(date1,'dd-mm-yy') where ROW_ID =: P2_ROW_ID;

    -Update my_table set date_field = to_date (to_char(date1,'dd-mm-yy'), 'dd-mm-yy') where ROW_ID =: P2_ROW_ID;

    None of the above works so obviously I must be missing something

    Any help is appreciated.

    I guess the question is at the entrance that you pass. To debug you can change your code as shown below. In the code below, I assumed the P2_ROW_ID input is an INTEGER data type. If his thing then please change the declaration of the variable input_rowid as a result.

    declare
      input_date    date;
      input_rowid   integer;
      invalid_input exception;
      error_message varchar2(4000);
    begin
      input_date  := :P2_MYDATE;
      input_rowid := :P2_ROW_ID;
      if input_date is null or input_rowid is null then
         raise invalid_input;
      else
         update my_table
            set date_field = input_date + 30
          where row_id = input_rowid;
      end if
    exception
      when invalid_input then
        error_message := 'User input is invalid' || chr(10);
        if input_date is null then
           error_message := error_message || 'P2_MYDATE is NULL' || chr(10);
        end if;
        if input_rowid is null then
           error_message := error_message || 'P2_ROW_ID is NULL' || chr(10);
        end if;
        raise_application_error(-20001, error_message);
    end;
    /
    
  • Trapping and overprint and separator for the export page.

    Hello

    I am the design of a hardcover book and did not export anything of this magnitude before, I wanted to ask you if I should consider applying all the settings of the document in terms of overprinting and trapping.

    In addition, we have many examples where images and color objects meet at the center of the book, I export single pages with purge and the printer has referenced the separation, and I wanted to ask if I need to separate the pages where we have pictures and color along the Center and manually add and apply the purge prior to export.

    Thank you so much in advance...

    Nothing in your screenshot must be set for a recovery, especially white. There is nothing here that requires any sort of special treatment on your part.

  • How to display the date and time for the date fields in SQL Workshop

    The workshop of the Apex SQL always truncates the time of date fields. Is it possible to change the default displayed date format / time fields?

    I would not advise to make direct updates to the table wwv_flows or any other object of the apex.

    Change here Home > Application Builder > Application XXX > shared components > change attributes if necessary globalization.

    See you soon

    Ben
    http://www.munkyben.WordPress.com
    Don't forget to mark the answers useful or correct ;)

  • A button that doesn't stop and audio for the current scene (not to stop all sounds)

    Basically, I'm creating a history book, each scene has audio, I want my next button (ordered to the next scene) to stop the sounds on the current scene when you click on it so that they do not continue to the next scene.
    The action "stop all sounds" keeps the sounds on the next stages of the game.

    What should I do?

    SoundMixer.stopAll () stop not the sounds that are instantiated after executing the stopAll() method.

    But if you want more control over your sounds, they should be instantiated using actionscript.

  • How to fill out the Date and time in the OPS page CO

    Hi all

    How to generate the date current system (without using "select sysdate from dual"), in the controller OAF (processRequest) to an OAMessageDateFieldBean page?
    When I use the following code, the month is always displayed in January alone.
    In his display as a page OFA: January 26, 2009 15:46:30
    Using System.out.println: 2009-05-26 15:46:30.0

    Kindkly help me in this regard.

    Code
    OAApplicationModule am = pageContext.getApplicationModule (webBean);
    SimpleDateFormat f = new SimpleDateFormat ("yyyy-mm-dd hh: mm :"); ")
    String dateString = am.getOADBTransaction () .getCurrentDBDate () m:System.NET.SocketAddress.ToString ();

    java.sql.Date sqlDate = new Date (f.parse (dateString) .getTime ());

    DateField OAMessageDateFieldBean =
    (OAMessageDateFieldBean) webBean.findIndexedChildRecursive ("currentDate");
    dateField.setValue (pageContext, sqlDate);

    System.out.println (am.getOADBTransaction () .getCurrentDBDate (). ToString());

    Kind regards
    Joe

    Hey Joe,

    Change the line of code...

    Of

    SimpleDateFormat f = new SimpleDateFormat ("yyyy-mm-dd hh: mm :"); ")

    TO

    SimpleDateFormat f = new SimpleDateFormat ("yyyy-MM-DD hh: mm :"); ")

    It will work...

    Thank you
    Anoop

  • Dynamic PDF up to 200 images, the size of the pdf is greater, cannot save the data and images to the form

    Hi all

    My client would like to dynamic images up to 200 photos to my forms. It works very well. However, when I add images up to 35 images. I could not add images to shape more. Then I save data on the form. All the images and the data entered on the form are missing. I don't know why.

    If I add only 10 images - I can record data and images on the form. 15456 KB is the size of the pdf.  I was unable to add more photos or data on the form.

    There may be a problem the size of the pdf? How big can make a limited dynamic pdf?

    Can save us the information and images as much as we want?

    I spent two weeks to work and trying to figure out this problem. However, it is not successful.

    Help, please

    Cindy

    You must ensure that your users do not import large images.

    Therefore, you can use a script on the change event of an image field that checks the size of the data and warns the user if the file is too large.

    function formatNumber(number) {
        var num = number + '',
        x = num.split('.'),
        x1 = x[0],
        x2 = x.length > 1 ? '.' + x[1] : '',
        rgx = /(\d+)(\d{3})/;
        while (rgx.test(x1)) {
            x1 = x1.replace(rgx, '$1' + ',' + '$2');
        }
        return x1 + x2 + "KB";
    }
    
    var sizeLimit = 200, //allow upto 200KB images
      thisSize = Math.round((this.value.oneOfChild.value.length * 3 / 4) / 1024);
    
    if (sizeLimit > 0) {
      if (thisSize > sizeLimit) {
      xfa.host.messageBox("Note: With " + formatNumber(thisSize) + " the size of the imported image is greater that the recommended maximum of " + formatNumber(sizeLimit) + ".\nLarge images can cause a insufficent performance.\n\nIf possible, use images with the following recommended specs:\nFormat:\t\tPNG or JPG\nColor depth:\t8 Bit (higher is not supported)\nColor space:\tRGB (CMYK is not supported)\nFile Size:\t\t" + formatNumber(sizeLimit), "Recommended image size exceeded", 3, 0);
      }
    }
    
  • As of the 31 version, why is there still no option of Thunderbird to insert the date and time in the message that you write?

    As of the 31 version, why is there still no option of Thunderbird to QUICKLY insert the date and time in the message that you write?

    Literally, saw this option very well needed - and opportunity-"promise" for three years now, and even if there are only one or two formats that could be used, at least the option is there.

    It seems that only is to bind a Macro, and the tool to Thunderbird and do it this way.

    Joe Rotello
    [email protected]
    Skype: joerotello

    If the installation of the add-on of TimeStamp is unacceptable for see you if there is a related add-on that you that you already might have managed to convince author to add your function. The Add on more for example has many variables that can enter the body of the message that get automatically replaced with the appropriate data when you merge a message.

  • is it possible to display the Date and time in the address bar or a clock window constantly

    I need to take screenshots with date stamps and time using the script of iMacros. Everything by taking screenshots iMacro don't add taskbar windows for the date and time. It takes screenshots of browser. Is it possible to display the Date and time in the address bar or a clock within the tab browser constantly to capture the screenshot with time stamp through iMacros
    I added the big clock background Add-ons, but it is visible to new tabs.

    Badly looking for help and it will be really appreciated...

    Try this extension:

  • I can't uninstall Firefox. I tried my Add/Remove programs and have tried the intsruction given to manually run C:\Program Files\Mozilla Firefox\uninstall\helper.exe. and it won't work. Firefox is the only program that I am not able to uninstall u

    I am unable to uninstall Firefox. I have tried my add/remove programs and have tried the intsruction given to manually run C:\Program Files\Mozilla Firefox\uninstall\helper.exe. and it will not run. Firefox is the only program I am not able to uninstall using the normal methods
    

    This has happened

    Just once or twice

    today

    User Agent

    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SIMBAR = {357DAD02-321A-4E1D-8305-C8CE3D8CA934}; .NET CLR 1.0.3705; .NET CLR 1.1.4322;. Media Center PC 2.8; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152 .NET CLR 3.5.30729)

    I ' v tried running C:\Program Files\Mozilla Firefox\uninstall\helper.exe.
    It does not work.

  • Adjust the Date and time on the HP LaserJet MFP M127fn Pro?

    Hello

    Someone knows how to change the time on a LaserJet MFP M127fn Pro?

    Thanks in advance!

    Sean

    .

    Hi @SeanKaneFLA ,

    I see by your post that you would like to know how to change the date and time on the printer. I would like to help you today.

    This information was given by the manual on page 45. MFP LASERJET PRO.

    You may have configured these settings when you installed the software. You can configure these settings
    at any time by using the control of product or the HP Fax Setup Wizard panel.

    LCD control panel:
    1. on the product control panel, press the Setup button.
    2. Select the System Configuration and then select Date/time.
    3. Select the clock in 12-hour or 24-hour format.
    4. use the keypad to enter the current time and press the OK button.
    5 Select the date format.
    6 use the keypad to enter the current date and then press the OK button.
    7. Select Fax Setup, and then click Fax header.
    8 use the keypad to enter your fax number and press the OK button.
    NOTE: The maximum number of characters for the fax number is 20.
    9. use the keyboard to enter your company name or header and press the OK button.
    NOTE: The maximum number of characters for the fax header is 40.

    (Windows) HP Fax Setup Wizard

    1. click on start and then click programs.
    2. click HP, click the name of the product, and then click Fax Configuration Wizard.
    3. follow the on-screen instructions to configure fax settings.

    I hope this helps.

    Good day!
    Thank you.

  • Form Validation failure: "value is not a date and time in the format"

    Hello world

    I am facing a weird problem in my custom OAF page. I'm displaying the records of a particular table through dynamic VO and dynamic array. All records appear correctly. But when I try to click on NEXT 10 records in a table, I get the error like "FAILED FORM VALIDATION: 1000 ORG CUST BO VERSION is not a date and time in the format. Just like in the screenshot below.

    DESKTOP.JPG

    Strange part of the question, if I select the columns to display not related to this day, so I only am not facing problems. If I select only dates to display and also am not facing this problem. If I use the mixture of this type varchar2 and data, I get this error.

    I tried to change the type of data but no use.

    If we close, look at the PARTY_ID error message trying to copy its data to ORG_CUST_BO_VERSION the last column. Why what's happening clue me less. Can anyone guide me on this please?

    The problem is that you use the same name for the creation of the MessageTextInputBean inside the Table.

    The name of MessageTextInputBean make it dynamic.

    ex: -.

    OAMessageTextInputBean oamessage = (OAMessageTextInputBean) createWebBean (pageContext,

    MESSAGE_TEXT_INPUT_BEAN,

    NULL,

    'text' + columnNo);

    See you soon

    AJ

Maybe you are looking for

  • Cannot install Windows XP on Equium A200

    Hello I uninstalled vista on my laptop Equium A200. My idea was (a popular) to uninstall vista and XP, get rid of the unstable operating system (sorry, personal opinion) Of course the XP installation noted that I have no disks on my pc. I got the SAT

  • Satellite A100 - can it run Windows 64 bit (XP or Vista)?

    I know that the processors are compatible EM64T, but, as Intel says: "Intel® EM64T requires a computer with a processor, chipset, BIOS, operating system, drivers of devices and applications enabled for Intel EM64T. Processor will not operate (includi

  • TestStand blocks by "for each" loop

    TestStand crashes from time to time for unknown reasons. We believe that 'foreach' loops could be the reason. By replacing the "for each" loop with a loop and iterate using the index, the problem is solved. Is this a known problem in Teststand? Is it

  • taking the screenshot button disappeared

    I'm using Sony Live with walkman WT19a. When I push the power button (on the top of the phone), it is supposed to appear the menu 'disable', 'flight mode' and 'screenshot '. But after the update to android 4.0, 'touch screen' disappeared. What should

  • Tengo una pregunta

    Is esta mi pagina web y todo walked well what quiero pero no saber como tener foto main zapatillas y no parpadee al momento to change of pagina y solo esta information cambie are the pagina www.vas.mx.