When images are uploaded through an Appsheet app form, the Appsheet names images files in the format [Table’s Key column].[Image Column Name].[TimeStamp] that are cryptic at times for users.
Instead of saving images in the “Parent” table, if the app creator can have a three-column child table to the “Parent” table to save images, the images could have meaningful name strings.
Columns in this child table will be [ID ] - Key column, [Parent Table ID] - Reference to “Parent” table and Image Column called say [IMG] .
The initial expression for the key column of the child table can be something as below and it could also be populated through a LINKTOFORM() action during the parent record save. Parent Fileds are the fields that we wish to include in the file name string.
CONCATENATE([Ref Column].[Parent Field 1] ,"-", [Ref Column].[Parent Field 2] ,"-", [Ref Column].[Parent Field 3] , RANDBETWEEN(1111,9999))
RANDBETWEEN() or UNIQUEID() can be used to bring uniqueness to the key.
Then create a LINKTOFORM() action on the parent “Parent” record save event to prepopulate child record with reference column and child table key with the above-suggested CONCATENATE() expression’s pattern.
“Child Table Form”, “Child Table Key Column”, CONCATENATE(Parent Field 1] ,"-", [Parent Field 2] ,"-", [Parent Field 3], RANDBETWEEN(1111,9999)),
“Ref Column in Child Table”, [Parent Key]
Then the saved image file names will have an initial string from the parent table fields as desired.
An example below
Parent Record. We wish to populate image file name string with [MainType], [Type] and [Name]
On saving the above parent form, it takes to child form through LINKTOFORM() action. The key of the child record is prepopulated with the desired fields from the parent table
The back end Google sheets looks like below
Parent Table back end
Child table back end.
The portion highlighted in blue adds the desired string to the file name. The portion highlighted in orange is the default file naming convention followed by AppSheet.
Inline gallery view of images will also look better with more meaningful image names
Hope this makes sense.
Edit: Minor edits in description.