Forum Academy Marketplace Showcase Pricing Features

Having trouble with adding to a list

Forgive me, but am still new - am getting there, hurdle after hurdle, but my searches are drawing blanks.

I’ve got two tables. One is QUEUE and one is EVENTS.

QUEUE: Each row is a user and various information about them as it pertains to Events.

EVENTS: Is various event information, but one column is a “List of Users” which I mark as “Proposed Users.” The other important piece of information is I have a column titled “eventname” where I put in the eventname, for simplicity we call it 1A,2A,3A.

On my admin page I built I have a repeating category which displays all of the users in the queue, ultimately giving me a table of all users in the queue. In the table the user specified which eventtname they want to attend (such as 1A,2A,3A). The admin then must go in and click a button, 1A,2A,3A. The idea is that WHEN the admin clicks that button the User will get added to the EVENT table WHERE eventname=(specified Eventname) and their Username will be added to the list of Users.

For the life of me I cant get this to work.

In my workflow I am doing “When Button 1A is clicked”…“Make changes to a thing” Then I do Search for EVENTS, contains"X" and yadda yadda yadda I keep getting stuck. The fields keep turning red or requiring MORE constraints. For the love of all that is holy all I want to do is be like "yo, he clicked 1A, add this username to the list of Users in the row within EVENTS where the eventname is “1A.”

I feel like im taking crazy pills or missing something fundamental.

The next step after this would be to remove the user from the queue and simply be able to query EVENTS where eventname=“1A” and have a list of all usernames which are marked for the queue.

Sorry if this is long-winded or easy, I’ve been doing my best to read forums and google and whatnot and I think I am just fundamentally misunderstanding something about how bubble works. Any help is greatly appreciated.

You really need to share your app or paste snapshots of what you have in the various parts.

I have been caught out before with lists, where you set the list as the datasource etc. but the reality is it is the parent object that contains the list is the datasource, and the list is a field you want to modify. Make sure you haven’t fallen into that trap.

I’ll work on getting screenshots but thats kind of where I am right now based on your comment.

Datatype 1 is QUEUE. Each row is a separate user with their event preference.
Datatype 2 is EVENT: Each row is a different event. Within that is a field for “list of Users.”

I was hoping to send the username from each row of QUEUE to the corresponding event row within EVENT which contains their event name they specified. I’ll get off my butt here in a while and figure out how everyone has such snazzy screenshots. Otherwise i have some printscreening and editing ahead of me :slight_smile:

Hi Dave, or anyone who is willing to help :slight_smile:

I have created a page called mike-datatransferissue in the forum app (https://bubble.io/page?type=page&name=mike-datatransferissue&id=forum_app2&tab=tabs-1)

I made two tables. One is MIKE-USERQUEUE and one is MIKE-EVENTS

The idea is that I want to send a User from the USERQUEUE (which is shown in the repeating group when admin runs page) to the entry in MIKE-EVENTS where the location is marked as “TestLocation.”

What I’m trying to recreate here is that there will be many entries with different Locations. I will have multiple buttons, for the sake of simplicity it is just 1 right now, but i want to be able to press the corresponding button to send them from what their preference is in their QUEUE selection TO the corresponding Userlist in the EVENTS entry. So if user is in queue and has location is TestLocation and I click TestLocation they get sent to the corresponding event in EVENTS. If I were to press a TestLocation2 button, they would get sent to TestLocation2.

Its manual right now because users may have multiple preferences and an admin is sorting out entry, but ultimately i just want to move users from 1 table (QUEUE) to the other (EVENTS).

You have set the list of Pending user to a type User, that wont work, it would need to be a list of text (where you could then add the email address from the UserQueue.

If users need to register for the app, then you could use the User datatype, and then in Both Mike_Events and Mike_UserQueue, use a List of Users

Take a look at this demo, only the right had part of the page.

Imagine the left side is the list of users showing an interest in an event, and the list on the right is ones that have been added to the event. Does that sort of work for you as a case by case selection basis?

Dave,

I appreciate the help and I just wanted to say that before I start reading this :slight_smile:

To answer your question, on my app all the Users have signed up. I’ll take a look at what you wrote though and get back.

Once again thanks!

I’m still not getting it to work quite correctly. I tried changing my tables so the email was the identifier.

At the end of the day all I want to be able to do is assign someone from a queue list to be a user in the event list. Seems whenever I try to specify the criteria the text just turns red and it errors out. The video tutorials and documentation are lacking in this area so its tough to figure out unless I trial and error for a long time. Which i’ve been doing but its frustrating.

Currently users have to sign up…

What I’m NOT getting is… in workflow I click “When Button 1A is pressed” Make Changes to a thing. Says to Select a thing. I click on do a search for EVENT table (because I want to change a row in EVENT) and then it immediately turns red and wont go any further. I’m just not understanding… how else do I point?

I want to say “when i push the button 1A Take the user from this cell (current cell’s user information) and put into the row in EVENT where the eventname matches the button input.”

No matter what I do I cant get past step 1 the text just turns red.

It’s turning red because your action is to Make a Change to a single thing, so you need to identify a single Thing to change.

The expression “Search for Events” returns a list of all events in your database, so you need to drill it down to a single Event. Add constraints to the search so that only 1 record will match, then add the :firstitem modifier after Search for Events so that you can convert the list result to a single record result.

I think I followed your earlier description of what you’re trying to achieve, but check out what I did in your forumapp example.

1 Like

Thank you, I see now how I was confused between thinking that changing a LIST meant multiples vs. in my mind I was thinking of changing a list of items within a single entry.

So, looking at this its nearly what I want but it only edits the first item. What if I have four items that are four separate events, and I only want to edit the one which matches a specific ID or event name?

For instance 4 rows, event1,event2,event3,event4 If I want to edit event3 but I search for by firstitem it wont hit event 3.

Sorry if I’m being tough here, for what its worth I googled, searched, video’ed, etc. Just using this as a last resort.

That and I’m new to this so its probably a dumb question.

the only other workaround i see is creating a table for each event location, with the event there being chronological and at a specific time, so you send the users to those events and aim at different tables based on location? so rather that one table that is “events” I would have "events at 1A, events at 1B, etc. and each entry would be an event during a specific time window?

I understand what you’re saying - so that is actually how the Thing to change expression is already written. The search is constrained in such a way that only 1 event will match, so the :first item will return that specific event only. You could even use :lastitem and :randomitem here too because it’ll be the same - if only 1 event matches your constraint (per ID or some other unique combo), then it doesn’t matter which modifier you use… you just need to use something to convert the Search result from list to single item.

Look at it this way:

Search for Events returns Event 1, Event 2, Event 3, Event 4

Search for Events:firstitem returns Event 1 only

Search for Events: firstitem with a constraint on the search (Name = Event 3)… will return Event 3 only