Árvore de páginas

 

Contents

In Fluig, you can use processes that integrate with Logix. These processes are created by using Fluig Studio. To learn more about this tool, check the documentation in: Fluig Studio. The documentation to create a process using default styles and events available for Logix can be found below.

Default styles

The styles of the HTML forms must follow the same standard defined by Fluig, which can be found through the following link http://fluig.totvs.com/portal/p/10097/ecmnavigation?app_ecm_navigation_doc=1672216.

Masks

The masks of the form must also follow the standard that can be found in FormCustomization#FieldsMask.

Zooms

In order to assign zooms to the fields, you must add the data attribute in the element, with the zoom information in the JSON string format.

 

{
    "zoom": {
        "name": "zoom_item",
        "selection": [
            ["cod_item_compon","cod_item"],
            ["den_item","den_item_reduz"]
        ],
        "whereclause": {
            "fn": "setWhereClause",
            "args": ["item"]
        }
    }
}

The following information must be attributed for the correct operation of the zoom:

  • name: name of zoom registered in the Logix metadata.
  • selection:
    • list of fields that will be loaded when the record on the zoom is selected; the first item is the name of the form field and the second is the name of the field in the zoom which will assign value to the first item.
  • whereclause:
    • fn: JavaScript function that will be performed when the zoom is activated to return the SQL filter considered in the presentation of zoom records.
    • args: list with values that will be passed as parameters for the function defined in the fn atribute.

Icon

In addition to the zoom information above, the data-input-zoom
attribute must be included in the elements in order for the fields that will feature zoom to be identified.

 

Example
<div class="fw-input">
    <label class="fw-descr-top-obrigat">Componente atual:</label>
    <input type="text" name="cod_item_compon" class="fw-input-char" maxlength="15" data='{"picture":"@!","zoom":{"name":"zoom_item","selection":[["cod_item_compon","cod_item"],["den_item","den_item_reduz"]],"whereclause":{"fn":"setWhereClause","args":["item"]}}}' data-input-zoom>
</div>

Defining the company code

To use the Logix routines from the workflow, a code for the company that will be used in the routine must be defined. To do that, create a field on the form where the company code will be informed, and include the attribute data-cod-company for this field. The value entered in the field that features this attribute will be considered the company code in the routine during execution.

Example
<div class="fw-input">
    <label class="fw-descr-top-obrigat">Empresa:</label>
	<input type="text" name="cod_empresa" class="fw-input-char" maxlength="2" data='{"picture":"@!","zoom":{"name":"zoom_empresa","selection":[["cod_empresa","cod_empresa"],["den_empresa","den_empresa"]]}}' data-cod-empresa data-input-zoom>
</div>

Parent Child Forms

In Parent Child forms, child fields are created dynamically and consequently the styles and behaviors of these fields do not follow the same standard of the other fields of the form when using the default styles and events of Logix.  To solve these problems, we recommend following the steps below:

1. Manually create button and event for addition of child fields

    • To do so, add the attribute noaddbutton in the table element of the form with the value true.
Example
<div style="padding: 10px; margin-bottom: 5px;">
    <input type="button" onclick="addItem();" value="Adicionar item"/>
</div>
<table noaddbutton="true" tablename="itens">
    <!-- Código HTML -->
</table>

2. Create the JavaScript event to include and change the styles of the child fields

    • To include new child fields, use the default wdkAddChild function, using the name defined in the tablename attribute as parameter;
    • The event wdkAddChild will create the child items, and return the number of the line created; and
    • Afterwards, execute the function initLogixHtml, informing the number of the line and the name defined in the tablename attribute.
Example
function addItem() {
    var tablename = "itens",
        row = wdkAddChild(tablename);
    initLogixHtml({
        "tablename": tablename,
        "row": row
    });
}

Following the steps above, the child items will behave normally, like the rest of the form fields.


Attachments

  • Sem rótulos