Hey Commuity! I have the following case to solve concerning data
structure for my app project:
I have:
1 ) Map/List with entries that are entered through a form by users (a
surf spot). —> every entry gets one row in the main data table named
‚spots‘. That is all set.
I want:
2 ) Users are on the detail view of entry (surf sport) and can add
foto/text to that detail page afterwards (fotos of their surf session -
if it was only text, I could use the comment function. But I want to
enable foto/video upload).
Therefor I need a new form button & form.
The question I have:
a) Does that form write into a new table? If yes, how do I link all
entries in the new table to a specific row in the main data source ’spots’?
b) Or can I write those entries directly in the main table in the row of
the specific entry?
c) Frontend Display: would you use an inline list to display those
entries on the detail page?
How do I structure such a behavior?
I would create a separate images folder. Especially if you have an open ended number of images that could be added to a spot.
First create a RowID column in your spots table.
Add a form on your spots detail screen to add a photo and have it write to an images table. Add a column value component to the form to retrieve that spot ID and pass it through the the form. Now when you add images, it should include the row id of the spot.
In your spots table, create a multiple relation linking it’s RowID to the spot ID stored in the images table.
This relation can be the source of an inline list that will display the images.
in the properties of the rowID picker component it shows a column selection dropdown. The columns there are only the columns from the spots table. which one is to choose? Any?
Yes, you need somewhere to put the Spot ID in the images table. What you have looks good, just make sure that “Value from Screen” Row ID is writing to that Spot ID column. A type of ‘text’ is fine.
When you configure your form, make sure that it’s pointing to the images table. That’s the table it will write to. Looks like you currently have your form writing to the spots table.
Click on the form button to go into the form. When the form opens, don’t click on any components. What you see on the right hand side should be the settings for the form.