Page 1 of 1

Problem Mapping Local Storage Variable Arrray to List

Posted: Tue Jan 28, 2020 12:21 pm
by Deon

Hi

I have created a generic service to map my Local storage variable array to a List.

This is my Jscript for the generic service.

Appery.getProgrammes = Appery.createClass(null, {

Code: Select all

 init : function(requestOptions) { 
     this.__requestOptions = $.extend({}, requestOptions); 
 }, 

 process : function(settings) { 
     settings.beforeSend(settings); 
     if (this.__requestOptions.echo) { 
         settings.success(this.__requestOptions.echo); 
     } else { 
         var cdata = Apperyio.storage.programmeList.get(); 
         settings.success(cdata); 
     } 
     settings.complete('success'); 
 } 

});

This is the error:
======================
VM34736:202 Error: Attempt to access Array by property name : 'resource'
at Object.get (mapping-impl.js:325)
at Object.get (mapping-impl.js:343)
at Object.get (mapping-impl.js:310)
at Entry.window.entry.Entry.getValue (mapping-impl.js:82)
at MappingUnit.window.mapping_unit.MappingUnit.processMappings (mapping-impl.js:196)
at MappingUnit.window.mapping_unit.MappingUnit.process (mapping-impl.js:127)
at Function.processMappingAction (mapping-impl.js:10)
at derived.onSuccess (eval at globalEval (jquery-2.1.1.js:330), :171:22)
at derived.successHandler (appery.js:397)
at Object.proxy [as success] (jquery-2.1.1.js:513)
======================

The LSV does contain the correct info when I output it to the console.

This is my service response......

Image

This is my mapping

Image


Problem Mapping Local Storage Variable Arrray to List

Posted: Thu Jan 30, 2020 2:18 pm
by Serhii Kulibaba

Hello Deon

Unfortunately, any help (and/or debugging) with your custom app code or logic as well as 3rd party Apache Cordova/PhoneGap plugins are not covered by our [Support policy] (https://docs.appery.io/docs/general-s...).
To get such help, you will need to consider purchasing Advisory Pack: (https://appery.io/services/#Advisory_...)

What functionality do you need to have with that service? Just make a mapping from the Storage variable?


Problem Mapping Local Storage Variable Arrray to List

Posted: Wed Feb 12, 2020 9:56 am
by Deon

Oh, then please explain why 99.9% of all the issues logged here are being helped as they are all based on custom app code and logic.

Then provide decent documentation in how to do stuff, such as how to create a generic service for local storage array to filter and map data to a page so that I dont have to deal with support.

I cant "just make a mapping" as mappings do not allow for filtering of data or if it does I cant find it in your so called "documentation".


Problem Mapping Local Storage Variable Arrray to List

Posted: Thu Feb 13, 2020 7:51 am
by Deon

Well can you provide a link to documentation on how to create a service that allows me to map LSV array to a list based on a query.


Problem Mapping Local Storage Variable Arrray to List

Posted: Thu Feb 13, 2020 10:16 am
by Oleg Solodiuk

Please see this documentation: https://docs.appery.io/docs/appbuilde...