So I was trying to allow a user to upload data to the app via the front-end but it turns out If your table has a relationship with another table in the database you can’t do it.
You get this error “This type of field is not supported by the upload CSV action: custom.company”
You can do it via the database as it allows you to specify a sub field of the linked table.
This was an issue that caused me a bit of frustration a few months back. (May have changed since then, but this solution likely still holds).
For the table that the user is uploading, I create a “reference” field which is plain text. (However, the unique ID would go here or other matching field. (In this case, call it “company_reference”).
Once the data is uploaded, I schedule an API workflow on a list. (With the list being the CSV uploader’s items).
Within the API workflow, I now fill out the “Company” value for each record, accomplished through a "Do a search for:Companies:first item (with the constraint of Company_Name = company_reference). It’s a bit of a consuming workflow, but works.
It’s ideal if you can use unique identifiers (Bubble’s or self generated) instead of straight text (ex. if you have two Acme, Inc’s, you’d run into issues). Though that may not be ideal from an end-user standpoint.
Thanks that does sound like a good work around solution. I will give it a go. Hope Bubble improve their data upload capability because its very limited at the moment.
@gnelson When you ‘upload as csv’ through runmode or through an API call, the csv file should contain the uniqueid of the linked data type in that linked field’s column. Here’s a video demo.
@josh10 if it’s a linked data type and there is no match, the field will be left empty on upload. There is no further validation / rules supported at the moment before adding to the database when you upload as csv.