I want to be able to show the user a new postive affirmation per day based on themes and a program they have selected. Would like some advice on how to approach this:
- I have data table of the different programs that will determine if they get a new one each day, each week or the same one for 3 week
- I have a data table of all the mantras by theme
- I have a data table of the different programs
- I have a data table of the different themes
Do I need to set up relations between all tables?
What do I need to manage in the user profile - for now I’m just using a boolean and switch with user specific columns to show in their profile what they have selected but maybe it’s better to have this info on theme and program stored at the user profile level so they can manage there.
Do I need to create workflows so that I can automate how a positive affirmation is given to them?
I’m looking for advice on how to approach and structure the set up.
Some suggestions:
- Implement a user-specific column (could be a boolean) that is checked when the user is displayed a specific mantra. When the user is shown this mantra, the “has-viewed” column is checked. You’ll have to have an action somewhere in the app to set this value.
- Implement a time-check, for instance tie the action above to another column that sets the number of times they have been shown this particular mantra
- In the user table, set what they have selected for various themes or programs
- In the mantra table, use a query or relation to only display the mantras they have selected (query might work better).
Without seeing the table structure this is probably the simplest recommendation, but happy to help if you can provide more information about how the application is structured.
1 Like
Thanks for your reply, I’ve tried to restructure the data to make it simpler for this first iteration.
Here is a table that now shows a date along with a positive affirmation to show a user based on a simple Group ID one per day.
There is a layout I’ve called Daily Affirmation that should just show one based on the day but wondering if I can use a filter that will look to a user’s group ID and date or even just date to show one?
You may be able to use a date filter on that collection that uses if date column is within today. However, you will need to convert (third column) your text column to a date column to use this.
With this filter set, it will only show the affirmation for that day, based on the date stored for the affirmation.
Additional/alternative enhancement:
- If you’re not anticipating massive scale in the affirmations table, you can use Glide Tables are you likely are to back this content.
- In that table, you can use Format Date column to get the current day, current week, and current month from the new date column (when you use the date and time column type).
- Why would you use this?
- If you entered 365 mantras, one for each day of the year, you could simply see which is on the current day, week, month and filter on that to display it to the user.
- The above approach will work, but auto-calculating the current day/week/month might help you have other functionality on top of this.
- Note: This approach would only work with Glide Tables, not Big Tables.