I upload multiple files into a cell, how do I display them?

I have a form where a user can upload an arbitrary number of files into a cell in each row.

Ech row is an item, like a piece of furniture or an appliance. the documents may be pdfs of specifications, an installation manual, etc.

How do I then display links to the item’s files on the item detail screen?

You can use a Link component.

thank you, that worked to get links on the screen, but is there a way to display custom link text, rather than the file name, which is very long sometimes?

Assuming it’s a Multiple Files column, then no, not easily.
If you want that, then you are probably better off splitting the files out into a dedicated table, with one row per file. Then you could have an extra column for the custom label, and display them in a collection.

I tried making a table like that, but I don’t know how to get files in there and have them associated with a particular item, or how to display them nicely. I couldn’t find documentation on how to do it, and the AI doesn’t help. are there instructions somewhere?

You can check this out.

That’s a bit much for me. Can I have a single form where some fields write to one table, but other fields write to a different table?

1 Like

Your table would need a minimum of 3 columns (all Text type columns):

  • ItemID: this will link to the Item the file is associated. You should use the RowID value from your Items table for this.
  • File: this will be the URL of the uploaded file
  • Description: this will be the custom label/description for the file

To add files to a specific item, add a button to the item details screen, and configure the action to “Show Form Screen”. Target the form screen at your Files table and add input components for the File and Description. Also add a “Values from Screen” component and select the RowID column, and target that at the ItemID column.

To display the files, use any type of Collection component, target it at the Files table, and use screen filtering to only show files associated with the current Item.

@ThinhDinh - Miracle Method also occurred to me, but I don’t think that would help here (with a Multiple Files column), as there is no way to add labels for specific files.

Ahhh, that would be tricky. Yeah, I think your method above would work best.

I’ve got this functionally working, but my client wants the form screen to have her color pallette (background color, font color, etc). is there a way to add css to the form screen?

There might be, but that is outside my wheelhouse. @ThinhDinh or @Himaladin might be able to help you with that.

You know you can use a container in your form and set the background colour of that, yes?

1 Like

Yes, but the top and bottom of the form are outside of the container, so they dont change color, and they dont use the Accent color, they just stay white.

Can you elaborate by showing the type of form and components you are using?

Here’s a text with an overlay. All components are contained inside a container like Darren suggested.

div[class*="form-or-edit-modal"] div[class*="chrome-common"], div[class*="form-or-edit-modal"] div[id="overlay-scroll"], div[class*="form-or-edit-modal"] div[class*="content-common___StyledDiv4"] {
background: #623dc7;
}

div[class*="form-or-edit-modal"] span {
color: white;
}

div[class*="form-or-edit-modal"] button[aria-label="Submit"].disabled {
background: white;
color: grey;
}

div[class*="form-or-edit-modal"] button[aria-label="Submit"].filled {
background: black;
color: white;
}
2 Likes