New call-to-action
Results 1 to 3 of 3

Thread: Set Columns in Cache List

  1. #1
    VAR
    Real Name
    Andy Meer
    Join Date
    Mar 2005
    Location
    Atherstone UK
    Posts
    458

    Default Set Columns in Cache List

    Hi All

    I am trying to set a column list when refreshing the list data the list is based on client side cache

    I have various customers on standard and special product prices and I want to set a column to the customers prices when I refresh the list, here is the code I am using and it works just fine when the Columns are hard coded as seen in my code below

    Code:
    var vRate = 'AM'
    
    var _onOffline = function() { 
    
    }; 
     var _onServerNotAvailable = function() { 
    ;
    };
    var _onSuccess = function(data) { 
    
    
    var ops = {columns: ['NAME','Price','AM']};
    {dialog.object}.setListColumnsAndPopulate('Product',data,ops)
    
    ;
    };
    var _onFail = function() { 
    ;
    };
    var _filter = '' 
    var _order = {'NAME' : 1};
    {dialog.object}.getFromDataCache('MyProducts',_onSuccess,_onFail,_filter,_order,_onOffline,_onServerNotAvailable);
    so this is the code that sets the columns var ops = {columns: ['NAME','Price','AM']}; but instead of the AM I would like to use the variable vRate

    Any help on this would be very much appreciated

    Kind Regards
    Andy

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,901

    Default Re: Set Columns in Cache List

    Code:
    var ops = {columns: ['NAME','Price',vRate]};
    will give you what you need.
    Last edited by Davidk; 02-09-2020 at 11:10 AM.

  3. #3
    VAR
    Real Name
    Andy Meer
    Join Date
    Mar 2005
    Location
    Atherstone UK
    Posts
    458

    Default Re: Set Columns in Cache List

    Thanks Penge

    That worked

    Kind regards
    Andy

Similar Threads

  1. Filter List from Cache
    By andymeer@yahoo.co.uk in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 06-17-2019, 06:34 AM
  2. Replies: 4
    Last Post: 05-02-2019, 10:10 PM
  3. Populate List from Using Data Cache without population Columns
    By NormanRMouton in forum Mobile & Browser Applications
    Replies: 6
    Last Post: 02-10-2016, 04:59 AM
  4. Resizing UX List Columns and Pop Window from a UX List component
    By Neville in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 11-22-2015, 01:15 PM
  5. Question re: list formatting using Client Side Data Cache
    By kenshap in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 10-31-2015, 07:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •