Validation with blank or control application - better Modal

Dear all,

I’m trying to calculate values from database to update some data automatically, I mean without any field or input. In a grid, I create a field and put a icon that call a Control application, in the even “onScriptInit”, I run my validations, in two cases, I need to show errors (messages) and back to GRID application. In Control application, I tried with:

$salida = $_POST[‘nmgp_url_saida’];
sc_error_message($msg);
sc_error_exit($salida);

Is the only way that work, I mean, until show the error message, but is not possible that back to GRID application, appear that not found /app/$salida, I tried with print but appear that not found print $salida;…

Also, I tried with modal, but I can not close the modal window.

Some idea?

Thanks!

01-Grid.png

02-ControlApplication.png

I suggest that you create your own message application, which can be a simple control form with a big message message read-only field or a blank application where you fully control with html how your message is to be displayed. I just use a control application.

From your original grid application, the “OnScriptInit” code section you call the message application, which in turn call the original grid application again when an Ok button is pressed in the message application.

For this to work you need some parameters in your message application, e.g.:
a. Message title text
b. Message bode text
c. Application that the message application should call when the message has been read and the Ok button has been pressed.

Read up on the ScriptCase macro for another application with parameters:
http://www.scriptcase.net/docs/en_us…acros#sc_redir

Notice that parameters between applications are passed via global variables, which you can also use to check whether the grid has already called the message application. Global variables can be accessed in any application in any section by referencing them with “[variable_name]”. Once referenced in the code, you have to set whether they are input/output and passing form. Read a bit more about it in the Grid Applications->Application->Global Variables section of the manual:
http://www.scriptcase.net/docs/en_us…obal-variables

I think you can make this work.

Frank, thanks for your answer, I’ll try to do.

Regards!

AYMG