If a person does not know the basic things, like how to assign a variable a value and whether that functions can accept variables, and not just constants, then he can not be helped. You can only write the code instead. And programming can not be taught. Man must learn himself. In your case, I just do not understand what you want. And I do not have time to guess. But I'm happy for you that you sorted it out, although I did not understand what, because the decision also did not give me an understanding of what you wanted. At first you said something about passing a variable as a parameter, and now say that you need a function that returns a table.