Learn Dynamic variable with condition