Skip to main content
Solved

How to preview multiple files that are stored in a table?

  • September 1, 2022
  • 2 replies
  • 64 views

Alex Kerschkamp
Captain
Forum|alt.badge.img+3

Hello all,

The preview component works well, but it grabs the first file that it encounters in a table row. However, we have two files in a table row. Let's say, we have a proof of purchase, and a discount voucher. Both are obtained through an API call, stored as Base64 and converted back to their binary form after insert. The binary file is stored in the proper storage column linked to the file/filename field. This works flawlessly.

We only get to see the first file, though. The second file is simply ignored. How do we display both files?

Best regards,
- Alex

Best answer by Alex Kerschkamp

Thanks Freddy! We've been playing with ideas. The options you provided didn't quite fit our needs. We ended up storing the files in a separate table. This way, we can preview one file at a time.

View original
Did this topic help you find an answer to your question?
This topic has been closed for replies.

2 replies

Freddy
Forum|alt.badge.img+16
  • Thinkwise Local Partner Brasil
  • 531 replies
  • September 1, 2022

You could achieve this is to make 2 variants each with the file you want to see as first column. 

Or make a view on top of that table and use the unpivot function to make columns into rows so every row has only one document and thus will be shown. 


Alex Kerschkamp
Captain
Forum|alt.badge.img+3
  • Author
  • Captain
  • 36 replies
  • Answer
  • September 16, 2022

Thanks Freddy! We've been playing with ideas. The options you provided didn't quite fit our needs. We ended up storing the files in a separate table. This way, we can preview one file at a time.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings