Creating one table for all images

Can I have one table store images from several parent tables? - like a mass storage of sort

So, that all the parent tables have an inline view, showing respective images from the images table

0 14 875
14 REPLIES 14

I donโ€™t see why not. Seems like you could have a table with just an image column type and a key (foreign key from the parent tables). The add a REF so you can view the child table records from the parent. Have you tried that to see if it meets your need?

@Mike Iโ€™m afraid this wonโ€™t work directly because you canโ€™t choose more than one table for your Ref field. You would need to have one Ref field table by table.

@Aleksi - ahโ€ฆ I missed a key word. I was thinking @Jeremy_F was looking to store images in one place to use in other parent tables. I missed the fromโ€ฆ

Yes, I want one table to store images to use in other tables, instead of creating multiple columns in each table for images

Steve
Platinum 4
Platinum 4

Move all of your images into a single image table, but add a column to indicate what โ€œparentโ€ table each image belongs to. Then create slices on those parent table column values.

This definitely works, but I decided to use one column per parent, instead of having many slices. Though it would be great if could have multiple โ€˜ispartofโ€™

I am curious whether the number of images uploaded has an effect on the sync time for an app.

Only if your app is configured for offline use, Iโ€™d think. In that case, the app will try to download all images during a sync.

Another potential solution could have been a many-to-many RDB schema, similar to below:

Sometimes, I might be in the field with almost zero Internet, will the app upload the images even if I am offline?

Thatโ€™s good question! @Aleksi, do you know?

@Jeremy_F When you are offline, you are offline totally and the app wonโ€™t upload any images. When you are online again, you can sync the data again.

Thanks for the clarification

Iโ€™m interested in this , I have a set up where my parent table containing jobs references an images table, and references a files table , and references notes tables. When I view a job I have a ref inline view of the child tables but Its getting very slow to load the app or to syn etc . I have offline use switched on but store content for offline use switched off. Would you suggest my structure is the issue?
I donโ€™t know what an appropriate syn / update time would be but generally looking at 12 seconds, even to update one field at times. It was previously 30 seconds but a bug was found and resolved and times dropped to around 4 seconds but its gone up again and I am not sure why.
Would the volume of images cause an issue? My inline view only shows one when they access the job, if they click to view the images it will show more.

If you want all app-related content available when offline, you really have no choice but to switch Store content for offline use to ON.

Itโ€™s virtually impossible to say what the โ€œexpectedโ€ or โ€œreasonableโ€ sync/update time for someone elseโ€™s app should be without a review of the app configuration, the data, and the devices involved. There are a great many variables. A common cause of slow sync times is excessive or inefficient virtual columns. Itโ€™s very easy to create an inefficient virtual column. A very large data set can also be a problem, especially when combined with inefficient virtual columns.

The number and size of images doesnโ€™t play a big role in sync times, I donโ€™t believe. Sync is when the app updates data in the tables. Images are updated separately in the background (as I understand it). The number and size of images will affect the volume of data (wi-fi or cellular) the device uses, and how long it takes new or updated images to become available on the device, but should not substantially affect sync time.

Top Labels in this Space