MoodTracker - picture (mood) selection

Hello all :blush:

Currently building a Mood Tracker for my app.

I have a Title & a Body text, which work fine, they belong to the same collection and the database works.

However, I would like to add an emoji selection.
Ideally, it would be 3 emojis (pictures) and the user clicks on the one they identify themselves most with.
So far, Iā€™ve tried multiple things: toggle, ratings, etc.

I canā€™t find the best solution to have a picture added to the ā€˜mood noteā€™.
Also, Iā€™m struggling to define the collectionā€™s structure.

Has anyone solved this?
Thanks! :pray:

1 Like

Hi @carolinesparrow,

There are plenty of options how this could be done :slight_smile:

For example:

  • You create a collection ā€œMood typesā€, properties ā€œMood nameā€ and ā€œMood pictureā€. Here different moods are stored (3 records in your case)
  • You create a collection ā€œMood recordsā€. Properties: relation to User (one user - many records), date, relation to Mood Types (one mood type for a single record, but mood type can relate to many records).
  • On the screen where user records his/her mood, you create a list of Mood Types with pics. Then you add an action to create new Mood record by clicking on this list. You take user from Logged in User, mood type from Current Mood Type.

Another option: if you have only 3 moods (and you donā€™t plan to add more), you can kind of ā€œhardcodeā€ them into the page. Just put 3 pictures there, and add an action to create a Mood Record for each, putting the relevant Mood to some text property inside this record.

NB: I havenā€™t created these specifics setups in the app builder, so some small details could be missing :slight_smile:

Best,
Victor.

2 Likes

Thanks for the quick answer!

The problem that I face now, is that if I set the action to Create Mood, I get a double creation.
Yet, I cannot update something I havenā€™t created yet.

Also, is there a way that the selected image gets differentiation from the others?
As of now when I select a picture, I canā€™t see a ā€˜selectā€™ effect

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.