Data not saving to database

I’ve got something wrong in my workflow because my option set Things isn’t ‘connected’ to the Parent Window - basically that field should show the Window_spec ID I think.

bead missing

In Step 1 I create a window and refer to Window_specs (Window_specs is a long list of custom states)

Then I make changes to Step 1’s “Window_specs” and set the default ‘bead_type’ but this isn’t being saved to the database?

For reference, the Window_specs Thing is referenced by the Window so they should be ‘talking’.

As a test, I’ve simplified to the point where I want to save one thing to the DB, but it won’t work … Here I want to save a single field;

But when I click the save button the DB is empty?

Hey @darren.james7518 , here are some troubleshooting steps you can take:

  1. In your Step 1 workflow action, make sure that you actually have a value in that custom state “create-window’s Window’s Window_specs” – this value should be a single “Window_specs” record that already exists. If not, you also need to create a new Window_specs before you can relate it to the Window.

  2. In your App Data view, set the Primary Field for Window_specs to unique ID for now (if it’s not already) just to confirm the record is connecting when you’re looking at it from the Window perspective. We know that there will always be a unique ID if the record exists even if all the other fields are empty.

  3. If you are triggering the workflow and nothing is showing up in the database:

  • Refresh the editor to “hard” refresh the data view.
  • Use the debugger (step by step) to confirm the workflow is actually running from the button click

You’re doing the right thing by trying to isolate things down. So continue to reduce things to baby steps until you find your culprit. Hope this helps!


Cheers, Gaby
Co-Founder at Coaching No Code Apps
Free Bubble Masterclass
Private Help

Thank you for your suggestions, I have checked all but as for your first suggestion, I don’t have a value in that custom state “create-window’s Window’s Window_specs” because it’s a new window? I think I am misunderstanding so I’m going to do a quick loom video …

The following should create the records and relate properly:

Step 1: Create a new Window
Step 2: Create a new Window Specs
Step 3: Create a new Window Pane Specs (if not already created)
Step 4: Make a change to result of Step 1 > “Window Specs” = Result of Step 2, “Window Pane Specs” = Results of Step 3

Custom states are just a way for you to hold on to values temporarily. But, in your case, your “values” are entire records – so, you still need an action to create the Window Specs, the Window Panes, and the Window Pane Specs. From there, you could save them to a custom state if needed (just depends on flows happening on your page). Try leaving out the state for now and at least validating that you can create and relate records from a simple workflow like I outlined above.

Thankyou @romanmg I have had some success now, you answered the most important question which was how to make the Datatypes ‘talk’ to the main Window, your Step 4 solved that (by referring all related Datatypes back to the Window).

I have renamed the Datatypes to:

WINDOW
-Window_specs
-Window_columns (List)
-Window_panes (List)
-Window_openers

Each Datatype is now the result of Step 1

and when I create a window these are now showing in the DB

As a test, I want to save the Outerframe data (which is a custom state on the group ‘create-window’)

Screenshot 2022-10-12 093245

But this is not saving to the databbase. Is it correct to save this when I Create the Thing, like below?

I also tried saving the information to the Database by Making changes to the Window_specs on a new step in the workflow, plus I tried referring to that data in a few different ways but no data is saving.