How to set a date field to sysdate when clicking on create button ?

Hello , when the user clicks on the create button , he should see 'sysdate' by default on the date from field .. When do I add such a validation please ?
I tried adding a business rule on the entity object and set the expression as 'adf.currentdate' but it didn't work .
Any help please ? Thanks.

See
Dare to Code...: current date time groovy for ADF

Similar Messages

  • How to set the data fields column wide at sqlplus

    Dear Sir/Madam
    I would like to know how to set the data fields column wide at sqlplus
    Thanks
    Francis

    see
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch6.htm#sthref1131
    and the FORMAT clause of the COLUMN command in
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12013.htm#BACHCABF

  • How to set correct date format in OAF when column is Varchar2

    All,
    We have used personalization to render a couple of fields in OAF and these fields are date fields. However, these fields point to attribute fields which are defined as varchar2 in the VO. We would prefer not to extend the VO to change the data type to date.....what else can be done?
    See...what is happening is, upon navigating to the fields and you select a date (using the calender), the format is dd-mon-yyyy, however, if the page is either refreshed or some other page event, the format reverts to yyyy-dd-mm and we then get a form validation error.
    While we have a preference not to extend VO, I will entertain any suggestions/solutions. Thanks.

    Hi,
    Thanks a lot and thanks for your time and good solution.
    This the syntax is used for Date datatype :<?format-date:CREATION_DATE;' MON- YY'?>
    and for varchar data type <?concat(' ',/XLAAARPT/P_PERIOD_FROM)?>.
    Thanks & Regards
    Srikkanth

  • How can i enable the html:text box when clicking the html:button

    Hi,
    i have a text box which is disabled defaultly and i want to enable it when i click on submit button.
    <html:button property="new" value="new">
    <html:text property="name" disabled="true"/>
    how i will enable that text filed? please tell me?
    Thanks,
    swarupa

    try using javascript onclick attribute:
    onclick="document.form.name.disabled=false"
    m

  • How to make a text field become empty when clicked in.

    I have an input textbox, if the user clicks 'submit' and the
    box is empty, it returns "please type answer here" in the input
    box. Is there a way to make it so when the user clicks in the input
    box it will turn back to blank and be ready to type instead of
    having to select the existing text and delete it?
    Thanks :)

    yep, use the onSetFocus method.
    my_text_field_instance_name.onSetFocus = function() {
    my_text_field_instance_name.text = "";
    but be careful here, because if the user fills in there info,
    then clicks off the text field then back on, the text will
    disappear, you will need to use a combo with onKillFocus or an if
    staement.... play with it. its real simple
    corey

  • How can I write a code that triggers when clicking on Save button

    I want to hide certain fields inside my tracking list, if the login user is not part of the “Managers” group.
    To do so I want to add the following Page-load code inside a web part :-
    using (SPSite site = new SPSite(SPContext.Current.Site.Url))
    using (SPWeb web = site.OpenWeb())
    {SPGroup group = site.Groups["Managers"];
    bool isUser = site.IsCurrentUserMemberOfGroup(group.ID);
    if (isUser)
    {textbox.Visible=false;}}
    And the following custom code that triggers when saving the form :-
    using (SPSite site = new SPSite(SPContext.Current.Site.Url))
    using (SPWeb web = site.OpenWeb())
    SPList list = web.Lists["ListName"];web.AllowUnsafeUpdates = true;
    SPListItem item = list.Items[SPContext.Current.ListItem.UniqueId];
    txtTitle.Text = item["Title"] as string;item.Update();web.AllowUnsafeUpdates = false;
    But I am not sure where exactly I should add the custom code for the save button ? I tried writing it inside the Oninit method , but I got many errors as shown below:-
    So can anyone advice how i should write the web part to include the Page load & the custom save button code?
    second question in general is my above approach considered valid , i mean to hide/show list columns using web parts ?

    Hi,
    According to your post, my understanding is that you want to hide/show list columns based on specify the permission for Users, SharePoint Groups or Active Directory Groups.
    Here is a solution from CodePlex for your reference:
    SharePoint 2013 Column & View Permission
    https://sp2013columnpermission.codeplex.com/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How can I stop a JFrame from closing when clicking the close button.

    I need to display a dialog when a user attempts to close my app, giving them the option to close, minimize or cancel. How can I stop the form from closing after the user makes his selection? I have the folllowing code, but my form still closes after selecting an option:
    private void formWindowClosing(java.awt.event.WindowEvent evt) {                                  
            //An array of Strings to be used a buttons in a JOptionDialog
            String[] options = {"Close", "Minimize", "Cancel"};
            //Determines what the user wants to do
            int result = JOptionPane.showOptionDialog(null, "What to you want to do?  Close the application, minimize or cancel?", "Please select an option...", 0, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);
           //Determines what to do, depending on the user's choice
            if (result == 0) {
                //Close the application
                System.exit(0);
            } else if (result == 1) {
                //Minimize the application
                this.setState(Frame.ICONIFIED);
        }Any help would be much appreciated!

    import java.awt.event.*;
    import javax.swing.*;
    public class test extends JFrame {
         public static void main( String[] args ) {
              new test();
         public test() {
              setSize( 200, 200 );
              //the next line makes the JFrame not close
              setDefaultCloseOperation( JFrame.DO_NOTHING_ON_CLOSE );
              //now add a listener that does the trick
              addWindowListener( new WindowAdapter() {
                        public void windowClosing( WindowEvent e ) {
                             //ask the user and do whatever you wish
              setVisible( true );
    }

  • How to maintain dynamic rows with data when click on Previous button?

    Hi,
    I have 1 aspx page and divided into 3 pages using panels.Each panel has "Next" and Previous buttons
    I have created and deleted dynamic table rows when click on Add button using javascript. whenever i click on Next button it will navigate to same page of next panel.
    when i click on previous button then it goes to previous panel but whatever i have added dynamic table rows in 1st panel that got removed.
    Can u please help me for how to maintain state of dynamic table rows with entered data when click on Previous button?
    How to get dynamic table rows with entered data in previous panel when click on Previous button?
    Please find the below javascript code:
    function insertRow() {
    if (index >= 2) {
    document.getElementById('deleteRow').style.display = "inline";
    else { document.getElementById('DeleteRow').style.display = "none"; }
    var table = document.getElementById("myTable");
    var row = table.insertRow(table.rows.length);
    cell1 = row.insertCell(0);
    t1 = document.createElement("select");
    t1.options[t1.options.length] = new Option('--Select--', '0');
    t1.id = "ddlYear" + index;
    cell1.appendChild(t1);
    for (var i = 1975; i <= 2015; i++) {
    opt = document.createElement("option");
    opt.value = i;
    opt.text = i;
    t1.add(opt);
    t1.style.width = "155px";
    var cell2 = row.insertCell(1);
    t2 = document.createElement("Select");
    t2.options[t2.options.length]=new Option('--Select--','0');
    t2.options[t2.options.length]=new Option('State Board','1');
    t2.options[t2.options.length]=new Option('CBSE','2');
    t2.options[t2.options.length]=new Option('ICSE','3');
    t2.options[t2.options.length] = new Option('Others', '4');
    t2.style.width = "155px";
    t2.id = "ddlCourse" + index;
    cell2.appendChild(t2);
    var cell3 = row.insertCell(2);
    t3 = document.createElement("input");
    t3.id = "txtCity" + index;
    cell3.appendChild(t3);
    var cell4 = row.insertCell(3);
    t4 = document.createElement("input");
    t4.id = "txtInstitute" + index;
    cell4.appendChild(t4);
    var cell5 = row.insertCell(4);
    t5 = document.createElement("Select");
    t5.options[t5.options.length] = new Option('--Select--', '0');
    t5.options[t5.options.length] = new Option('English', '1');
    t5.options[t5.options.length] = new Option('Hindi', '2');
    t5.options[t5.options.length] = new Option('Telugu', '3');
    t5.options[t5.options.length] = new Option('Others', '4');
    t5.style.width = "155px";
    t5.id = "ddlMedium" + index;
    cell5.appendChild(t5);
    var cell6 = row.insertCell(5);
    t6 = document.createElement("input");
    t6.id = "txtSpecialization" + index;
    cell6.appendChild(t6);
    var cell7 = row.insertCell(6);
    t7 = document.createElement("input");
    t7.id = "txtFnl" + index;
    cell7.appendChild(t7);
    index++;
    function DeleteRow(index) {
    var table = document.getElementById("myTable");
    table.deleteRow(index);
    // if (index = 2) { alert("There is no rows added.Please add the new row"); }
    Design:
    <tr style="font-size: 12pt" id="trSecond" runat="server">
    <td colspan="3">
    <table id="myTable" width="100%" border="0">
    </table>
    <tr>
    <td colspan="3" align="right">
    <input type="button" title="Add" value="Add" onclick="insertRow();" />
    <input type="button" id="deleteRow" title="Delete" value="Delete Row" onclick="DeleteRow(this);" style="display:none" />
    </td>
    </tr>
    Thank you.

    Put the button click into an action listener and build the new frame there. The code I have below isn't exactly what you're doing (it's amazingly oversimplified), but it's probably similar enough to get your wheels turning in the right direction.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class sample
         public static void main(String[] args)
              JFrame frame = new JFrame("Sample");
              frame.setSize(400,400);
              Container content = frame.getContentPane();
              content.setLayout(new FlowLayout());
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              final JTextField text = new JTextField(10);
              content.add(text);
              JButton button = new JButton("Send");
              content.add(button);
              frame.setVisible(true);
              button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        JFrame myframe = new JFrame("Results");
                        myframe.setSize(200,200);
                        Container mycontent = myframe.getContentPane();
                        mycontent.setLayout(new FlowLayout());
                        String mytext = text.getText();
                        JLabel label = new JLabel();
                        label.setText(String.valueOf(mytext));
                        mycontent.add(label);
                        myframe.setVisible(true);
    }

  • How to set a numeric field to the difference of two dates?

    hi,
    I need to create a table with a field containing a date (by def. current date) and another numeric field whose value is to be set to the difference (in days) between the current date and the date field. Something like this.
    CREATE TABLE Tabdate
    (fdate date default sysdate,
    difference number default (sysdate-fdate))
    I get this error:
    column not allowed here
    How can I do? please help me
    thanks
    Antonio

    You cannot set field values as defaults. Create a pre-insert/update-trigger instead.

  • How to set a date range for date field ?

    Dear Experts,
    Scenario:
    I have a query in validating the date field in my BSP application. My application is for maintain infotype 0023 Other/Previous Employers online by employees in the company.
    As per our design we are maintaining the all employment details of the employee both ( with in the current company / previous employment outside the company) in the same infotype.
    Every employee will have a hiring date within the SAP HR system. We consider this date as the cutoff date between current and previous employment in our application. When the employee updating the details wia BSP page I need to check the following.
    Record inside current company: Validation that, the user should only able to enter BEGIN DATE (BEGDA)  greater than or equal HIRING DATE and END DATE(ENDDA) should be greater than FROM  DATE (BEGDA).
    Record outside current Company: Validation that, the user should only able to enter BEGIN DATE (BEGDA)  less than or equal HIRING DATE and END DATE (ENDDA) should be greater than FROM  DATE (BEGDA) and less than HIRING DATE.
    Technical Requirement:
    How to set a date range for date field, i.e. how we can limit the date range in a HTMLB date field? Can this it be achieved via standard functionality of HTMLB?
    Following is the code to describe date field in my application.
        <htmlb:inputField id= "ENDDA_NEW_IN"
                          type= "date"
                    doValidate= "TRUE"
                      showHelp= "TRUE"
                      disabled= "FALSE"
                         width= "183"
                         style= "cssTextAreadate"
                         value= "<%='99991231'%>"/>
    Thanks a lot in advance for your assistance and help.
    Cibinu2026
    Edited by: cibin kuruvilla on Nov 12, 2008 11:13 AM

    Hi,
    This functionality is known to be very important and is a key part of the next major release of the JRC planned for the first half of 2008.
    Regards,
    <p>Blair Wheadon</p>
    <p>Product Manager, Crystal Reports</p>

  • How to set default date value to a field on screen

    How to set default date value to a field on screen and allow users to modify it ....

    Hello,
    In the PAI module, you need to save the changes to the database using the command MODIFY.
    Follow an example:
    Create or change a message in database table T100. If there is no message with the number 100 in the MYMSGCLASS message class in English, it will be created. Otherwise only the text is changed.
    DATA message_wa TYPE t100.
    message_wa-sprsl = 'EN'.
    message_wa-arbgb = 'MYMSGCLASS'.
    message_wa-msgnr =  '100'.
    message_wa-text =  'Some new message ...'.
    MODIFY t100 FROM message_wa.
    Regards.

  • Setting a date field to a default value if it's left blank by the user?

    I want to set a date field by default to 31/12/2499 if the user doesn't input anything. I want to do this in WHEN-VALIDATE-ITEM trigger .
    How should my code be like please ? Is it something similar to this :
    IF :HS_HEADS.DT_TO IS NULL THEN
         HS_HEADS.DT_TO =:'31/12/2009';
    ELSIF
         ALERTS.STOP_ALERT('Date must be greater than or equal to system date', choice);
         RAISE FORM_TRIGGER_FAILURE;
    END-IF;
    Thanks.

    Isn't it too late to set default value in WHEN-VALIDATE-ITEM? It will not fire if user doesn't input anything
    I would set properties of HS_HEADS.DT_TO as following:
    Data Type = Date
    Initial Value = 31/12/2009
    Format Mask = DD/MM/YYYY
    And in WHEN-VALIDATE_ITEM just validate that date is not less then SYSDATE
    IF :HS_HEADS.DT_TO < trunc(SYSDATE) THEN
    -- alert
    RAISE FORM_TRIGGER_FAILURE;
    END IF;BTW, why do you default to hard-coded 31/12/2009? Is your application only good until end of the year?

  • How to set Mandatory Choice field while Creating Custom Task using Sharepoint Designer 2007

    Hi,
    I am new to Sharepoint development.I dont know whether i am posting  the question in Correct place.Kindly redirect me to the correct place if i am posting it in wrong place.
    I  created a custom task in Sharepoint Designer 2007 using
    Collect Data from User
    Action.
    I created a field in the task form which is of choice type and
    unchecked allow blank values
    because i  wanted that field to be a mandatory field.When i handled that task ,i was able to complete that task
    without selecting that mandatory field.But, I was expecting not to allow me to complete the task without selecting that field. Kindly  tell me how to set the choice field as mandatory.

    Hi,
    You are using SharePoint Designer 2007, so I moved the thread to the appropriate forum for MOSS 2007.
    This is by design that
    Workflow-generated form (for action Collect data from User) does not perform validation properly on drop-down choices, the workaround is to use JavaScript to perform the field validation.
    This thread has the JavaScript code can help you:
    http://social.msdn.microsoft.com/forums/en-US/sharepointworkflow/thread/0ad7fc3c-97a1-464e-ae89-c3133462dda8/
    Xue-Mei Chang

  • I am working in Adobe Acrobat 9 Pro and just created a pdf form from a MS Word document. I need to find out how to have a date field in my form which will update automatically. Can some one out there help me?

    I am working in Adobe Acrobat 9 Pro and just created a pdf form from a MS Word document. I need to find out how to have a date field in my form which will update automatically.

    Update automatically under which circumstances, exactly?

  • How to add the date field in the dso and info cube

    Hi all.
    I am new to bi 7. in the earlier version v hav to button to add the date field. but in the bi 7 der is no option so can any body tell me how to add the date field in the data targets
    Thanks & Regard
    KK

    my prob is solved
    KK

Maybe you are looking for