I cannot seem to get the EditForm to update my BLOB field. I have done my due diligence I think, so maybe someone has some ideas for me or know of some limitations I'm not aware of.
My data source is SQL Server Express. I have reproduced this problem on a simple auto-generated app with a gallery on the left and detail view/edit panel on the right. These are connected to a single SQL Server table, containing several text, numeric, and one BLOB field (VARBINARY(MAX)) I use to store photos. I ultimately want to be able to take pictures using the device camera, etc. but for this test am just trying to delete an existing BLOB field contents in one record.
So I have a few existing records in the table with images. By default, Power Apps creates the edit form and the DataCard for the Blob just includes a DataCardValue label that shows something like this:
appres://datasources/%5Bdbo%5D.%5BDatos_De_Macroinvertebrados_App%5D/table/%5Bdbo%5D.%5BDatos_De_Macroinvertebrados_App%5D/rows/90/inline/Blob
That's all good I think; it is just a text representation of where the record came from (e.g., table name and primary key = 90).
To see what it looks like, I unlocked the datacard and added two controls: an image and button. The button is used to set a variable "gblReset" when clicked (it is appropriately initialized of course). The datacard's Default property is
If(gblReset,Blank(),ThisItem.Blob)
The image's "Image" property is of course set to Parent.Default. For testing, I used similar code on one of my text fields just to see if there is difference and whether I have things wired up correctly. I've been working on this long enough that I don't think I have stupid mistakes with global or context variables, etc.
When a record is selected, the detail screen correctly displays all fields, and the image control nicely shows the image just like I want. When I click the button, the image (and test text field) both go blank. When I accept the changes and the SubmitForm happens, I see that the text field is set to null, but the BLOB field is not.
In summary, I can get the BLOB images to nicely move down from SQL Server into my form, but I cannot seem to be able to update the datasource with changes to the BLOB field.
Note that in testing I also tried very small JPG files, so the problem is not associated with too large files.
Thanks much,
Chris