Question
How is it possible to take and pass a value from a pre-filter to the button action code?
= :linkToInputSelect(title: "Select the foreman's last name!"; code: $code; codeselect: $code_select; multiple: false; refresh: true; button: "Save")
```code:totum
=: setList(table: $#ntn; field: 'role' = $#input; where: 'department' = #fl_department; log: true)
```
```code_select:totum
=:selectRowListForSelect(table: 'users'; field: 'id'; bfield: 'role')
```
Result: empty
Answer
#fl_field_name
, but keep in mind that in your example, the code is executed from the linkToInputSelect window, which does not have access to pre-filters. Therefore, you need to pass the pre-filter value to the code as a variable when calling linkToInputSelect:
= :linkToInputSelect(title: "Select user"; code: $code; codeselect: $code_select; var: "department" = #fl_department; multiple: false; refresh: true; button: "Save")
```code:totum =: setList(table: $#ntn; field: 'role' = $#input; where: 'department' = $#department; log: true) ```
```code_select:totum =:selectRowListForSelect(table: 'users'; field: 'id'; bfield: 'role') ```