If Condition required

Refer to the below post…
I have answered the solution there…