Users and tables

Hi there,
I have some experience from python and db but I’m far from being an expert.

I’m trying to make a function that makes different logged in users do their input to different tables in db.
Logged in user A add rows into Table 1
Logged in user B add rows into Table 2
Logged in user C add rows into Table 1 and so on…

I’m really trying to find the best approach to make this happen.

anvil.tables expects a specific table and I can’t find a way to put a variable there. However that would be smooth.
Is link tables a route or should I try with psycopg2 or do I have to take the route through local server and use another way?

Kind regards
Per Billengren

It’s not documented (that I recall), but this trick still works:

Hope this helps!

1 Like

This can be useful: Database Table Management


Big thanks!
Totally forgot about that function, I now recall using it ones a couple of years ago.
That would work!

I really love this app.
Kind regards
Per Billengren

Since you said you are new and already know something about python and databases, I’m going to plug this app I dropped last Sunday.

Its a clone link for a full working app that includes all the working code.