Forcing a User to enter Data

I have a Designer 7 form where every field must be filled and the user must not go on to the next field until the current one is completed.
In Designer 5 the following 'OnExit' script would always set focus to the required field no matter what the user tried to do.
// Ensure that a Surveyor Name is entered.
if (SURVEYOR_NAME.Value == "")
{Form.MsgBox(0, "You must choose a (surveyor) 'Name'","Missing Information");
Form.GoToField(SURVEYOR_NAME, 1);}
In Designer 7 selecting the 'Value / Type / User Entered - Required' only produces a one-off message that the user can ignore. As a result I've tried using 'exit' script along the lines of:
// Ensure that an Action is entered.
if (Action1.rawValue == null)
{xfa.host.messageBox("Please select an appropriate action from the list provided.","Missing Information 1",0);
xfa.host.setFocus("Action1");}
Although this script will work when there is just one field on the form, when there several fields (all with similar script) the focus does not remain on the appropriate field. As this must be common requirement I'm sure that there is a simple solution out there somewhere - any help would be much appreciated.

what i recommend is using the key word 'this' to refer to the field it self.
so you'd have this to check if field == null then keep focus
this would go on the exit event.
if (this.rawValue==null)
xfa.host.messageBox("Please enter partner name!");
xfa.host.setFocus("this");
never had a problem with however many fields i have on page.

Similar Messages

  • 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

  • How to prevent user to enter data in "Date/Time Field"?

    Hi folks,
         Back after long time to the forums, where I get answers which are helpful in making me good at utilizing designer.
         I am trying to validate the "Date/Time Field" using JavaScript but couldn't get a proper RegEx expression for various invalid user input formats. If anyone can help me out in finding a proper script that would Great.
         My script grown bigger and bigger to accepting invalid dates, but felt like hardcoding. So, instead I decided why can't we prevent a user to enter data into "Date/Time Field" and use only calendar dropdown. Is there is a way to do this?
    find my sample testing docment
    https://acrobat.com/#d=mYXkrhO2txuEesCfmvxNXg
    Thanks in Advance,
    Rajesh

    Hi Rajesh,
    I don't think there is a way of stopping the user from using the keyboard to enter a date.  You can use the following script in the change event to stop them typing a date but they will still be able to paste a date in.
    if (xfa.event.change.length === 1)
    xfa.event.change = "";
    This code works because if the date is selected from the calendar dropdown then the date xfa.event.change value will be the whole date and therefore longer than one character.
    I couldn't access your sample but if you were to set an display picture for the date field to something other than date{YYYY-MM-DD} then a valid date will have a formattedValue that is different than the rawValue.
    Dave

  • How to force the user to enter a value in the prompt

    Is there a way to force the user to enter a value in the prompt before they run the report?
    We have a customer specific dashbaord. The user has to enter a customer number in Dashbaord prompt on a first page of the dashboard. We store that value in a presentation variable. That presenatation variable value is being referenced in all the other pages of the dashabord. If the user does not enter a values in the first page and directly navigates to the other pages on the dashbaord, the reports on the other pages start to run for all the customers. Is there a way to force the customer to enter a value in the prompt before running any of the reports on the dashboard?
    Thanks!

    by Answer prompts, do you mean Column prompt?
    I can not use Column prompt in this senario as the user should not have to enter the same customer number over and over again when he navigates from one page to another on the same dashboards. If there is a way to default the column prompts then this would be an acceptable solution.
    I have already defaulted the prompt to a value as suggested in hte blog, but the issues occurs when the user erases the defaulted value. Is there are way to set the default value within the report?
    Can you please explaing mroe about option 3 regarding Java Script. Also please let me know what other options there are so that I can check whether they will fit my needs.
    Thank you very much!

  • Force a user to enter a value for a parameter.

    Hi,
    I have a report with a bunch of parameters and I want to force the user to enter values for two parameters amongst all of them. Like for example when the user doesn't select values for those 2 parameters he should get a dialog box saying "please enter value for xyz parameter" or something like that, which will force the user to enter a value for the parameters before he can see the report.
    Please let me know if BI Publisher can do this.
    Thanks,
    DY

    Thanks for your replies BIPUser. I have recently started working on BI Publisher without a lot of help around.
    The information in the link is what I was thinking of, if there is no such feature I'll have a default value for those 2 parameters.
    Thanks,
    DY

  • 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 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

  • 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.

  • Is there any way to create fields reports users can enter data into?

    I am using Crystal XI to develop reports for my company and have not received any formal training on it.  I'm learning it fairly well through the help files. 
    One of the reports I need to create summarizes our scrap, rework, and additional incurred expenses for our monthly quality reports.  Most of the information is stored in the main program used by all employees, a very small amount of it is not.  I have created sub-reports for each of the different types of costs that are tracked in the system.
    Is there any way to create an area on the report that our QA people can use to enter the items not tracked in the main system?  I am imagining that it would be through another sub-report of some kind, but do not know how to create the fields needed. 
    Thank you very much for any assistance you can provide, even if it is to tell me "You can't do that, ma'am..."  At least then I would know and wouldn't beat my head against the desk trying to figure out how to do it.

    Is defining parameter prompts in the Crystal Report and displaying it in the report a possible workaround? 
    If you define parameter prompts, then Crystal will query the user before running the report - so this would be problematic if the user needs to reference data in the report to enter appropriate values (one possibility then is to use interactive parameters feature available in CR 2008).
    Sincerely,
    Ted Ueda

  • Is it possible for users to enter data on PDF forms?

    I would like to use Crystal Reports to generate a PDF form with data from database; I am experienced with that.
    Here's the question -- Many of the fields will be populated from my database, but I would like to leave some fields blank for the user to edit manually. (I do not expect these edits to update the database.) Is there a field or object I can insert to allow for these manual edits?
    I have seen this feature at my own benefits website. I can click on the PDF and enter some values in blank fields. It gives me a warning that the changes will only be shown when I print, not when I save.
    I have been unable to create this feature using Visual Studio 2005. Do I have to upgrade to 2008? Or do I have to upgrade my Crystal Report package in Visual Studio? Or is this feature not possible in Visual Studio?
    Any thoughts are most welcome.
    Edited by: John  Miedema on Sep 3, 2008 9:07 PM

    There are 3rd-party tools (see comprehensive list at http://www.kenhamady.com/bookmarks.html) that provide extra pdf functionality on top of the pdf export from Crystal. 
    In the case of my Visual CUT software, you can use hidden formulas inside your Crystal report to generate form fields (pre-populated as well as empty) as part of the pdf export process.
    hth,
    ido

  • How to force the users should enter records in detail block.

    Hi members,
    we have a master-detail form. ex like DEPT (master), EMP(detaisl multi record). after entering new dept, i want the users shoudl not leave with out EMP entries for that new dept. how can we achieve this.
    thanks in advance

    In Pre-insert trigger of Master block just check if there are any records in the detail block before commiting the record. If not found then Raise A Excepiton.

  • Forcing user to enter values at table level

    Hi,
    I have created a table ztest. How to force user to enter the values for certain fields in the table which are not keys, similar to not null in RDBMS. selecting the initial values filed in SE11 populates with some default value, but it doesnt force the user to enter the value.
    Regards,
    Raghu

    Hi,
    Just check out transaction code SE54 for events.
    Go in SE54.
    Give your table name.
    Go in Environment --> Events.
    Here add the Event '01' i.e. Before saving the data.
    Give the name for event eg 'BEFORE_SAVE'.
    Click on Editor to create an include program.
    In the include program write
    form before_save.
      data: f_index like sy-tabix. "Index to note the lines
      loop at total.
        if <action> = 'N' or <action> = 'U'.
          read table extract with key <vim_xtotal_key>.
          if sy-subrc eq 0.
            f_index = sy-tabix.
          else.
            clear f_index.
          endif.
          "(make desired changes to the line TOTAL)
          "End of Modification.
          modify total.
          check f_index gt 0.
          extract = total.
          modify extract index f_index.
        endif.
      endloop.
      sy-subrc = 0.
    endform.
    Note here in field symbol 'Total' your workarea will be their. You can make necessary checks here.
    Or else you can go for making a custom transaction for your requirement.
    Regards,
    Nitin
    *Mark all helpful answers

  • Cell data not getting refreshed in which user enters data OO ALV(editable)

    Hi Friends,
    I am using OO ALV for editable grid display.
    I am unable to change grid data in the cell in which user enters something, using OO ALV. Did through debugging of my own program and found that some problem with system program. Then I did all system debugging. Could not find out why is the grid not getting refreshed with the new data in the cell in which user had entered some value. Rest of the cell's data are getting refreshed with the values which i am updating in the final internal table. I can see that the data in the final internal table is changed for the cell in which user enters data. But even after the call of
          CALL METHOD obj_alvgrid1->refresh_table_display
    does not refreshes the data in the cell in which user had entered data. Rest of the cells data are getting refreshed.
    Piece of code:
      SET HANDLER obj_event_receiver->handle_data_changed
                                         FOR obj_alvgrid1.
        METHODS: handle_data_changed
                       FOR EVENT data_changed OF cl_gui_alv_grid
                           IMPORTING er_data_changed
                                     e_onf4
                                     e_onf4_before
                                     e_onf4_after.
    METHOD handle_data_changed.
      DATA : v_valid    TYPE char1,
             v_refresh  TYPE char1.
    *--check mt_good_cells semantically
      CALL METHOD perform_semantic_checks( er_data_changed ).
    *--If PBO is again visited, just refresh the ALV grid.
      CALL METHOD obj_alvgrid1->refresh_table_display
        EXCEPTIONS
          finished = 1
          OTHERS   = 2.
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
    ENDMETHOD.
    METHOD perform_semantic_checks.
        LOOP AT er_data_changed->mt_good_cells INTO w_good.
          v_index = sy-tabix.
          CASE w_good-fieldname.
            WHEN 'ZASCAS'.
    *Now here based on some conditions I am changing my final internal table i_zamtsmatnp
                              MODIFY i_zamtsmatnp FROM w_zamtsmatnp INDEX
                                               w_good-row_id TRANSPORTING
                                                 zascas modif.
    User enters data in zascas field. Based on the data entered, I am changing other fields which is getting refreshed. I am also changing zascas in the program even after user had already entered the value which was bit wrong and i am correcting it in the program on the even "data_changed" even.
    Please help me friends as i m strugling past hours wondering why the data is not getting refreshed for the cell in which user enter data.
    Regards,
    Surya

    Hi Surya,
       The approach you are following is correct. You need to use the comibnation of all these things:
    Event - DATA_CHANGED
    Methods - CHECK_CHANGED_DATA
                 -  GET_CHANGED_DATA.
    However, here are few standard programs which are having similar functionality.
    BCALV_EDIT_03
    BCALV_EDIT_07
    Check out these once.
    Note: If anything is helpful, dont forget to reward points
    Thanks,
    Adithya K
    SAP Practise
    [email protected]

  • How to use User entered dates in intreval

    Hi,
    User will enter date range in variable
    As per my requirment i want to use no of days between those 2 user entered dates in my calculaction
    How can i achieve this at report level.
    Thanks

    Hi
    Create a variable with intreval.
    There is a function module which calculates the no of days between the days
    Go to SE38 and ZXRSRU01 Program
    Write the Code like this (Not exact code)  you can modify
    WHEN "ZZZZZ"(Before that create a formula variable to get the number of days between the days and use the tech name of the formula variable here)
    read ..the lower limit and the upper limit of the caldaz variable
    FROMDATE = L_S_RANGE-low
    TODATE = L_S_RANGE-HIGH
    Then call the function module
    Search for the function module by using days in SE37
    Then pass the from and to Date to the function module it will retun the number of days
    update that to table e_T_Range
    You can proceed with this
    Regards
    M.A

Maybe you are looking for

  • Preventing Unwanted Pallets from Appearing - CS4

    When I open a Threshold layer (or any other Adjustment layer), CS4 opens an Adjustment Layers pallet (or Tab Group or whatever it's called) and leaves it there, even if I delete the Threshold layer. To get rid of the Tab Group, I have to manually clo

  • SD  TABLES ERD DIAGRAMS IN VISIO

    hi, anybody can plaese send me the erd diagrams for the sd tables.i will be highly thankfull to you regards, Ronie

  • Why is iphone 5 not in other colors

    All the ipods came in all sorts if collors. Why does the iphone 5 not come in colors as well.

  • Boot lenovo B590 in uefi

    Hello, I just bought a B590 lenovo laptop and I want to do a clean install. I want tu install windows 8.1 from a usb stick in UEFI mode. I have another laptop and there it boots fine in uefi mode. But I can't figure out how to set it for this B590. I

  • Apex using AnyChart 3.3.  Where are the 3.3 XML documents/samples?

    I can't find any documentation for creating AnyChart 3.3 XML based charts. Even though Apex provides an area to edit this XML. I'm looking for developer guides and XML schemas for AnyChart 3.3. I'm fully aware that anychart.com has the AnyChart 4.2 d