@naresh.kuruva,
Welcome to the UiPath Community
Refer this thread for the logic you are looking for.
Thanks, Ashok