What’s the best way to handle/save user data? I am building this budget with defined min. and max. as option attributes. Then the user enters the amounts for 9 categories, which are saved in 9 user fields, which the user will continue to edit. At some point I want to permanently save the user’s data, so that means another 9 user fields, and if I want to save a 2nd set then it’s another 9 user fields. Seems like a pretty tedious way to handle/store user data from a coding perspective (plus the 18 option attributes). Is there a better way?
I suggest you add a Budget Category Entry thing in the database (you can name it whatever you want).
You can define the categories (name, default min, default max etc) in an Option Set.
The Budget Category Entry thing should have a user field that references the user it applies to and a field for the Option Set linking to the budget category that it applies to.
With this structure, you can create as many entries for a user as you would like without creating additional fields.
Don’t forget to add privacy rules to the thing if required to secure the entries to the appropriate users (created by user/admins etc).
Hi codably. Thanks for your help!
I have the min and max in an option set, that’s the easy part. I don’t understand the rest, how to have a thing that has a user field? I don’t know how to set that up, sorry.