I’m new to bubble and after long hours and two days of searching forums. I can’t find the answer to my problem.
I have two Data Types:
Writer with the ff. fields
Name - text (This field is a list: Disabled)
Books with the ff. fields
Title - text (This field is a list: Disabled)
Author - Writer (This field is a list: Disabled)
I wanted to updated my DB with The Writer’s Name and Book’s Author so I have this in my Workflow.
When Button Save is clicked
Step 1: [Create a new thing]
Type: Writer
Field: Name = Input - Author’s value
Step 2: [Create a new thing]
Type: Books
Field: Author = Result of step 1 (Create a new Writer…)
Field: Title = Input - Book Title’s value
My Problem:
When the Writer and Book is new to my DB. I have no problem since it is all new entry. But I’m getting duplicate entries for the Writer if I add another book under his name.
So for example, my 1st entry is, Writer’s name is “JOEY” and Book Title is “Learning Bubble”, and my 2nd entry is, Writer’s name is “JOEY” (as he wrote a 2nd book) and Book Title as “Solving Bubble Problems”. Now, I will get duplicate “JOEY” entries since he was already added in the 1st entry.
What I’m expecting to happen is that:
If the writer name does not exist yet, then proceed to ADD the Writer’s name and the book title, but if the the writer’s name already exist, add only the name of the Book. (is this possible) ?
Hello
Depending on the style of your application, I suggest using backend workflows.
Likewise, you can distribute the book and author creation process in several custom workflows and then trigger them with a condition according to the situation.
So this works avoiding duplicate. Since when the Writer’s name already exist, it will not create an entry anymore. The problem is that my Step 2: will also not work since it is referring to the result of Step 1. If I try to edit the update of my “Author” then I’m getting this loop or error
(My exercise or test Application is Only Adding Books in the DB:)
The only thing that is not in this example is the solution for handling changes, which you can also model from these workflows and create a workflow in the backend for possible changes so that it is automatically triggered by changes in values.
Note that when creating the change database event, set the conditions so that it is triggered only in the specified state.