Forum Academy Marketplace Showcase Pricing Features

Favored/Unfavoured by user Database method

  1. When a user Favors or Unfavors a Post by clicking on a star button for example, and i want the program to keep record of the users Favorites status per post, what is the right method of saving and unsaving it on the database?

Do i write a Workflow that tells to Modify a thing and choose the “Post” type (the type where all post are listed) and a field (that contains a list, field type: Users) called “favoured by”, and modify the value to add current user to the list, and when he/she unfavours, a new workflow that says to modify that field to take off current user?

Or is there a better way to do it?

  1. what about an action that the user does on a Post which creates a new thing in a separate Type, for example the user flags a post (by clicking on a flag icon) and reports the post with some other fields for additional info, and i want to keep track of all flagged reports (and UnFlagged) by User per post:

Do i create a Workflow that tells to create a new thing in the “Reports” type, and have a field called “Posts” (and Field type: “Posts”,) and have the Current Cells’s Post as the value. and when the user unflaggs the post, a workflow that tells to delete a thing in the “Report” type which has current cell’s post as a value in the “Posts” field, and current user as the Creator

Do have i have it right or am i missing something?

thats the better option, keep each post and its statistics together, you can pull a report off that data anyway and you dont have to reference different datasets if you need to track an issue or info. it will also make managing the privacy settings easier.

u mean for the 2nd question of keeping track of flagged report’s, your’e saying i shouldn’t create a new type for that?

but where would additional info of the report go, for example i want to have an additional field to specify more details about the report, shouldn’t that be on a different type (table)?

i guess it depends on what and how much extra info your after but yer, i would keep it all together… flagged reports would just be a list of reports structured as [reportseruniqueid, why, timedate.]

So i should create a new type for reports separate from posts?

if your collecting a heap of info on different fields then it might be a good idea, just make a REF field that you write currentpost’s uniqueid to so it easily traceable.