cancel
Showing results for 
Search instead for 
Did you mean: 

MDK - Saving value field from Form Attachment offline.

Hi,

I have an MDK app with an offline store where the user must fill form sheets. Sometimes the sheets cant be completely filled at the same time. So I have a save functionality that saves the the information without creating an entity.

My problem is saving a list of attachments inside a Control.Type.FormCell.Attachment. Is there any way to save this list in the phone’s memory without using the offline store?

Thank you in advance.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

noliv

Were you able to resolve your issue? If any of the below responses helped you, then please mark the helpful answer by accepting it OR post an answer so others might benefit from your findings and then close this discussion.

Regards,
Jitendra (SAP Community Moderator)

Accepted Solutions (0)

Answers (1)

Answers (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

As with all form cell controls, you can access the current list of attachments selected in the Attachment control. For each attachment you can save it as needed based on your requirements. You could convert the attachment to a Base64 string and store in memory or write it out to disk (in an application sandbox directory) and store the path to the attachment in memory.

0 Kudos

Hi Bill,

The problem that I’m having is getting the data from the attachment control. I can get the object that contains the URL and URI of the image but I’m having trouble getting the content of the image. Can you help me extract the image content or save the file based on the path?

Thank you