I want to have users upload files within a foreach - ie like an array of arrays. Think a use case like an apartment/landlord asking for multiple documents for same person ie banking will have multiple documents, ID will have multiple docs, references, etc. But all within the same ForEach in the interface. Each element of the ForEach has a different file upload instance. Thoughts?
Discussion posts and replies are publicly visible
So as per my understanding
Your ask : Lets say you have a Land Lord 1(Parent Record - One to many with the Child) who has three tenants (A,B,C - Child Records) who have to upload documents (one-many for the Child)as A :{1,2,3} B:{1,2,3} C:{1,2,3,4}. Is your scenario something like this? and you want to complete the document upload process for all the tenants A,B,C at once?
Something like this in a single interface that is repeated in a ForEach:
Only for Person A
File upload field for income (multiple files)
File upload field for references (multiple files)
File upload for ID (multiple files)
File upload for vehicle info/parking (multiple files)
Sure, this can be done. Do you have any specific question?
Yes how to handle the file upload local variable? I think I'm missing something. Running into issues during the save into. Do I use append since each file upload is an array? I'm assuming the localvariable should be an array of arrays?
I would prefer having an editable grid with the document category as an drop down.
You can add multiple files for each category as an individual row and limit the file uploads to 1 per row. This way you will not have to loop anything.
So let's say you have 2 files for each type for file upload. How would you handle with from a data perspective in terms of data structure type?
How are you storing these rows? Could you share the structure/data model?
My approach
Reference data
Table 1
Table 2
I can't share the code exactly but it's something like this we're doing now -
contents: a!cardLayout( contents: { a!forEach( items: ri!appianCommunityDocs, expression: {
a!columnsLayout( columns: { a!columnLayout( contents: a!columnsLayout( columns: { a!columnLayout( contents: { a!sideBySideLayout( items: { a!sideBySideItem( item: a!dropdownField( choiceLabels: ...etc
- all the card layout code -
...saveInto: { a!save( ri!appianCommunityDocs, append(ri!ri!appianCommunityDocs, save!value) ), a!save( target: local!tenantDocs, value: append( local!tenantDocs, a!map(documents: {} ), ) )
I am troubleshooting the local!tenantDocs variable but maybe the interface needs to be converted to editable grid instead.
a!fileUploadField(value: local!tenantDocs, saveInto: local!tenantDocs,