Please enable JavaScript to view this site.

Process Designer

Navigation: Javascript API > User dialog functions > Subtable view functions > Properties > Change properties

jr_set_subtable_field_readonly(subtable, rowid, fieldname, boolean)

Scroll Prev Top Next More

This function enables the activation or deactivation of the write-protection of a subtable input element.

Pleases note: This function is only available for the JobRouter App.

Parameter

Type

Description

subtableViewName

string

Name of the subtable view

rowId

int

Line ID

fieldname

string

Name of dialog element

boolean

boolean

true oder false (default = true)

This function does not offer any return values.

Please note: If a field is already defined as write-protected and jr_set_subtable_field_readonly() (without parameter no. 4) is called, nothing is going to happen.

Please note: The function does not support the following dialog and subtable view elements: CHECKBOX, RADIO, SQL_CHECKBOX, SQL_LIST (including  list type Drop-Down list) and FILE.

Example for a subtable view:

 

setReadonlyTrue : function () {

        

        var rowIds = jr_get_subtable_row_ids('name_subtable_sv');

        

        rowIds.forEach(function (rowId) {

            jr_set_subtable_field_readonly('name_subtable_sv', rowId, 'text1', true);

        });

},

    

setReadonlyFalse : function () {

        

        var rowIds = jr_get_subtable_row_ids('name_subtable_sv');

        

        rowIds.forEach(function (rowId) {

            jr_set_subtable_field_readonly('name_subtable_sv', rowId, 'text1', false);

        });

}