Why is there no ‘Get a thing’ capability? In every programming paradigm I am familiar with you are able to load/get/select a record/object/etc. and then use the data from it in your procedure. For example, using a database record as the model, the following is easily done in other tools.
Get specific ‘import’ database record - (ChildFirstName, ChildLastName, DOB, ParentFirstName, ParentLastName)
call the createChild() function like so createChild(import.ChildFirstName, import.ChildLastName, import.DOB)
call the createParent() function like so createParent(import.ParentFirstName, import.ParentLastName)
In Bubble, I must do this
Create a New Thing (child) and then for each field in the child thing I must do:
ChildFirstName = Search for imports:first item’s ChildFirstName
ChildLastName = Search for imports:first item’s ChildLastName
DOB = Search for imports:first item’s DOB
Create a New Thing (parent) and then for each field in the parent thing I must do:
ParentFirstName = Search for imports:first item’s ParentFirstName
ParentLastName = Search for imports:first item’s ParentLastName
So, I have to do 6 lookups compared to 1.
On the other hand, if there was a Get Data function, I could do this:
Get Thing (import) Search for imports:first item
Create a New Thing (child) and then for each field in the child thing I could do:
ChildFirstName = Result of Step 1 (Get a thing)'s ChildFirstName
ChildLastName = Result of Step 1 (Get a thing)'s ChildLastName
DOB = Result of Step 1 (Get a thing)'s DOB
Create a New Thing (parent)
ParentFirstName = Result of Step 1 (Get a thing)'s ParentFirstName
ParentLastName = Result of Step 1 (Get a thing)'s ParentLastName
This is 1 lookup, just like I would do in other tools. Wouldn’t this be far more efficient?
I know that I can accomplish this same thing if I was basing it on a visual component in a page and loading the thing there, but that is not possible in API workflows with no interface component. The work around I have is I create TWO API workflows. The first one is called something like ‘getImportRecord’ and it simply schedules the real workflow I want to run and does the search to pass the thing to the second API workflow. So, I have avoided the unnecessary extra lookups, but at the cost of complexity.
It would be a lot easier if there was a Get Thing function.
Is this something that has ever been asked for?
Does anyone else feel like this would be useful?
Thanks,
Marc