diff --git a/inc/field/dropdownfield.class.php b/inc/field/dropdownfield.class.php index e6802a297..fa56a1f1d 100644 --- a/inc/field/dropdownfield.class.php +++ b/inc/field/dropdownfield.class.php @@ -331,7 +331,7 @@ public function buildParams($rand = null) { if (isset($decodedValues['show_tree_depth']) && $decodedValues['show_tree_depth'] > 0 ) { - $dparams_cond_crit['level'] = ['<=', $decodedValues['show_tree_depth'] + $baseLevel]; + $dparams_cond_crit[$itemtype::getTableField('level')] = ['<=', $decodedValues['show_tree_depth'] + $baseLevel]; } $dparams['condition'] = $dparams_cond_crit;