In reply to juhi_p:
Thanks Juhi for your reply. But as my present method isn’t working properly I’ve implemented the same concept using case statement itself.
I just want to optimize my code as case statement would just lengthen it more and I’ll have to make three functions for the same functionality.
Please do help in implementing this concept of using the same function for three different scenarios.