Forum Academy Marketplace Showcase Pricing Features

List Shifter - combine two lists into one?

So I think I should be able to do this with List Shifter but I’m struggling to understand how.

I have two List Shifters on my page. Let’s call them List Shifter A and List Shifter B. I simply want to create a third, List Shifter C which has all the data from both LS A & LS B.

So if LS A contains A,B & C
and LS B contains D, E & F
LS C should contain A,B,C,D,E & F

I have tried using ‘Merge with’ but this doesn’t seem to do anything.

Maybe I’m going about it fundamentally the wrong way.

Merge with should work. Have you tried the debugger to check the content of the different parts of the expression?

@petter Thanks for the tip, just looked in the debugger and I can see that ‘Merge with’ is actually working but because in my case LS A contains A,B & C and LS B also contains A,B & C (basically it’s the same data in both lists, just for different date ranges) so it’s impossible to select/see which A, B or C you want.

Given the data from both lists is coming direct from an API, I’m going to have to find a way of somehow changing the naming conventions of one of the lists so I can identify one from the other.

1 Like

Keep in mind if the items are the same, a Bubble :merge will dedupe them. You could also use either of the List Shifter’s Custom Lists to combine the two lists and keep duplicates. See the SET Custom List action.

Thanks @keith will take a look at that.

Could you elaborate on this a bit more for me? In my application I want to create ONE list from TWO text fields from the same data type, and store it in the db.

Custom List (separated by commas) would look something like Alabama: Pre-Check, Alaska: Approved, Arizona: Pre-Check, and so on…

I tried listing both side by side but the order gets messed up because exactly what you said- bubble dedupe’s them. So I did the Set Custom List action, but I’m not clear on where to enter the source of list 1 and list 2 to create a list containing 1:2 (ideally with a colon separating the two if possible)

I watched your video Iteration (Looping) in Bubble with List Shifter:: ITERATE Recap and Introducing PROCESS List - YouTube but the examples were numerical not textual, and I’m having a hard time wrapping my head around the function of the plugin.

Explain like I’m five? I’m trying to learn, not just get the answer but it’s a lot to grasp. Thanks so much in advance!!

@rando: Do a SET Custom List action to set the Custom List value to the value of the first list. In the next step do SET Custom List with the “concatenate” option set to “yes” and the new value set to the value of the second list. Now your Custom List will contain the concatenation of both lists (duplicates included).

Aside, my Floppy plugin has easier-to-understand advanced list manipulation features in its various “RAM List” actions. (But if you’re having a hard time with List Shifter’s Custom List, I fear you’ll have just as hard a time with Floppy’s RAM List features.)