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 8972187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:09:24+00:00 2026-06-15T18:09:24+00:00

The following is the code : queryTree = SC.Query.local(‘Tree.Category’, categoryId = {categoryId}, { categoryId:

  • 0

The following is the code :

        queryTree = SC.Query.local('Tree.Category',
        "categoryId = {categoryId}", {
            categoryId: this.get('guid'),
            orderBy: "name ASC"
        });
        queryNote = SC.Query.local('Tree.Note',
            "categoryId = {categoryId}", {
            categoryId: this.get('guid'),
            orderBy: "name ASC"
        });
        var arrayCategory = Tree.store.find(queryTree);
        var arrayNote = Tree.store.find(queryNote);
        //Concatenate arrayCategory to arrayNote

I want to return a new array of records that appends the results to arrayCategory and arrayNote. I went through the documentation, but there doesn’t seem to be a concatenate function.

  • 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-15T18:09:26+00:00Added an answer on June 15, 2026 at 6:09 pm

    I thought I would have to concatenate the two search results. But I fixed the problem this way:
    For every record in Tree.Note and Tree.Category I created a field called isChild and set it as YES in the former and NO in the latter.
    Further I changed the return value of the function to this:

    return Tree.store.find(SC.Query.local(['Tree.Category','Tree.Note'],
            "categoryId = {categoryId}", {
                categoryId: this.get('guid'),
                orderBy: 'isChild, name',
    
            }))
    

    EDIT : Something’s still wrong. Could someone suggest how should change this?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following code is generated by a for loop. <form action=saveresponse.php method=POST name=mainForm> <input class=cbox_yes
Following code is saved as html file: <?php $IP = 4; ?> <textarea name=comments>$IP</textarea>
following code i used to retrieve Image from database through linq query but i
Following code is used to get images from particular folder but how to get
Following code: $this->addElement('text', 'email', array( 'label' => 'Your email address:', )); $this->addElement('submit', 'submit', array(
Following code has been picked up from this blog function! Privatize() let priorMethod =
Following code, doesn't get triggered when Esc is pressed. Can somebody give me insight?
Following code is an example, I just want to know if this can be
Following code changes tab name and select then index 2. [(UITabBarItem*)[self.rootController.tabBar.items objectAtIndex:0] setTitle:@User]; self.rootController.selectedIndex
Following code does compile whereas name aNumber is not declared before use. class A

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.