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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:53:01+00:00 2026-06-17T19:53:01+00:00

I’ve modified the InventTable form so the users can filter the items depending on

  • 0

I’ve modified the InventTable form so the users can filter the items depending on their “Stopped” status on the default order settings setup form. They get a list of the “buyable” items, “sellable” items, all items or blocked items for sale or purchase depending of the values of two checkboxes.

I’ve added the InventItemSalesSetup and InventItemPurchSetup datasources in the code and I enable or disable them when the user checks or unchecks a checkbox.

Everything works fine except when one of the datasources is disabled. Then the “Advanced filter/sort” option stops working. I get the error: “The data source is not enabled”.

The error comes from the method “saveCueEnabled” of the SysQueryForm form. When it calls:

if (!CueRun::canSaveQueryAsCue(this.args().caller()))
    return false;

Which calls:

static boolean canSaveQueryAsCue(QueryRun qr)
{
    int numOfDataSources, i;
    QueryBuildDataSource ds;
    Query q;
    Common cursor;
    ;

    if (!qr)
    return false;

    q = qr.query();
    if (!q)
        return false;

    numOfDataSources = q.dataSourceCount();
    for(i = 1; i <= numOfDataSources; i++)
    {
        ds = q.dataSourceNo(i);
        if(ds.dynalinkCount() > 0)
            return false;

        // Check if it is temp
        cursor = qr.getNo(i);
        if (cursor.dataSource() && cursor.isTmp())
            return false;
    }

    return true;
}

When it gets the number of the datasources in the query, the “dataSourceCount” method also returns the count with the disabled data sources, and when it gets the QueryBuildDataSource of the disabled data sources in the loop you get an empty DS and it crashes when it checks if it’s a temporary table.

I’ve solved the problem adding an extra if on the “saveCueEnabled” code but I wonder if there’s a way to enable/disable the data sources without getting this error.

I hope I’ve explained myself well, thank you!

  • 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-17T19:53:02+00:00Added an answer on June 17, 2026 at 7:53 pm

    The only solution I can come up with requires you to modify canSaveQueryAsQue().

    This update to the for loop is simple and should solve your issue.

    for(i = 1; i <= numOfDataSources; i++)
    {
        ds = q.dataSourceNo(i);
        if(ds && ds.dynalinkCount() > 0)
            return false;
    
        // Check if it is temp
        cursor = qr.getNo(i);
        if (cursor.dataSource() && cursor.isTmp())
            return false;
    }
    

    I have not tested this code, but I have used similar code in other situations. Hope that helps!

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Does anyone know how can I replace this 2 symbol below from the string
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.