Hi, looks like the records are getting created since the items are visible, but something is not right with the images. Does this happen online too or just offline? If offline, the reason is likely that the device cannot find the image resource based on an URL, because it’s not connected to the Internet. To show images in offline mode you would have to store copies of the image files themselves on the device.
Good day,
it is both offfline and online, something sems to be wrong with the previewer, i tried both repeated items and none repeated items. Even objects like text dissappears.
Additionally how would i get to store those images for offline ? any ideas.
It works now, i got the fix for it, it was the [Object Object] issue that was fixed with a formula.
IF(IS_EMPTY(current.fields.text),"",current.fields.text)
Thanks for your kind assistance.
Hello Mari,
I need some guidance as well if you can help me.
I have (almost) done every step in this tutorial but still cant get the app to work offline.
I have an Airtable DB with a ‘Description’ and an ‘Image’ field.
I setup the LocalCache DB and the global app variables exactly like that of Airtable’s schema.
My problem is in the logic flow: maybe some nodes or flows have changed since this post was created.
Nevertheless, when I create a build and open the app for the first time, the app gets the relevant data from Airtable, then I turn of wifi, open the app but nothing is showing.
Under app info (in app settings, android) I can see that the Cache size is changed to some MB corresponding to the amount of data that was downloaded but I can’t get to show them on the relevant page of the app.
My question is: do I need to set up that one page to pull the data from LocalCache DB regardless if it has internet connection or not?
I don’t want to flood this post with relevant screenshots but if needed I can post them.
My app ID is: 205632
Thanks in advance
Hi @Edvin_Rushitaj! Sounds like the offline storage is working, but maybe your app variables are not being populated with the right values when the device is offline. What kind of logic do you have on the Global Canvas for that? The offline setup is a bit tricky to debug, since you can only really test it within the build. If I were you, I would add some alerts in the flows in some relevant places (for example to see if the set app variable node gets triggered, what is the content of the app variable, if your client-side record has the information you think it has, etc.), and try to rebuild the app to see where there might be a disconnect.
Hi Mari and thanks for your reply.
I’m attaching some screenshots, hopefully you’ll be able to help. I’m pretty sure I messed up somewhere but it’s so confusing for me that now I’m lost.
THE SCHEMAS
UPDATE RECORD
CREATE RECORD
GET RECORD
SET APP VAR FROM UPDATE RECORD
SET APP VAR FROM GET RECORD
SET APP VAR FROM CREATE RECORD
Your help deeply appreciated.
Hi, one possible issue I can spot is that on the Global Canvas if Get Record Collection fails, you attempt to get “ThePark” instead of “TheParkCache”, so the app variable never gets set to “TheParkCache” in case the app is offline.
Ok, changet it to ParkCache. Indeed that makes sense.
I must have changed these settings a hundred times.
Do you see anything else?
On the page itself, do I have to pull the relevant info from park cache in this scenario?
(Its not showing anything because the cache doesnt work as it should, but i’ve connected the elements to ParkCache)
Hi, on the page itself you should use the app variable – the logic of the thing is that you have an app variable that populates either from local storage or from your online database depending on if the device is online or not, so you don’t have to worry about using different variables in the view components.
I get it now. So on this relevant page, the data variables that I previously used (before the cache logic) are now obsolete, because I pull the data from page variables.
Now, are the app variables themselves correct? I’m almost certain that I’ve made a mistake.
(Can you see them in full res please?)
Hi, no there’s nothing I can spot, as long as you are setting the app variable after getting either the database or the client-side record you should be fine.
So, to close this thread (hopefully with success)
The binding types on the ‘Assigned Value’ in the App Variables must be the ‘Output value of another node’? (This is where I’m skeptical because I don’t understand it very well).
I will try generate a build now, to see where this is going.
Yes exactly, so what the “Get record” node outputs is the record that was just got. You want to use that output to set the app variable, as you have done.
Mari thanks alot for your help and time. I hope I get this thing to work.
Thanks again
I followed the instructions and by binding the Get Collection output to the App Variable an Error appeared. I was not able to bind a list of objects with 4 properties to the AppVar´s list of objects with 4 properties. I also tried binding them manually with a Formula but I couldn´t make it happen. I would appreciate very much the help as I´ve seen in the Forum´s questions great support from you. Thanks
Hi @Leonardo_Mosco, the incompatibility error comes up when the schemes of the two lists are not exactly the same. I would check again that all of the 4 properties in your objects have the exact same names and types.
Mari, Thanks a lot. It works! Sorry to bother you, right now the question just sounds silly even to ask.
Helo Mari!
Can you guide me through this problem?
My app has a complexity.
It is an e-commerce app and I’m trying to store the cart items added to the cart under the specific user and his organization.
I want this to work like,
anytime the user logs off or closes the app, his cart items get stored under his specific selected username (which will always be a single username), and his specific selected organization (which will be multiple each having its own organization code), and if and if, he logs back again into the specific username with the same organisation, his cart should pop up otherwise it would be a fresh cart for some other selected username or organisation.
The above chat clearly shows you an expert in the offline storage matter. Please help me with this. I will be available to provide any data you ask for.
Regards.