Combine the Values -
clarencemartin - 02-24-2023
This is a really cool action.
I assume that this is where one would create comma-delimited links to database records in a possible to a one-to-many and many-to-many relationship with records.
An example, please.
RE: Combine the Values -
marktalluto - 02-27-2023
Hi Clarence,
You can use this action to take the value of one variable or typed input and the value of a second variable or typed input to put them together to be stored in a variable.
Eg:
Var1 = Apple
Var2= Orange
Separator = , (comma)
The result is stored in an existing or new variable = Apple,Orange
This action is most useful for displaying content that should be put together. You could also use this to merge two values to be stored in a database.
Once we add the cdb_merge() function as an action, I would consider using that since the merge to data can be done in a single call.
RE: Combine the Values -
clarencemartin - 02-27-2023
The cdb_merge() function will be handy to create 1-to-many links in the data, then?
RE: Combine the Values -
marktalluto - 02-28-2023
Are you looking for database joins?
We have some ideas about this down the road.
In our apps, we currently store the recordIDs as foreign keys.
Eg:
Table - Employees with the keys: firstName, lastName, tasks
Table - Tasks
In Employees we have a list of names. Each record may look like this:
firstName: Dan
lastName: Jones
tasks: recordID45, recordID77
In our Tasks tabler we have many records describing potential tasks for employees. RecordID45 and recordID77 are relevant to our example employee.
recordID45: Take out the trash
recordID77: Power the cold fusion system
Thus, our Employee record will have: RecordID45,recordID77 in the tasks key for table Employees.
When we do a read on the employee record, we will do a secondary read on records recordID45 and recordID77 to get the tasks and display this nicely in a form or some other view.
RE: Combine the Values -
clarencemartin - 02-28-2023
Sorry, I went offline. I'll explore your example today.