Why is my list of things not working after 3 data points added?

Hi all,

I’m adding to “list of quantity” every time a new order is made. But I notice that the “list of quantity” will stop adding once 3 orders are made. This happened to every single listings. The max of things added to the list will be 3x. Does anyone know why? and how to resolve this?

Thank you!

Hi there, @chefheroes27… if you can provide screenshots and/or a link to your editor with a clear explanation of where to look, I’m sure someone can help you figure out what’s going on. Without those things, it’s not possible to say what might be causing the issue.

Best…
Mike

Thank you for your reply @mikeloc ! What I notice is this workflow can add to the list accurately for 3x. After 3x, most of the time it’s not adding and in a very few times it’s adding. Oddly enough, everything in the workflow occur, except for this one. Nothing changes between trials.


This is the picture of the general workflow. Adding into the list happened in step 3.

image
This is the zoom in picture of step 3

image
This is the image of the data in the list


This is the image of all the orders created as the result of step 2.

As you can see a lot of the orders are not recorded in step 3, but recorded in step 2. I just don’t understand how sometimes it’s recorded and sometimes it’s not when they all have the same workflow.

I’m not sure what you are showing there, but lists can’t contain duplicate items (so, a specific number would only appear in a list one time)… maybe that’s what you are running into?

1 Like

Yes! that’s it! it’s a very important insights that you just shared. Thank you so much.

By the way, do you know how to automatically take down listing when it hits the expiry date / when it’s out of stock? Ideally, I want this to just happen in the background, without the need for me to trigger it. I’m sensing I need to use backend workflow. But I’m quite confused on how to use them. I already have “published status = yes/ no” in my database. @mikeloc

1 Like

Workflow - how to take down listing automatically when it hits its expiry date? - Question - Bubble Forum

Backend workflow? - Need help - Bubble Forum

2 Likes

Hi Adam, I’m aware that I have been asking the same question in the forum and every time I asked it, you always responded. I appreciate the time you took to respond. I found your explanation to be quite high level for me. I’m a newbie and need more of a detailed walkthrough. I have also asked follow up question with you, but I’m still confused & unable to execute on it. Thus, I was hoping if other people, such as @mikeloc, have an idea and wouldn’t mind to have a go in explaining, I would really appreciate it. Thank you to @adamhholmes and @mikeloc and everyone else. I’m really feeling the support of a community here and def made my journey in making my app for the first time so much easier!

Ok… here’s a detailed breakdown… it’s really very simple.

Here’s how you do it for the expiry date:

First, make sure your database is set up correctly, with at least the following fields on your Listing Datatype:

image

Next, set up a backend workflow with a single parameter of ‘Listing’, and a single action to change that listing’s publication status to ‘No’

Then, wherever it is you create your listing, just add an action to schedule that workflow to run on the expiry date of the listing:

That’s all there is to it.

If you want to do it when the stock count hits 0, you can just use a database trigger event as shown below (although you could argue there’s really no need for that… just use search constraints on your listing pages to exclude Listings with a stock count of 0).

In any case, here’s all you need to do:

Set up a database trigger event on the backend, as shown below:

Then in that trigger event, just schedule the ‘Unpublish Listing’ workflow:

It’s that simple.

Thank you so much, Adam. Appreciate your help & support. This is very detailed and very easy to follow. I think I have managed to remove the listing when the expiry date is reached.

But I do have a prob with taking the listing down when it’s out of stock. I think I have followed your steps well. The only difference is that I don’t have a stock count. I recorded the data as availability and order quantity → stock count = availability - order quantity. I have attached my set up for your reference. If you have the chance, keen to get your thoughts on why it’s not working.

Your only when condition is wrong… you’ve got the same expression for both parts.

The first part (before) should be more than zero, and the second part should be zero.

But it would be simpler with a Stock Count field in any case.