How to adjust functionality for input data in shiny code

Thank you very much @nirgrahamuk . You understand the idea well, which is to use data and data2, regardless of the origin, ie via Excel or database. I just can't test this code very well due to a little problem I have, but in order not to confuse this question, I asked a new question (Insert condition to show daterange in shiny code), if you can see it, I would appreciate it. Thanks again!