Just use multiple “only whens” to do the various tests. We don’t have this explicitly, but it is doable.
This is “Schedule API Workflow” - so you run a “subroutine” on a list of records. Note that this is “a priori” in that you need to know the list of records in advance, you can’t (easily) do
“Joins” are implicit in the Bubble Database by the use of Custom Fields that link tables.
No, I mean the primary key is a pair (not individual one by one), please see example below
Primary key in Contract_Device table is Contract_Number + Device_Model then it is foreign key in Device_Assign table, please tell me how to:
Manage the primary key in a pair in Contract_table (Contract_number + Device_Model) is not doublicate
How to access Contract_Device table via foreign key from Device_Assign table, because I see in Define Primary Key option in Bubble setting do not allow us option primary key is a pair as picture below.
That is somewhat confusing, it is NOT anything to do with Primary and Foreign Keys. It is just what field shows up when you link two tables.
In bubble, the way you link two tables is not via Keys. It is effectively via embedding the objects (things) in other objects (things). So sort of Object Relational. At least at the front end.
So… You have your Device Assign… in which you embed your parent. And remove the Foreign Keys…
And you embed a list of Device Assigns in Contract Device
That is the One-To-Many set up. The relations are set up by maintaining the list with add/remove. if you delete the child, it is removed from the parent list - So if you don’t want to do that … put the RI constraint in code.
You navigate the relation using “appostrophe languange”.
So you you have device assign thing, you can say …
Thanks NigelG! I have tried Loop with “Schedule API Workflow” to loop from 1 to N then call API Workflow, can you tell me how to loop to scan a table each record from the first record to last record?
Thanks and Regards,
Long