Start a conversation

Macros

Examples of using Scriptcase macros

  • Problems sending emails

    When using the macro sc_mail_send with the following parameters: After execution, the following error appears: Fatalerror:Uncaught Swift_TransportException: Expected response code 250 but gotcode 535,...

  • Using the sc_lookup and sc_exec_sql macros

    Showing fields of two tables in the same application In this tutorial we will show how to show and manipulate data of two different tables in the same application. We will use tables that represent or...

  • Using the sc_redir and sc_apl_conf macros

    Redirecting a formulary to a grid. In this tutorial, we will demonstrate the use of macro sc_redir and we will also use the macro sc_apl_conf. As an example, we use the table order (for the form) and ...

  • Utilizando a macro sc_field_display

    Esta macro permite manipular a exibição dos campos em tempo de execução.  Neste artigo veremos como manipular esta macro, nas aplicações de formulário e consulta.  O escopo da macro é igual para qualq...

  • Using sc_select_order macro

    It is possible to change on the fly the ORDER BY clause. This requires that the original SQL statement already have an ORDER BY clause because we will replace it. Example 1: SQL statement: select id, ...

  • Utilizando a macro sc_reset_global

    Com esta macro é possível as variáveis globais armazenadas na sessão. Esta macro é utilizada normalmente antes da inicialização da variável, para evitar que recupere um valor antigo.   Abaixo é possív...

  • Get data from a select with the sc_lookup macro

    The macro allows sc_lookup is returned in a dataset (two-dimensional Array - row / column): We can use the following code in the OnLoad event: where: 'ds' is the array that returns the records. {ds[0]...

  • Changing a field to read only using sc_btn_new

    Making the field read only when inserting the record. //sc_btn_new - occurs when the button new is clicked to open a new record. if (sc_btn_new) { sc_field_readonly({discount}); }...

  • Checking if the field was changed

    To check if there were changes in a given field, the Scriptcase provides the macro sc_changed. Example: if(sc_changed({product_quantity})) { //check if there is in stock ... }...

  • How to use the macro sc_encode

    The macro sc_encode is a function create by Netmake. If you don’t want to use the macro, there is a PHP function called md5 that has a hash of 128 bits and has a similar effect as the macro. On this t...