Are "list of things" fields in bubble always order preserving

Hi, Ideally I would like a field in the table that’s a dictionary with a key:value pair. For example, I have a table called “Rows”. Then I would like a field that has {key1:value1, key2:value2…}

Can I simply implement this by creating two columns in the “Rows” table

  1. List of keys
  2. List of values

and making sure that the two lists in a row always have the same length.

In short, are lists order preserving. Am I guaranteed that if I store the items correctly, that when I pull item #2 from each column that I will get the right score for the user.
Thanks!

PS: Edited to avoid confusion and made the example more abstract/general. Needless to say, I can also implement this as a separate table where each row has key and value and links back to a “row” in the Rows table. But wondering if I need the hassle just to store one “value” associated with a key.

1 Like

Link User with score

User 1

  • Score 1
  • Score2

User 2

  • Score 1
  • Score2

Thanks. Though that doesn’t answer the original question of ordering of lists. There is no actual user table in my data, it was just an illustration. I will remove the user details to avoid confusion. What I really want to know is if the ordering is order preserving or if there is a better way to implement a dictionary. But I do need a dict. Needless to say - I can of course implement this in other ways e.g. by creating another table of key:value pairs.

Hello,

The answer to your question is yes if you build the right database model, UI, and logic.

Here an example of this database model (two related but separate data types) in action for entering words and their meanings (for the GIF I ended up just showing one meaning …).

Each word gets its definition and they are listed on the same row each time in the repeating group:

Screen Recording 2021-02-15 at 01.42.17.83 PM




Hope this answers your question :+1:t2: