NetTalk Central

Author Topic: How to show alert message in popup form  (Read 4866 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1872
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
How to show alert message in popup form
« on: June 04, 2019, 10:50:21 AM »
Hi, I have a popup form that may be updated or deleted depending on some validations.
The popup forms has the Button for deletion, I dont delete from the browse.
Ive added the validation code to the PreUpdate to change the form to view state instead of change to avoid change and delete and let the user see it.
How do I show the error message in the popup form?
Ive tried with p_web.message() and nothing, then with p_web.showinfo, but this info is showed in the backgroud page.
The code is like the attached image.
By the way... Ive read that changing ans to viewrecord is enought but there are some ssv settings that I think I have to change, then I need to add an END for the ELSE
How can I do it the waiser way?
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1872
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: How to show alert message in popup form
« Reply #1 on: June 04, 2019, 12:24:06 PM »
May be a better question is:

How to check if the user can change a record or can delete it and then, display a message to the user and then:
-convert the form to viewrecord state letting the user see the form
-or dont allow the user to enter the form

-In browse on-line buttons
-In browse buttons (buttons below the browse)
-In the form delete button

No matter if I call the form popup or not.

-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11247
    • View Profile
Re: How to show alert message in popup form
« Reply #2 on: June 05, 2019, 01:27:44 AM »
I'm not sure if I understand the question, but there's a setting on the Form, Security tab
"View-Only mode IF"

So if the person does not have rights, and the IF you put there reflects that, then the form will change to view only mode.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1872
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: How to show alert message in popup form
« Reply #3 on: June 05, 2019, 06:13:36 AM »
Ok, and how can I display a message telling the user why its in view mode?
Its a popup form.
I mean another form of using loc:alert in Preupdate (by ex)
Something like .ShowInfo or .Message
« Last Edit: June 05, 2019, 10:10:32 AM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11247
    • View Profile
Re: How to show alert message in popup form
« Reply #4 on: June 05, 2019, 10:24:03 PM »
Put a display field on the form. Set that to appear in View mode.

cheers
Bruce