Alpha DevCon Engineering Roundtables
Results 1 to 3 of 3

Thread: How to set namespace for lists dynamically

  1. #1
    Member cptutrecht's Avatar
    Real Name
    Ger Kurvers
    Join Date
    Feb 2010
    Location
    Netherlands, Utrecht
    Posts
    507

    Default How to set namespace prefix (name) for lists dynamically

    If lists are persisted to local storage one can add a prefix (name) to the namespace AA uses for that (see screenshot)

    I need to set that prefix (name) dynamically, for example equal to an argument or a session variable. Because a user can use the same application (but with different databases) more than 1 time on the same device.

    Any ideas?

    HowtoSetDynamicNamespace.PNG
    Last edited by cptutrecht; 07-31-2017 at 04:43 PM.
    Ger Kurvers
    Alpha Anywhere / V4.4.5 - Build 4491_4932 30-July-2017
    Development: Mysql, windows 7 64 Applicationserver: standard on Windows server 2012 R2

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

    Default Re: How to set namespace for lists dynamically

    You could try something like this. "namespace" is a property of the {dialog.Object} property object "_localStorageSettings". Using <Default>, namespace is set to something like...

    Code:
    "ALPHA_ee39bcaee5dd4c0cadfa7060c196fda0"
    So, when your app starts, and before you do anything with storage, you could try changing the namespace value.

    Code:
    {dialog.object}._localStorageSettings.namespace = "myNewNamespace";
    I'd pull off the guid of the original namespace and append it to your new namespace. See how that turns out.

  3. #3
    Member cptutrecht's Avatar
    Real Name
    Ger Kurvers
    Join Date
    Feb 2010
    Location
    Netherlands, Utrecht
    Posts
    507

    Default Re: How to set namespace for lists dynamically

    Thanks David, I will experiment with that.
    Ger Kurvers
    Alpha Anywhere / V4.4.5 - Build 4491_4932 30-July-2017
    Development: Mysql, windows 7 64 Applicationserver: standard on Windows server 2012 R2

Similar Threads

  1. FormView CSS Namespace
    By Beta Spark in forum Tablet-Optimized Form Capabilities Beta
    Replies: 0
    Last Post: 10-30-2015, 02:23 PM
  2. Dynamically change the color of the text in a lists row
    By frankbicknell in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 08-20-2015, 09:29 AM
  3. Replies: 0
    Last Post: 03-17-2015, 07:12 PM
  4. Help - Looping through namespace (global) variables...
    By SNusa in forum Alpha Five Version 9 - Desktop Applications
    Replies: 5
    Last Post: 02-18-2012, 01:05 PM
  5. Look up lists
    By dik_coleman in forum Alpha Five Version 5
    Replies: 4
    Last Post: 12-19-2003, 11:34 AM

Posting Permissions

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