• Bjorn
    August 22, 2016 at 5:26 am #2466

    env: SPARK UI 4.4.1 EE, Heritage human service

    Hi,

    I have a Table with 10 records and multiple columns. I then call Table search() across all the columns using a regex, which removes let’s say 4 of the 10, leaving 6 records still showning in the table.

    If I call the Table clear() function at this point, 6 records are removed. I was a bit surprised of this because the JSDoc states that *all* records would be cleared. But ok, it is logical to only clear items that you can see. Maybe a comment would help in the JSDoc.

    ISSUE: After clearing the search spec, to show the remaining records, it appears that there are still some of the cleared records left in the table. 6 records were indeed removed, but it was the 6 first records in the unfiltered table that was removed, not the filtered ones.

    Am I doing anything wrong here?

    /Bjorn

     

    SPARK Support
    August 22, 2016 at 2:40 pm #2468

    Hi Bjorn,

    I have replicated your issue here using BPM 8.5.7 with the latest SPARK UI Toolkit.  This appears to be happening as the clear method is grabbing the index of the UI control, which is set to 0 (if only one row is displayed) and clearing the data at index 0.  Therefore, your code is correct, but not the recommended approach.

    Normally, you will have data populated into the table from an external source.  If the data is populated using an SQL statement in a server-side script, then a path can be added to execute a delete query on any matching data with a Stay-on-page event.  Then the table should refresh with the remaining data.

    Regards,

    Stephen P.

    Bjorn
    August 22, 2016 at 11:23 pm #2469

    Thanks Stephen,

    ok, that could work for a SQL data source. However, I still think there is a use case for the local clear() method; I’m using this to iteratively narrow down locally shown records, and I don’t want to modify the server data for other sessions/users. To do that by appending more and more complex server side query constraints seems overkill. Also, server round-trips should not be necessary for this kind of filtering.

    /Bjorn

     

    SPARK Support
    August 24, 2016 at 11:03 am #2479

    Hi Bjorn,

    After discussing this with the Development Team, I have logged a bug for the clear() method.  As the documentation indicates, the clear method should remove all items from the table whether it is filtered or not.

    We will implement the fix in an upcoming release.  Thank you for reporting this issue to us.

    Regards,

    Stephen P.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Start typing and press Enter to search