NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on June 04, 2019, 10:50:21 AM

Title: How to show alert message in popup form
Post by: Alberto 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?
Title: Re: How to show alert message in popup form
Post by: Alberto 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.

Title: Re: How to show alert message in popup form
Post by: Bruce 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
Title: Re: How to show alert message in popup form
Post by: Alberto 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
Title: Re: How to show alert message in popup form
Post by: Bruce on June 05, 2019, 10:24:03 PM
Put a display field on the form. Set that to appear in View mode.

cheers
Bruce