I have an image column in my table, which works well to upload and then view pictures. However, to avoid users repeatedly taking a photo of the same โdefectโ I have inserted a column of type โtextโ with the option of selecting between โadding new photoโ, โuse the one from the previous recordโ, or โno photoโ [albeit in fewer words!!]. Adding this button is easy, and I can also conditionally show the image object only if the aforementioned selection = โUpload new photoโ.
However, where Iโm stuck is what my expression needs to be to cater for the 2nd option [copy from previous]. I added an if statement in the formula box for the image column, around retrieving the image path from the previous record if user selects โcopy from previous recordโ, but I donโt know what my else statement needs to be to cater for the option of uploading a new photo, so my image object just disappeared off my screen. What to do โฆ!
many thanks for any ideas of where Iโm going wrong
Hi,
Not sure if i got you , and i am not really experienced.
The using existing pictures option, i suppose you wanna show up a list of available pictures.
To be able to choose a pic from a list, the type of the Column Images should be a Enum or Enum List.
Under Data Validity (Valid If) expression would be:
SELECT(TableName[Images],TRUE)
I am wondering if you would need to create a extra column to be able to choose the pictures and copy the value to the column Images.
Maybe it could be with an Virtual Column called [ListOfImages], and a expression for the Initial Value of column [Images]:
IF([Upload Image e.g. of defect]=โUse Previousโ,[Images]=[ListOfImages],"")
Not sure if it helps
hey, thanks for the advice, and apologies if my description wasnโt clear. Essentially, when highlighting a defect I want the user to be able to choose to add a photo which is stored with that record, viewable by others. However, if the defect has already been identified/photographed then Iโd rather they choose form the existing photos, rather than fill up my S3 storage.
I was looking at it too simply, trying to do with one or two objects/columns, so I changed that. Following your advice, my data model now includes the following 4 objects:
item 1 is always shown, 2 and 3 are conditionally shown based on item 1, while item 4 is hidden [and item 4 represented the aggregated output, used elsewhere]
Many thanks
Diarmuid
Further to my rather triumphant summary above, I have since realised that whilst this method works well in theory, it actually duplicates all photos, as each time a new picture is uploaded it is named by column reference in storage. Seeing as this is now straddling two columns [โImagesโ, plus โchosen pictureโ] then the system saves it twice, once with each column name. Can I prevent this, and only upload the Chosen picture column item [i.e, inhibit upload for the Images column]?
Hi, i imagined also this
That is why i told you if you could make the column [Chosen Picture] as a Virtual Column.
Then make the input from this Virtual Colmn [Choosen Picture] to be copied to the Column [Images].
You could make this copy by setting an initial formula in the Column[Images]:
IF([Upload Image e.g. of defect]=โUse Previousโ,[Images]=[Choosen Picture],"")
I didnโt try this solution, but you could give a trial.
You can try also writing a formula in the suggested values. I never used this field, maybe it helps also.
SELECT(TableName[Images],TRUE)
[Images] is where the new picture is selected. I donโt think I can add a formula to that without knocking out my photo taking option. Iโll rejig it and try again. thanks
Yeah i know, but you can force a value on it with an initial formula.
In the end the picture is just a text in the spreadsheet with the folderpath/picname.jpg or png.
I donโt think the initial value will help a lot, as the โproblemโ [i.e. photo duplication] only arises when the user chooses to upload a new photo, so the [Images] column will have passed from initial value to selected photo value by the time it does anything.
Having the [Images] column as a photo selection input works well, as does the selection of the previous, plus the aggregation of these inputs to produce [ChosenImage], albeit with the duplication issue.
I tried to use a VirtualColumn for [Images] so a photo can be taken, in the hope that only the [ChosenImage] column image gets saved, but I cannot use a VC without an app formula, so Iโm back to โrealโ columns, and feel like Iโm going round in circles โฆ
Further ideas very welcome. Thanks a lot
Hi, my last trial on this !
Two tables:
Defects
Fotos
Defects[Foto] is a Ref from Fotos[FotoID] = must have same value.
On table Defects it looks like this
On table Fotos it looks like this
The Defects Form
When clicking on Foto, User can choose existing one or creating a new.
This happens thanks to Ref.
Make column [Foto] not required so if user doesnโt want, he wonโt add a picture.
You wonโt need column Yes, Choose Previous, No.
If you click in New , you will be redirected to the form of the table Fotos.
Hope it helps!
thanks a lot. I was actually unaware of this โrefโ option, so Iโve definitely learned something new here. I like that, and it works. thanks so much
User | Count |
---|---|
16 | |
10 | |
8 | |
5 | |
5 |