@Sargas Thank you for your example and time but that did not solve my problem. I tried modifying the code a bit since it did not work so here is another screenshot. It would be great if you could take a look it again.

You do not have the required permissions to view the files attached to this post.

Could you please add [solved] to your topic name, now when you found a solution for your problem. So other people could find it if they encounter similar issue, and for others who trying to help to know that it was solved already.