# Bubble creates data item even when the condition is false

**URL:** <https://forum.bubble.io/t/bubble-creates-data-item-even-when-the-condition-is-false/337533>\
**Category:** Database\
**Created:** [August 30, 2024, 4:56pm UTC](https://forum.bubble.io/t/bubble-creates-data-item-even-when-the-condition-is-false/337533 "2024-08-30T16:56:59Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![wrent](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@wrent](https://forum.bubble.io/u/wrent)\
**Post date:** [August 30, 2024, 4:56pm UTC](https://forum.bubble.io/t/bubble-creates-data-item-even-when-the-condition-is-false/337533/1 "2024-08-30T16:56:59Z")

</div>

Hello

I have a workflow in which if a certain condition is true it should create a database item. The problem is it creates an item every time even when the condition is false. The only difference is that when the condition is false the created record is empty (so the condition works for the fields of the created thing but not for the creation itself). Anybody has any idea why is this happening?

---

<div class="post-metadata">

**Author:** ![Baloshi69](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/baloshi69/32/136122_2.png) [@Baloshi69](https://forum.bubble.io/u/Baloshi69)\
**Post date:** [August 30, 2024, 5:13pm UTC](https://forum.bubble.io/t/bubble-creates-data-item-even-when-the-condition-is-false/337533/2 "2024-08-30T17:13:03Z")

</div>

can you share some screenshot or come on a call

---

<div class="post-metadata">

**Author:** ![georgecollier](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/georgecollier/32/182327_2.png) [@georgecollier](https://forum.bubble.io/u/georgecollier)\
**Post date:** [August 30, 2024, 5:26pm UTC](https://forum.bubble.io/t/bubble-creates-data-item-even-when-the-condition-is-false/337533/3 "2024-08-30T17:26:12Z")

</div>

You should share screenshots of your workflow and actions if you’d like help debugging, but the step-by-step debugger is good and will help you work it out yourself faster too.

---

<div class="post-metadata">

**Author:** ![wrent](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@wrent](https://forum.bubble.io/u/wrent)\
**Post date:** [August 31, 2024, 8:05am UTC](https://forum.bubble.io/t/bubble-creates-data-item-even-when-the-condition-is-false/337533/4 "2024-08-31T08:05:52Z")

</div>

I cant use debuggger unfortunately, because it’s a backend workflow.

Here’s the screenshot:

 ![Zrzut ekranu 2024-08-31 o 10.05.27](https://us1.discourse-cdn.com/bubble/original/3X/1/6/16cc258011bfcb763e5b6947ce78dcc5f51d4978.png)

---

<div class="post-metadata">

**Author:** ![georgecollier](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/georgecollier/32/182327_2.png) [@georgecollier](https://forum.bubble.io/u/georgecollier)\
**Post date:** [August 31, 2024, 8:25am UTC](https://forum.bubble.io/t/bubble-creates-data-item-even-when-the-condition-is-false/337533/5 "2024-08-31T08:25:49Z")

</div>

If result of 2 is empty, you’re creating a thing.

Then, you’re setting tthe sprzet to Result of step 2’s Parent. That means that the field you’re setting will _always_ be empty.

So, I’ll bet that your condition is actually true and Step 2 is never created, which means step 3 will be created.

---

<div class="post-metadata">

**Author:** ![wrent](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@wrent](https://forum.bubble.io/u/wrent)\
**Post date:** [August 31, 2024, 9:52am UTC](https://forum.bubble.io/t/bubble-creates-data-item-even-when-the-condition-is-false/337533/6 "2024-08-31T09:52:16Z")

</div>

The condition is not “when result of 2 is empty” but “when result of 2’s sprzet single is empty” and most of the time it’s actually not true - i checked the created records of “nie dodano” in the database and the fact is that they are not always empty.

It looks like if the condition is working for setting the field “sprzet” but not for creating the item. It creates “nie dodano” every time but sets “sprzet” field only when the condition is true.

---

<div class="post-metadata">

**Author:** ![georgecollier](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/georgecollier/32/182327_2.png) [@georgecollier](https://forum.bubble.io/u/georgecollier)\
**Post date:** [August 31, 2024, 9:54am UTC](https://forum.bubble.io/t/bubble-creates-data-item-even-when-the-condition-is-false/337533/7 "2024-08-31T09:54:17Z")

</div>

> [@wrent](#):
>
> The condition is not “when result of 2 is empty” but “when result of 2’s sprzet single is empty”

Oops, sorry I misread.

Have you checked the logs to understand what’s happening and why?

---

<div class="post-metadata">

**Author:** ![wrent](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@wrent](https://forum.bubble.io/u/wrent)\
**Post date:** [August 31, 2024, 10:03am UTC](https://forum.bubble.io/t/bubble-creates-data-item-even-when-the-condition-is-false/337533/8 "2024-08-31T10:03:47Z")

</div>

Yes, but unfortunately I cant see any valuable info.

 ![Zrzut ekranu 2024-08-31 o 12.02.45](https://us1.discourse-cdn.com/bubble/original/3X/a/a/aa62e7982d25ab364f0b60a2575443fc1721e7d9.png)

---

<div class="post-metadata">

**Author:** ![jonah.deleseleuc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jonah.deleseleuc/32/199133_2.png) [@jonah.deleseleuc](https://forum.bubble.io/u/jonah.deleseleuc)\
**Post date:** [August 31, 2024, 10:10am UTC](https://forum.bubble.io/t/bubble-creates-data-item-even-when-the-condition-is-false/337533/9 "2024-08-31T10:10:11Z")

</div>

Have you enabled all the log filters ? (The little checkboxes above the logs) They allow you to see more information

---

<div class="post-metadata">

**Author:** ![wrent](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@wrent](https://forum.bubble.io/u/wrent)\
**Post date:** [August 31, 2024, 10:15am UTC](https://forum.bubble.io/t/bubble-creates-data-item-even-when-the-condition-is-false/337533/10 "2024-08-31T10:15:12Z")

</div>

I didn’t know about that, thanks! But unfortunately in the problematic workflow logs nothing changed after enabling all the filters.

---

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [August 31, 2024, 2:51pm UTC](https://forum.bubble.io/t/bubble-creates-data-item-even-when-the-condition-is-false/337533/11 "2024-08-31T14:51:04Z")

</div>

What is the condition on the step 2? Likely the thing that you want to create in step 2 is not getting created, so step 3 always creates the thing you want to create in step 3, and because step 2 didn’t create, the value for step 3 of sprzet coming from step 2 is empty.

---

<div class="post-metadata">

**Author:** ![Sarah\_Esteve](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sarah_esteve/32/258989_2.png) [@Sarah\_Esteve](https://forum.bubble.io/u/Sarah_Esteve)\
**Post date:** [August 31, 2024, 5:01pm UTC](https://forum.bubble.io/t/bubble-creates-data-item-even-when-the-condition-is-false/337533/12 "2024-08-31T17:01:58Z")

</div>

Check privacy rules, we never know… I see the user is anonymous, so depending on what you set up for the SINGLE data type…

Maybe you can check “ignore privacy rules” for your API Workflow 🙂

What I do for clearer “logs” is always have a table “admin logs” with fields :

- label : what I m logging (wf creation of thing xy etc)
- data : SINGLE IS EMPty : result of step is empty etc etc
- dev : an option set with developers names so we can separate our logs(and scream at the one who never clean his logs and let 10k logs in the app 😆)  
Hope this helps
