List of numbers: duplicat values? Been struggeling for 2 days now

Hi everyone! If someone can help me with this, I would be ever so grateful :slight_smile: Been struggeling for several days…

The question is as follows: How to return a list of numbers which accept duplicate values?

I use states as a basis for a graph:

State 1: count = 2
State 2: count = 3
State 3: count = 5
State 4: count = 5

Which returns a list of numbers as follows: 2,3,5

Is there a smart way to maniplulate bubble to return 2,3,5,5 ?

Best regards, Endre

Hey :wave: @endrefyl

Sorry you have spent a couple of days on this. That’s frustrating. :cry: Let me see if I can help.

When saving a list of numbers, Bubble doesn’t allow duplicates. So I’m thinking, one way to do this might look like this:

Save each number as a separate thing and have a list of things instead. Then you can have duplicate numbers in your graph.

Hope that helps! :blush:

@j805 www.NoCodeMinute.com

For All Your No-Code Education Needs:

  • One-on-One Tutoring
  • eLearning Hub
  • Video Tutorials
  • No-Code Classes

Thank you for your reply :slight_smile: I did a workaround through states, which first converts all the numbers to a string, then replaces it with numbers and comma 1,2,3,4… and at last converts it to a list of numbers trough regex.

Best regards, Endre

2 Likes

Glad that worked. :blush:

Hi @endrefyl,

Could you elaborate how you have done this exactly? I am looking for the same solution in order to simplify navigation through a one page app, but I am struggling to get it to work.

What I want to do, is save a list of scroll positions as the user navigates through my app, but that might lead to duplicate scroll positions which I need to save as duplicates…

Cheers,
Georg

Hi, sorry for my late reply! I added my numbers to an array, and then converted it to a string. The last thing i did was to extraxt it with regex, so that my result (list of numbers) could contain duplicate numbers.

This topic was automatically closed after 70 days. New replies are no longer allowed.