Alpha Video Training
Results 1 to 3 of 3

Thread: Need a Message but not an Error Message in a Grid

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

    Default Need a Message but not an Error Message in a Grid

    I know I can add an error message to an AfterUpdateRecord event by:
    Code:
    Result.Cancel = .t.
    Result.ErrorHTML = "My message goes here."
    How can I add a message without Canceling the event. I want the record to be submitted and saved but then display a message at that top of the grid that says "We couldn't accept your choice but we saved your record now do this...".

  2. #2
    Volunteer Moderator drgarytraub's Avatar
    Real Name
    Dr. Gary Traub
    Join Date
    May 2000
    Location
    Boca Raton, FL
    Posts
    2,783

    Default Re: Need a Message but not an Error Message in a Grid

    Why not use THAT grid to save the record, and then go to another pgae (with a grid) that displays your message, and could even allow more data input at that point.

    Gary

  3. #3
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,629

    Default Re: Need a Message but not an Error Message in a Grid

    If you can get the fact that there was an error into a session variable,
    then you can put a conditional message at the top of the page.

    Say, for example, your session variable is session.is_error, and you set it = "Yes" when there is an error. Then, in the <head> section of the page, put
    Dim msg as c
    msg="Enter your information below" (or some such info message)
    if eval_valid("session.is_error")
    if session.is_error="Yes"
    msg="There was an error...do such and such"
    end if
    end if

    Then, down in the <body>, above the grid, put
    <p><%a5 ?msg %></p>

    Pat

Similar Threads

  1. Grid Validation Message
    By Paul Velke in forum Application Server Version 8
    Replies: 0
    Last Post: 05-18-2007, 12:02 PM
  2. Error Message
    By Fletch in forum Alpha Five Version 6
    Replies: 6
    Last Post: 04-30-2006, 09:49 PM
  3. SP 2 Error Message
    By martinwcole in forum Alpha Five Version 5
    Replies: 19
    Last Post: 08-27-2004, 02:49 PM
  4. XDialog Script Error message - error 8011
    By brett s in forum Alpha Five Version 5
    Replies: 5
    Last Post: 06-08-2004, 03:41 PM
  5. Error Message
    By Rob C in forum Alpha Five Version 5
    Replies: 5
    Last Post: 02-03-2004, 04:03 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
  •