Alpha Video Training
Results 1 to 10 of 10

Thread: Prevent user from entering data in an updateable field. (WEB)

  1. #1
    Member Editor's Avatar
    Real Name
    Dave Shaw
    Join Date
    Nov 2008
    Location
    Cleveland, Ohio
    Posts
    230

    Default Prevent user from entering data in an updateable field. (WEB)

    Detail view is editble
    Update/edit are lookup from a product list.

    >In properties:
    >>Name/ description /cost / amount are updatable

    >on page:
    >>selecting a Name fills in Name /description /cost and amount.
    >>User plugs in a qty.

    So far so good....

    How can I prevent a user from changing cost and amount?

    When Name/ qty /cost / amount are updatable - it fills and updates fine
    Kill updatable on either field and, they don't update (no surprise)

    I have tried every field setting in the properties and cannot find the correct "switch".....assuming one exists!
    David Shaw
    Manager of Media Services and User Support
    Cleveland Museum of Art
    Cleveland, Ohio

  2. #2
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,827

    Default Re: Prevent user from entering data in an updateable field. (WEB)

    There is nothing in Alpha to prevent this from happening. The fields have to be editable in order to allow the values to be brought over from the source table. However, you can resolve the issue. There is an HTML property named READONLY. I have to dig up how I implemented this, and test if it works in both IE and Firefox, but essentially you append the READONLY property to the Input tag associated with the fields you don't want edited.

    Google HTML READONLY for review, and I'll find my code later today.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  3. #3
    Member eboughey1's Avatar
    Real Name
    Elena Boughey
    Join Date
    Sep 2008
    Location
    Deltona, FL
    Posts
    166

    Default Re: Prevent user from entering data in an updateable field. (WEB)

    I don't know if this helps or not, but in the detail view fields, I changed the field type of cost to 'label' and that made it so it couldn't be updated. Is it a dialog or grid?

    just tested on a dialog and I see your dilemma. please disregard my post.
    Last edited by eboughey1; 12-10-2008 at 11:49 AM.
    Up and coming Alphaholic ;)

  4. #4
    Member Editor's Avatar
    Real Name
    Dave Shaw
    Join Date
    Nov 2008
    Location
    Cleveland, Ohio
    Posts
    230

    Default Re: Prevent user from entering data in an updateable field. (WEB)

    It is a grid (with detail)

    if you do that though, a lookup will not populate that (those) fields.

    The scheme is to lookup an employee (or client on other pages) and have it fill in further details like department and phone etc.

    I appreciate that reply, and I noticed a new post with a similar question.

    For the time being, I changed the color scheme of the textbox so it "blends in", hoping that, during tests, no one will try to change the data.

    I have a new issue crop up, so I will be - yup - new post.

    Dave
    David Shaw
    Manager of Media Services and User Support
    Cleveland Museum of Art
    Cleveland, Ohio

  5. #5
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,827

    Default Re: Prevent user from entering data in an updateable field. (WEB)

    Did you try the READONLY method I suggested?
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  6. #6
    Member Editor's Avatar
    Real Name
    Dave Shaw
    Join Date
    Nov 2008
    Location
    Cleveland, Ohio
    Posts
    230

    Default Re: Prevent user from entering data in an updateable field. (WEB)

    Steve - I'm sorry no I have not has a free moment since you passsed along that suggestion. I will certainly post my results (or lack of) when i can do an honest experiment.

    Right now, I am trying to figure out how a project that was working (see "process" post) now fails to add the ID to the grid detail or DBF - The other entries do (verified by desktop view) but not the auto entered ID. [DO NOT REPLY HERE]



    Thanks, I'll keep you posted (via post!)
    David Shaw
    Manager of Media Services and User Support
    Cleveland Museum of Art
    Cleveland, Ohio

  7. #7
    Member
    Real Name
    Ken King
    Join Date
    Aug 2007
    Posts
    186

    Default Re: Prevent user from entering data in an updateable field. (WEB)

    The HTML READONLY method works great when using IE but does not work with Firefox or Google Chrome. I'm hoping there is a method that works with those browsers.

  8. #8
    Member
    Real Name
    Denis Ahmet
    Join Date
    Jul 2005
    Location
    United Kingdom
    Posts
    988

    Default Re: Prevent user from entering data in an updateable field. (WEB)

    Hi,

    I now have this requirement too.

    I have a textbox with a lookup. The lookup auto-populates textbox 1 (visible) and textbox2 (hidden). When a user types in the details in textbox1, textbox2 does not automatically get completed. So i think the best thing to do is disable manual input for textbox1. The other alternative is to get textbox2 to auto populate after manual input, if thats possible.

    Can anyone please explain how i would implement this method (sample code preferable) or any other workable method.

    Thanks,

    Denis

  9. #9
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,546

    Default Re: Prevent user from entering data in an updateable field. (WEB)

    OK this works.

    you have a grid you are looking up.

    you have a grid you are populating based in the lookup of the above grid.

    you are adding records and or editing record in this grid on a successful lookup.

    so

    just make the grid as normal using text box

    make a calculated fileld called "look" make it = "" in the Query(DBF) component type.

    you will need a blank field in your data table you can call this look as well and it need only be 1 character.

    'look' will be the field you use to base your lookup on, so place it in the added field column in the detail view. This should also be a text box 1 char in length.

    do the normal lookup definition and lookup window information.

    this is where you need to include 'look' (variable) and have it use the sourcefield we made in the table called look. (it really does nothing but a field used as the basis of the lookup must be updated).

    Don't include the qty field in the above.

    Now check everything works.


    It will still let you change all fields, confirm this works.

    Now the trick, just set all the selected fields except look and qty to label.

    It will now work. And you will not be able to enter data over the data.

    Peter

    PS: it seems there is a dfference between editable and updatable.
    Last edited by peteconway; 04-23-2009 at 08:51 PM. Reason: update

  10. #10
    Member
    Real Name
    Denis Ahmet
    Join Date
    Jul 2005
    Location
    United Kingdom
    Posts
    988

    Default Re: Prevent user from entering data in an updateable field. (WEB)

    Peter,

    Thats great thanks.

    Now how would i achieve the same for a textbox field with a lookup in a dialog?

    Thanks,

    Denis

Similar Threads

  1. Entering Data
    By jmendi in forum Alpha Five Version 7
    Replies: 3
    Last Post: 08-27-2006, 01:09 PM
  2. entering data
    By jmendi in forum Forum Usage
    Replies: 2
    Last Post: 08-27-2006, 12:03 PM
  3. Shortcut for entering data
    By William Russell in forum Alpha Five Version 5
    Replies: 2
    Last Post: 07-16-2004, 03:47 PM
  4. Entering Data in a form field?
    By Bob Elliott in forum Alpha Five Version 4
    Replies: 8
    Last Post: 07-26-2001, 11:38 PM
  5. Prevent copying app to another user?
    By Bill Warner in forum Alpha Five Version 4
    Replies: 3
    Last Post: 11-21-2000, 03:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •