Hi @Thilina Tantirigama ,
I read your requirements carefully and found that the problem has more to do with Power Apps. Since the current Q&A forum does not provide support for Power Apps, I suggest you go to the Power Apps forum to create a new request to get more get more targeted help.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".