The if-else condition I designed is like the picture below, but I think it is a bit of complex, wonder if a easier way exists. n