Hi naveen,
If I understand your question correctly, you would like [workchain_id] to be automatically assigned an updated value based on the selection of checkboxes?
This could be done with a Default procedure on this Task. Based on which checkboxes are checked, a certain value is given to workchain_id].
Â
can you please give me an example of the default query Â
Bit hard to determine what that would be as I have no knowledge of which values are suitable for workchain_id]. Let's say this is a Combo with set values from 0 to 5 (1 for each checkbox)
Example:
select @workchain_id = case
when @kantenbreken = 1 then 0
when @lassen = 1 then 1
when @snijden = 1 then 2
when @vormen = 1 then 3
when @zetten = 1 then 4
when @laskanten = 1 then 5
end
The goal is to supply @workchain_id a valid value based on the other parameters.
If you need to select a record from a table, let's say workchain, to correctly set the worktable_id, you could do something like this. In this example, I assume each checkbox has a corresponding column in the table:
select @workchain_id = w.workchain_id
from workchain w
where w.kantenbreken = @kantenbreken
and w.lassen = @lassen
and w.snijden = @snijden
and w.vormen = @vormen
and w.zetten = @zetten
and w.laskanten = @laskanten
Â