Invalid modification error after app generation

Good day everybody,

I have an issue with exporting my data from Outsystems to excel.

Currently, I am using FilePlugin to export my data.

Here is how I create the export data function in my app.

I created a button in my homescreen called "DownloadRSOData" and I linked it to a client action called DownloadRSODataOnClick.



1) In entity to excel:

In my assign button named "Excel"

Under Logic> Server action> Entity to excel 

I created excel as my output parameter

2) The savefile came from the file plugin

3)The if condition for SaveFileError is 

SaveFile.Error.ErrorCode=NullIdentifier()

4) The messages are there to show if there are any errors


After creating this function, I generated the app with the latest MABS version and it was successful.


However, when I downloaded the apk onto my phone and tested out the function, I ended up getting this error called "Invalid Modification".


May I get some advice on how I should proceed from here?

Thanks in advance!

mvp_badge
MVP
Solution


Hey Tea Kh,

For the logs, I mean if you open ServiceCenter, go to Monitoring, and look at the Error and General logs I would expect there to be some more information about the issue.

Looking at the code though, I expect it to be a problem with the Path you set on SaveFile:

GetOwnerURLPath() would return something like "/Calendar_learner6/", which would then imply that you want to store the file in the root of your device in a folder called Calendar_learner6. The problem with that though is that Android has very specific folders that are allowed to be created in the root of the filesystem.

Can you try changing Path to something like "RSOData" or something? Let me know if that still doesn't work.

mvp_badge
MVP
Solution


I'm so glad you got it saving! You should be able to use a tool such as ES File Explorer to browse the filesystem and locate the file - what are you using currently to locate it?

mvp_badge
MVP

Hello Tea Kh,

Do you know if there are any logs in ServiceCenter from this event that would provide more detail? Also, have you tried debugging the app to see exactly where the error is occurring?

Lastly, do you have a sample OML that reproduces the problem?

mvp_badge
MVP
Solution


Hey Tea Kh,

For the logs, I mean if you open ServiceCenter, go to Monitoring, and look at the Error and General logs I would expect there to be some more information about the issue.

Looking at the code though, I expect it to be a problem with the Path you set on SaveFile:

GetOwnerURLPath() would return something like "/Calendar_learner6/", which would then imply that you want to store the file in the root of your device in a folder called Calendar_learner6. The problem with that though is that Android has very specific folders that are allowed to be created in the root of the filesystem.

Can you try changing Path to something like "RSOData" or something? Let me know if that still doesn't work.

Morning Craig,

Words can't express how thankful I am for your help, I managed to get my export button to work!

I suspect the error comes from the CurrDate() function that I inserted in the name under the savefile button.

However, I am having issues locating the file on my android phone now. It shows the directory but I can't seem to find it anywhere in the files app on my phone. It doesn't even show any files being downloaded at all.

Maybe you can share some insights on how I can locate it?

I named the path "Downloads" for the savefile button.


Thanks in advance!

mvp_badge
MVP
Solution


I'm so glad you got it saving! You should be able to use a tool such as ES File Explorer to browse the filesystem and locate the file - what are you using currently to locate it?

Hi Craig,

Thanks to all your suggestions i finally got everything to work from saving to locating the excel file. Thanks for all the assistance given.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.