web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Updating Dataverse fil...
Power Apps
Unanswered

Updating Dataverse file field not working for offline-enabled Canvas app

(1) ShareShare
ReportReport
Posted on by 95

I'm currently creating an offline-enabled Canvas app using the new preview functionalities, in particular the seamless Dataverse file and image integration that was pushed out to general users early last month. I'm using this via a form control attached to the data source, and then adding in the fields as data cards and letting Power Apps hook it up for me.

 

Besides unlocking cards to edit visuals, I have not done much backend tinkering besides ensuring the uploaded file in the attachment control is of a valid file type (PNG, JPEG, JPG). The code for this is in the Attachment control's OnAddFile property, and can be found below:

 

 

// Ensure only png, jpg, or jpeg files are uploaded
If(
 Or(
 EndsWith(
 Lower(First(Self.Attachments).Name),
 "png"
 ),
 EndsWith(
 Lower(First(Self.Attachments).Name),
 "jpg"
 ),
 EndsWith(
 Lower(First(Self.Attachments).Name),
 "jpeg"
 )
 ),
 // eligible
 Notify(
 "Valid file selected.",
 NotificationType.Success,
 2000
 );
 UpdateContext({locFileUpload: Self.Attachments}),
 // ineligible
 Reset(Self);
 Notify(
 "Only PNG, JPG and JPEG files are supported.",
 NotificationType.Error
 )
);

 

 

I've set it up as per the documentation found here and while files are successfully being saved to Dataverse when the device is either online or offline, I'm struggling to get it to update the file on a row where that field is already populated with an existing file. This doesn't happen when I test it on my desktop browser via Maker Studio, however it's affected on my iPhone device even when it's online.

 

I've ensured that the Update property for the file field data card is hooked up to the Attachment control ([control name].Attachments), and also that the default of the Attachment control is set to the same field property of ThisItem. Is this a known limitation with the new preview feature, or am I missing something painfully obvious in my implementation?

 

To clarify, no new rows are ever created -- the form is hooked up to existing rows exclusively that may or may not have an existing file in the file field. When it doesn't have an existing file, it saves as expected whether the device is online or offline. When it does have an existing file and you want to update it, the row does not update the file field, even when the device is online. This problem does not happen on my desktop browser, but this is redundant as the end users will always be on a mobile device using the dedicated app.

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard