Want user to enter a date

I am using Oracle 9i.
I want the user to be able to enter a date and the report runs using values that are after this user inputted date, but am unsure how to do this. I have already created a user parameter that created a drop down list for the user to select something and then the report was run based on the selection. But I also want to run a report based on the date they enter.
Sorry this is a bit rambling but is the best I can do! Any help on this would be great.
Thanks

Hi,
Create a second user input date "p_user_input_date"
make your drop down list optional .
I mean add a NULL for the date parameter list.
static list: blanc, dynamic list: append "union select '' from dual;" .
then change the query where clause....
with NVL(p_parameter_date, p_user_input_date);
regards,
CB

Similar Messages

  • I don't want to allow a user to enter a date that is before January 2014

    I don't want to allow a user to enter a date that is before January 2014. I want to restrict users from entering a date that is or prior to December 31, 2013 in a date field. Is this possible?

    Seems like it is a little more complicated just to create a new Date() object in livecycle...
    the way I found to create a new Date() object is using the dateTimeEdit pattern to be 'date{EEEE, MMMM D, YYYY}'
    then u can create a new Date
    var date1 = new Date(DateTimeField1.editValue);
    date1.getTime();
    or
    you can also click the following link and download the pdf from the blog...
    Adobe LiveCycle Designer Cookbooks by BR001: Date handling in Livecycle Designer ES forms
    using XFADate object make it easy to manipulate dates with javascript
    The XFADate object created by BR001 is very good but to be able to see if a date is prior to another date you can just add this function in the object script..
    you can add that function at line 200...
    that.isPriorTo = function(date) {
         var toDate = newDate(date);
         if (isNaN(this) || isNaN(toDate)){
              return false;
         } else{
              var interval = this.getTime() - toDate.getTime();
              if (interval > 0){
                   return false;
              } else{
                   return true;
    To use that function above you can just use this code:
    if (XFADate.newDate(dateFrom).isPriorTo(DateTo)){
         //dateFrom is prior to dateTo
    hope this help

  • How to Restrict user to enter the data in CAPS ONLY

    Hi,
    I have textinput in my page,i have to restrict the user to enter the data caps only.
    can any one help me on this.
    Karthik

    Hi,
    h1.
    I have textinput in my page,i have to restrict the user to enter the data caps only.
    -------u need to set the CSS class for this item
    Regards
    Meher Irk
    Edited by: Meher Irk on Oct 24, 2010 11:16 AM

  • How do I prompt a user to enter numeric data while a vi is running?

    I am writing a Labview vi that to calibrate angle sensors. I need to prompt the user to enter numeric or string data for the low and high angle points so the vi can then calculate the span based on these values and the a/d output differences at these two points. I can't use preset points because the angle data is resolute to 0.1 degrees, and having the user raise or lower a boom to a predefined point is not within reasonable expectation. I would be much obliged for any help that is offered.

    Build a subVI that has two numeric controls for the user to input the data (name them something appropriate like "High Angle" and "Low Angle").
    Add and "Enter" button to the front panel.
    Set the subVI preferences to include Open Front Panel When Called and Close Afterwards if Originally Closed. these are in Windows Appearance, Customize.
    Put a delay (say 50 ms) and a while loop on the block diagram to wait until someone presses the button.
    Connect your front panel controls to outputs on the connector pane.
    This will pop up a dialog type of window when you need the user to input data. And make the dialog window disappear when done. You can also add valid data checking to the subVI and whatever else you need.
    Rob

  • Restricting User to Enter Only Date Value

    Dear Expertsl,
    Can we restrict users to insert only date value (in RRMMDD format ) in a column whose data type is number,
    Note that i cannot modify the column because there are already values entered in the column and cannot delete it.
    Regards

    Try to convert it to a date in the WHEN-VALIDATE-ITEM-trigger, if it works, its a date, like
    DECLARE
      dt DATE;
    BEGIN
      dt:=TO_DATE(:THEITEM, 'MMYYYY');
    EXCEPTION
      WHEN OTHERS THEN
        -- Show error message
        -- then raise error
        RAISE FORM_TRIGGER_FAILURE;
    END;

  • Script to restrict user to enter alphanumeric data

    What's the java script code, through which user can be restricted to enter or feed both type of data; i.e. alphabets and numeric. (for postal address fields).
    I want to use this code in my JSP page.
    Usman

    Hiii,
    Please make use of onKeypress event of javascript.
    U can block the required key codes.
    Hope that helps.

  • How can I get user to enter date & time on a form?

    I have a form where I want the user to enter a date and time for an event. The database field is in MYSQL datetime format
    I've used the datepicker on the form field but it only allows for a date entry not time.(eeven when seetin the width to 22 chars
    I remember doing something before which allowed the user to pick a date and then add the time at the end.
    I've got the date defaulted to dd/mm/yyyy and the time to H:mm in the control panel.
    Can anyone help please or is there a better way to enter date and time?.
    Any help appreciated
    Thanks
    Clive

    Two things:
    The column in your database is defined as DateTime, not Date
    You use the option on the Date Picker to choose datetime, not date
    This will give the user the ability to choose a date and time from the date column.  If you need more control over the time, you probably need to add another column defined as Time.  Then you can use the validation rules to force an entry rather than allowing the default (current time).

  • To fix the length of a textfield for user to enter date

    hi,
    i need to display a textfield for user to enter the date in the format MM/DD/YY.With the slash in between present and fixed and the possibility of entering only 2 digit figures for the month,day n' year.I am using JTextField .how can i acheive that pls help.

    You must design you own document where you will manage the text that will be entered/displayed in your textfield
    here's a sample of the code I use to do this:
    import javax.swing.JTextField;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MaskedTextField extends JTextField
    private String initStr;
    public MaskedTextField (String mask, String initStr)
    super();
    setDocument(new MaskedDocument(initStr, mask, this));
    setText(initStr);
    this.initStr = initStr;
    this.addMouseListener(new java.awt.event.MouseAdapter()
    public void mouseClicked(MouseEvent m)
    this_mouseClicked(m);
    private void this_mouseClicked(MouseEvent m)
    if (getText().equals(initStr)) setCaretPosition(0);
    class MaskedDocument extends PlainDocument
    String mask;
    String initStr;
    JTextField tf;
    public MaskedDocument(String initStr, String mask,
    MaskedTextField container)
    this.mask = mask;
    this.initStr = initStr;
    tf = container;
    void replace(int offset, char ch, AttributeSet a)
    throws BadLocationException
    super.remove(offset,1);
    if (capitalised) super.insertString(offset,
    String.valueOf(ch).toUpperCase(),a);
    else super.insertString(offset, "" + ch, a);
    public void remove(int offs, int len) throws BadLocationException
    if (len==0)
    return;
    // Remove current contents
    super.remove(offs, len);
    // Replace the removed part by init string
    super.insertString(offs,initStr.substring(offs,offs+len),
    getAttributeContext().getEmptySet());
    tf.setCaretPosition(offs);
    public void insertString(int offset, String str, AttributeSet a)
    throws BadLocationException
    if ((offset==0) && str.equals(initStr))
    // Initialisation of text field
    super.insertString(offset,str,a);
    return;
    if (str.length()==0)
    super.insertString(offset,str,a);
    return;
    for (int i=0;i<str.length();i++)
    while ((offset+i) < mask.length())
    if (mask.charAt(offset+i)=='-')
    // Skip fixed parts
    offset++;
    else
    // Check if character is allowed according to mask
    if (str.charAt(i) != this.initStr.charAt(i))
    switch (mask.charAt(offset+i))
    case 'D': // Only digitis allowed
    if (!Character.isDigit(str.charAt(i)))
    return;
    break;
    case 'C': // Only alphabetic characters allowed
    if (!Character.isLetter(str.charAt(i)))
    return;
    break;
    case 'A': // Only letters or digits characters allowed
    if (!Character.isLetterOrDigit(str.charAt(i)))
    return;
    break;
    replace(offset+i, str.charAt(i),a);
    break;
    else
    i++;
    offset--;
    // Skip over "fixed" characters
    offset += str.length();
    while ((offset<mask.length()) && (mask.charAt(offset)=='-'))
    offset++;
    if (offset<mask.length())
    tf.setCaretPosition(offset);
    if (offset == mask.length()) tf.setCaretPosition(offset);
    Enjoy
    Bernie

  • Update age group picklist based on value entered in date of birth

    Hi Gurus,
    Have a requirement where in user would enter the date of birth on a contact record and would like to populate another custom field called age group at the time of creating a new record.
    The condition is some what like
    Age
    1 – 20 Teens
    21-40 Young Adults
    41-60 Adults
    60 – 100 Seniors
    I have tried using the age field but problem is that age is populated only when the record is saved.
    Update the age group via workflow works fine but the saved record has to be modified before triggering the workflow. we would like to avoid the additional step of modifying the record
    Is there any option to calculate age based on the value entered for date of birth - something like DOB Year - current year before saving a record or via post default without using workflows.
    Thanks in advance,
    Arun

    Hi
    The answer is yes, using the post default functionlaity.
    take a look in the folowign example:
    IIf(ToChar(Timestamp(),'DD/MM/YYYY')- [<DateofBirth>] < 20,'20','30')
    You will need to make something like that, but replace the '30' with another IIf expression, and so on for the next interval.
    note that date of birth should be between suqare brackets [  ] (it is shown here with underline for some reason...)
    Good luck
    Guy
    Edited by: Shinshan on 08:45 30/12/2009
    Edited by: Shinshan on 08:46 30/12/2009
    Edited by: Shinshan on 08:47 30/12/2009
    Edited by: Shinshan on 08:47 30/12/2009

  • What is the best way to prompt a Form user to enter a value

    Hi,
    I apologize in advance if this topic has already been raised on the forum - I've done a search but couldn't find anything.
    Basically I would be interested in finding out if there is a 'best way' to prompt and accept an entered value from a user. I am just experimenting at the moment with asking a user to enter a date value which will then be used in code. I am running Form 9.0.4.
    Any suggestions or links would be gratefully accepted,
    regards,
    Kevin.

    I am rather puzzled by the question. Forms primary use is to accept user input, and then respond to that input. It is no wonder a search does not turn anything up.
    So there are a number of ways to accept input. The first that comes to mind is a simple input field on the canvas with some prompt text next to it.
    I don't think there really is a "best practice". It really depends on what your form is doing.
    If you explained what you mean by "which will then be used in code", or described what your form needs to do, then you would get some good suggestions.

  • How do it force a user to enter a time in a date time field??

    I am new to live cycle, not to acrobat pro. I must say live cycle is pretty cool and i may just switch to live cycle forever...
    But i can not figure this out. I have a HR form. I need to make the time of occurence field, required, validate and wont let you move on until you enter a time.
    Right now it functions as required, it shows a custom message, but the user can enter garbage text and skip through. How do i set up this field where the user can only enter a time and not skip through??
    I am sure this is rather easy, i just dont know where to start.. Thanks in Advance

    Hi Paul:
    That completely makes sense... Only problem what would or could the javascript be??
    I have already inserted some for the save as and print buttons sucessfully
    BTW in my form the time/date field is selected and to format to show time only. In my other date fields is does show a calendar after you hit the little arrow and the user can still insert garbage.
    What i would ultimately want is for the user not to insert garbage and forcing them to insert a time in the time field.
    It is possible that i forgot or missed a step being as im new to Live Cycle.

  • How do I disallow users from saving the data they enter into an Editable form?

    Hi all,
    I am working with a client who does NOT want their users to be able to save their data. In other words, when the user opens the PDF file, they can enter data into the editable fields, but they should NOT be able to save that data as part of the PDF.
    Does that make sense?
    My client doesn't want the user to be able to save a local copy of the PDF with any of the data entered onto the form.
    Based on what I've found in my research, as of Version 11, Adobe Reader now allows users to save their data. Unfortunately, my client doesn't want that.
    Any help?
    Thanks,
    Steve

    About the best you can do is include a JavaScript that resets the form when it is saved, so no entered data remains in the fields. The problem with this approach is JavaScript can be disabled, resulting in the form not being cleared and allowing the filled-in form to be saved.
    You can address this with an additional JavaScript that runs when the form is opened that sets all of the fields from read-only to not read-only, allowing the fields to be filled-in. If JavaScript is disabled, the script won't run when the document is opened and the fields will remain read-only and therefore not fillable.
    The user would be able to work around this by having JavaScript enabled when the document is opened and disabling it after filling-in the form but before saving it. Most users would not be aware of how to do this though.
    If there are rules/regulations/laws in place that require something more certain, you'll have to take a different approach.

  • How to stop user from entering value for already existing data

    Hi ,
    We have a situation , where we need to give user a template for entering the data and then send it to the database. But we want that if user has already entered the value for a combination, then he should not be allowed to select the same combination again in that template.
    In other words , there should be write access but not update access.
    So I have two questions related to it:
    1. How to build report with giving user , the drop-down list of available members under each dimensions. (I know that we can provide list by writing all of them in excel and then using those values in drop-down)
    2. How to restrict the user for selecting the combination which has already been selected.
    Need your suggestion
    Thanks
    Sanjay

    Hi Sanjay,
    for your first question...
    you can build an EVDRE in a hidden area/sheet to display all values of a desired dimension in rows. Set Option SuppressDataCol to 'Y'. Also maintain MemberSet options to display only the values you need.
    Now you can reference your DD-box to the key- or description range.
    With some VBA-code you can refresh this EVDRE on Workbook_Open and also set the range (attribute ListFillRange?) of you DD-box dynamically to the RowKeyRange.
    Hope, it helps.
    Regards
    Steve

  • Two fields, two scripts. User can enter data into field 1 or 2

    Hi all,
    New here, and to acrobat forms, so please bear with me!
    What I'm trying to achieve is a form that calculates total invoice value, based on a total number of hours worked, and a rate. The user fills in the total hours, but then the problem is that some people know their fixed rate, and others have a changing rate. Those with a changing rate simply know the amount they are invoicing for. What I'd like, is a way for the TotalInvoice value to be calculated by Rate*TotalHours when the user enters a value into the Rate field... OR ... for Rate to be calculated by TotalInvoice/TotalHours when the user enters a value into the TotalInvoice field.
    I can make it go one way or the other (so the script is only in TotalInvoice field or the Rate field), but I can't manage to get it to go both ways. Is this possible?
    To summarise: User can enter manually into Field1 and value of Field2 is calculated, or user can enter manually into Field2 and Field1 is calculated.
    Thanks!

    What you propose can be difficult, becuase you're describing a circular reference between the two fields. When the 1st value changes, you want the 2nd value to be calculated based on the 1st value. But when the 2nd value changes, you want the 1st value to be calculated based on the 2nd, ad infinitum. There are ways to short-circuit the loop, but it depends on whether you need to do the calculation only when there is manual entry, or whether you need it to work when either field value changes programmatically or by importing form data.
    Sometimes it's just easier to have the user press a button to calculate and set the other field value.

  • Restrict Which Users Can Enter Data In List Form in SharePoint Foundation 2013

    Is there a way to restrict which users can enter data in particular fields in a list item entry form?
    We are using a SharePoint Foundation 2013 list and calendar to manage vacation time. We need to restrict non-supervisor users users from entering a value in a certain field in the vacation request form.
    Here is how the system works now:
    1. Employees complete the vacation request form (which creates a list item)
    2. An email is sent to their supervisor to either approve or decline the request
    3. Approved requests are automatically entered onto the vacation calendar
    We have restricted the list so that only supervisors can edit items (the pending vacation requests). The problem is that all users can mark their own requests as approved when they fill out the request form in the first place. Is there a way to restrict
    which users can enter data in particular fields on a list item entry form?

    Thanks for the suggestion. We ended up 1) hiding the approval column and 2) creating a second list, workflow, etc. The user no longer sees the approval column when filling out the form. Requests are now submitted to list A. Workflow #1 copies the request
    to List B, then deletes the item from List A. Once the request is added to List B, Workflow #2 emails the user that the request has been received and emails the supervisor that a request needs to be approved. Only supervisors have editing permissions on List
    B. Approved requests are automatically added to the vacation calendar (the calendar view of List B).
    We found the following site to be helpful in learning how to hide the list column:
    http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2013/06/03/how-to-hide-a-sharepoint-list-column-from-a-list-form.aspx

Maybe you are looking for