Support Forum

Ask questions and get help from MobileTogether experts.
MobileTogether Product Information
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Shawn  
#1 Posted : Friday, March 3, 2017 3:30:45 AM(UTC)
Shawn

Rank: Member

Groups: Registered
Joined: 2/2/2017(UTC)
Posts: 22
United States
Location: Tennessee

Thanks: 1 times
During the OnPageLoad action I am updating a node that is tied to an image on the page with a value like this:

concat("https://www.domainname.com/", $tblTableName_GetDetail/DB/RowSet/Row/@DirectoryName, "/main.jpg")

This works great, as long as the file exists. If it doesn't the picture is a replacement with a red X through it. When running this in the simulator an error is displayed. Is there any way to capture this error on the page so I can feed the node an alternate image file?
bbv  
#2 Posted : Friday, March 3, 2017 10:39:09 AM(UTC)
bbv

Rank: Administration

Groups: Registered, Administrators
Joined: 7/21/2014(UTC)
Posts: 498

Was thanked: 88 time(s) in 88 post(s)
There is a workaround when you change your image loading from implicit, i.e. via file path (Image Source Type = url) to explicit via Load Image command and setting Image Source Type = base64.

So, OnPageLoad you execute a LoadImage to some node in your tree, and if it fails - LoadImage from another file. This in combination with Image Source Type base64 should solve your issue
Shawn  
#3 Posted : Friday, March 3, 2017 4:12:04 PM(UTC)
Shawn

Rank: Member

Groups: Registered
Joined: 2/2/2017(UTC)
Posts: 22
United States
Location: Tennessee

Thanks: 1 times
I tried this and when I launch the simulator an error pops up and says "No page to show." There are no errors generated in the Messages window and the value is being assigned to the node. Any ideas?

By the way you have helped me a couple of times. I really appreciate it.
bbv  
#4 Posted : Friday, March 3, 2017 4:19:42 PM(UTC)
bbv

Rank: Administration

Groups: Registered, Administrators
Joined: 7/21/2014(UTC)
Posts: 498

Was thanked: 88 time(s) in 88 post(s)
Ok, we found the bug and the workaround for it now. The bug is only happening if you attempt to load image OnPageLoad - in any other location it should be fine.

Attached is the sample design with image. The workaround is the two lines before Load Image attempt which do not do anything except just making sure that the script goes through. You can remove it with the next release.
File Attachment(s):
ImageLoad.zip (7kb) downloaded 43 time(s).
Shawn  
#5 Posted : Friday, March 3, 2017 5:25:44 PM(UTC)
Shawn

Rank: Member

Groups: Registered
Joined: 2/2/2017(UTC)
Posts: 22
United States
Location: Tennessee

Thanks: 1 times
That worked! Thanks!
Users browsing this topic
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.