Sign In Register

How can we help you today?

Start a new topic

Querying from code -> Not real results (null)

Hi, my name is Víctor and I'm having a problem querying in a dataType by code.

This is the code and it's supposed to give me all the data in QuestPlayer DataType...

Yesterday I inserted 3 new accounts on the game that means 3 instances on "QuestPlayer" Datatype.

When I look for them by ID they appear:

But by code making queryItems they doesn't appear.

What should I do ? I know that if u insert an instance on a datatype and immediatly you try to query may not appear but this 3 accounts were inserted yesterday ( more than 12 hours ago ).

var resultsOBJ = API.queryItems("QuestPlayer",null);

        Spark.setScriptError("ERROR", resultsOBJ.error());
        //Get results
        var results = resultsOBJ.cursor();
        //Loop through cursor and update entries
            //do things


1 Comment

Hi Victor,

Does your data type have any indexed fields? GDS requires at least one indexed fields before queryItems can be used, even if the query specified is null. You can read more about indexing your data types here -



Login to post a comment