cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

Bad Bug / Error ? SaveData (Collection, "mylocalData") --- if a Image is in the Collection:

= BUG:  SaveData Error ... 
"There was a problem saving your data. Name could be too long."
It do not work on a mobile phone. NO Data will be stored on the phone, if an Image is in the collection.
If I store only Text (put away the image, empty); then it works.

In the Studio the error is shown but it works Is there also not! 

Destination: I want store in offline-mode local data (text/fotos) and send to the server, when back online!
Please urgent help needed.

 

Best regards Jens / Hannover

 

here the code lines:


Collect(LocPic; {BVNR:BVNR.Text; GEWERKNR:GEWERKNR.Text; BEM:"Freie Bemerkungen"; FOTO:buffBild}));;

SaveData(LocPic; "LocPic")

 

 

Jens Rogge
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi jeanshak,

 

In the collection, how do you get the photo? Is the photo saved under Media>Image?

 

In the code you provided, I guess that “buffBild” should be the name of the photo.

 

To test this issue, I create the collection using two different codes(set the screen’s OnVisible property).

 

Test Code1, I will get the image through a Add picture control:
Collect(pictest,{name:Label1.Text,photo:Image1.Image});SaveData(pictest,"pictest")

 

Test Code2, I will get the image which is saved under Media>Image:
Collect(pictest,{name:Label1.Text,photo:apple});SaveData(pictest,"pictest")

 

Then I run the app on iPhone, I don’t get the error message you mentioned. The data in the collection can be displayed on a gallery in offline mode.

 

Please show me more details about your code. Please also try again with it.


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support
Community Support

Hi jeanshak,

 

In the collection, how do you get the photo? Is the photo saved under Media>Image?

 

In the code you provided, I guess that “buffBild” should be the name of the photo.

 

To test this issue, I create the collection using two different codes(set the screen’s OnVisible property).

 

Test Code1, I will get the image through a Add picture control:
Collect(pictest,{name:Label1.Text,photo:Image1.Image});SaveData(pictest,"pictest")

 

Test Code2, I will get the image which is saved under Media>Image:
Collect(pictest,{name:Label1.Text,photo:apple});SaveData(pictest,"pictest")

 

Then I run the app on iPhone, I don’t get the error message you mentioned. The data in the collection can be displayed on a gallery in offline mode.

 

Please show me more details about your code. Please also try again with it.


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks! 

the problem was that I named the the Image like "upImage" BUT I forgot add the extension "Image" 

CODE OK:

If (GEWERKNR.Text="" || BVNR.Text="" ;
"NIX-tun";

Collect(LocPic; {BVNR:BVNR.Text; GEWERKNR:GEWERKNR.Text; BEM:"Freie Bemerkungen"; FOTO:upImage.Image}));;

Reset(BVNR);;
Reset(GEWERKNR);;
SaveData(LocPic; "LocPic")

CODE NOT OK:

Collect(LocPic; {BVNR:BVNR.Text; GEWERKNR:GEWERKNR.Text; BEM:"Freie Bemerkungen"; FOTO:upImage}));;

Jens Rogge

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (77,940)