How to store info for user about their current status in app when it is Type of Something

Hello, another beginner question after 3 days of painful trying to solve it on my own… Please help feel desperate and have to deploy on Tuesday…
I am probably doing some stupid mistake, which relates to bubble basics and fundamentals.

My application is for children to give provide them with:

  • a story about Travel around world with task (games) to do(play) outside virtual world
  • Diary - to have a possibility to note their achievements
  • Map - to see where they moved
  • Passport to collect stamps
  • Customs - to interact with parent - allowing them to continue to the next Stage

Game will be delivered - one stage every week.

  • So I have Data Type Etapa (=Stage, I am from the Czech Republic, may be you know Havel or Jagr or Prague or … :wink:
  • I want to store and information for user - Aktualni_etapa - currentStage in English because:
    • every user can be in different Stage (Etapa)
    • every user can browse their Diary, Passport, Map according to currentStage (Aktualni etapa) I will also use custom state for that but I need to store it at some point
    • every user need to have initial value of Aktualni_etapa (currentStage) set (It is not possible to use default database value in case the Database field is Type of Etapa) I wanted to set the value to 1 - first Stage (Etapa)

So I have tried to:
- set initial value during workflow creating new User
Simple =1 doesn’t work

More complicated - I have tried to set a field with default value for user - type of Number and use it to feed the value:
image

Doesn’t workimage
This is how I realized that even if the currentStage is also number, it is not Type of Etapa, whoops

So how can I reference it any idea? Did I described it well enough?
I am sorry for such a long post.
Thank you all, great community!
Lada

Hi @lada.hanzlicek

From your screens I see that current stage is actually referenced to another database object that’s why you can’t set the number there . You would need to have either new field with number / text or (which is probably way better) do a search for first item from the stages list and that will set for current user first stage of your stages list (assuming they are created in your stages database like that)

This should do the trick :slight_smile:
Cheers!

I would swear I have had tried it …

So first try:
image I have used Etapa_c (Stage ID) - it is not right. Probably the mistake is I wanted to specify it too much. And firstItem trick… even there is only one result in my query…

Second attempt:
image No issues to fix.

Checking the database if it is written in:
image Oh GREAT it is there

BIG THANK YOU

I guess the other usage for setting the field is an analogy.

THANKS AGAIN

@lada.hanzlicek no problem :slight_smile: additionally you can always be more precise about what you want the “first item” to be by using search for filters so you can even point this like " search for first item which Name is Blabla123&$IloveMichaelJordan". If you know that there is no other Name like that in your db then you selected exactly what you wanted to.

Cheers!

Thanks, that is a good tip with Michael Jordan as a bonus :slight_smile:
I used the previous advice and finally my app started to live a little bit.

Cheers!

1 Like