Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9218625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:54:26+00:00 2026-06-18T02:54:26+00:00

When I create a WsapiDataStore, store.data.items and store.data.keys return empty arrays although I am

  • 0

When I create a WsapiDataStore, store.data.items and store.data.keys return empty arrays although I am able to see the keys and items when I do console.log(store.data)

store = Ext.create('Rally.data.WsapiDataStore', {
    model: 'Defect',
    context: {
        project: '/project/xxxxxx'
    },
    autoLoad: true,
    fetch: ['Rank', 'FormattedID', 'Name']
});

Output of console.log(store.data):

constructor {items: Array[0], map: Object, keys: Array[0], length: 0, allowFunctions:   false…}
    allowFunctions: false
    events: Object
    generation: 8
    getKey: function (record) {
    hasListeners: HasListeners
    items: Array[7]
    keys: Array[7]
    length: 7
    map: Object
    sorters: constructor
    __proto__: TemplateClass

Notice how the first line says “items: Array[0]” and “keys: Array[0]” but when expanded it says “items: Array[7]” and “keys: Array[7]”. I’m also able to see the 7 records when I expand further.

Everything works as expected when I add a load listener and access the data from the listener function (but I don’t want to do that)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:54:27+00:00Added an answer on June 18, 2026 at 2:54 am

    I think the best way is to process the data via two Rally.data.WsapiDataStore’s. You’ll need to chain the listeners for the two stores together in order to properly handle the asynchronous loads. Here’s an example that illustrates the process:

    <!DOCTYPE html>
    <html>
    <head>
        <title>MultipleModelExample</title>
    
        <script type="text/javascript" src="https://rally1.rallydev.com/apps/2.0p5/sdk.js"></script>
    
        <script type="text/javascript">
            Rally.onReady(function() {
                Ext.define('CustomApp', {
                    extend: 'Rally.app.App',
                    componentCls: 'app',
    
                    // Combined Story/Defect Records
                    dataRecords: null,
    
                    launch: function() {
                        //Write app code here
    
                        this.dataRecords = [];
    
                        Rally.data.ModelFactory.getModels({
                            types: ['HierarchicalRequirement','Defect'],
                            scope: this,
                            success: function(models) {
                                this.myModels = models;
    
                                this.storyStore = Ext.create('Rally.data.WsapiDataStore', {
                                    model: models.HierarchicalRequirement,
                                    fetch: true,
                                    autoLoad: true,
                                    remoteSort: true,
                                    sorters: [
                                        { property: 'FormattedID', direction: 'Asc' }
                                    ],
                                    listeners: {
                                        load: this._processStories,
                                        scope: this
                                    }
                                });
                            }
                        });
                    },
    
                    _processStories: function(store, records, successful, opts) {
    
                        var storyRecords = [];
    
                        Ext.Array.each(records, function(record) {
                            //Perform custom actions with the data here
                            //Calculations, etc.
                            storyRecords.push({
                                FormattedID: record.get('FormattedID'),
                                Name: record.get('Name'),
                                Description: record.get('Description')
                            });
                        });
    
                        this.dataRecords = storyRecords;
    
                        this.defectStore = Ext.create('Rally.data.WsapiDataStore', {
                            model: this.myModels.Defect,
                            fetch: true,
                            autoLoad: true,
                            remoteSort: true,
                            sorters: [
                                { property: 'FormattedID', direction: 'Asc' }
                            ],
                            listeners: {
                                load: this._processDefects,
                                scope: this
                            }
                        });
                    },
    
                    _processDefects: function(store, records, successful, opts) {
    
                        var defectRecords = [];
    
                        Ext.Array.each(records, function(record) {
                            //Perform custom actions with the data here
                            //Calculations, etc.
                            defectRecords.push({
                                FormattedID: record.get('FormattedID'),
                                Name: record.get('Name'),
                                Description: record.get('Description')
                            });
                        });
    
                        var combinedRecords = defectRecords.concat(this.dataRecords);
    
                        this.add({
                            xtype: 'rallygrid',
                            store: Ext.create('Rally.data.custom.Store', {
                                data: combinedRecords,
                                pageSize: 25
                            }),
                            columnCfgs: [
                                {
                                    text: 'FormattedID', dataIndex: 'FormattedID'
                                },
                                {
                                    text: 'Name', dataIndex: 'Name', flex: 1
                                },
                                {
                                    text: 'Description', dataIndex: 'Description', flex: 1
                                }
                            ]
                        });
                    }
    
                });
    
                Rally.launchApp('CustomApp', {
                    name: 'MultipleModelExample'
                });
            });
        </script>
    
        <style type="text/css">
            .app {
                 /* Add app styles here */
            }
        </style>
    </head>
    <body></body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I make a quick wsapidatastore for user story, it works: Ext.create('Rally.data.WsapiDataStore', { model:
I'm calling Ext.create('Rally.data.WsapiDataStore', params), and looking for results with the load event. I'm requesting
CREATE OR REPLACE FUNCTION layer2layerAttribute RETURN VARCHAR2 AS /** * This function properly joins
Create one listview and add the item in listview like listview1.Items.Add(new ListViewItem(hello i am
Create a new solution with a C++ console command-line project Create a new project,
create table dict {id, word varchar2(255)). I store strings of varying lengths within the
CREATE PROCEDURE [test].[proc] @ConfiguredContentId int, @NumberOfGames int AS BEGIN SET NOCOUNT ON RETURN @WunNumbers
CREATE function [dbo].[fn_GetDateOnly](@dateWithTime datetime) returns datetime WITH SCHEMABINDING as begin return DATEADD(DAY, DATEDIFF(DAY, 0,
I have created a query for data using the WsapiDataStore request. When data is
Create new Object in Flex 4.5 like this: As you can see int line

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.