Format as text generates Ghost string/line

Hey, I’m formatting items from my database to make an API call, using the format as text in Bubble for each item in a list.

However, I’m running into an issue, bubble is generating a string that contains more than I expect. As you can see in the screenshot below, the only output I want is the date 2025-05-27 as the key. But instead, Bubble also outputs text about the availability like half day availability but without a date.

I suspect the issue lies in how the availability field (which is stored as a “yes” or “no” value) is being formatted as text, it seems to turn into “half” or “full” day, and that’s probably why it shows up in the final output.

I’m hoping someone can help me understand what’s going on here. I attached some Pictures below for a better understanding of my problem.

It seems that the availability date is empty and full day is no, then you get “”:“half”. So Bubble is doing exactly what you tell it to do. :smile: Just make sure that those 2 values are not blank and as expected.

1 Like

Your DB schema seems to be

roomSelector_instance

  • availability (List of roomSelector_availability)

You seem to have 2 roomSelector_availability records associated with that roomSelector_instance record, within its availability field (the second record might be a phantom deleted record)

From here, you’re obtaining something expected. You have two elements in that customAvailability JSON node because you have two elements.

Besides, you are instructing Bubble to format that full_day field as full or half depending on its boolean value.

1 Like

Hello , Thank you for both for your rquick reply :smiley:

Unfortunately, I still don’t fully understand what you mean. I have only one item in my table, but I’m seeing two records in my final JSON output. Could you please explain again why there are two instead of just one?

Yes thats right, greate Instinct.

How would I get rid of that phantom record?

Indeed, but you have to check your roomSelector_instance record to see if there is a phantom record there. If there is, it’s manifested there, not in the roomSelector_availability table.

You just delete it from the DB editor when you spot it.

1 Like