Sort Table based on What was first selected in Filter

Options
ColinHaze
ColinHaze Member

Hi,
I am trying to filter a table that I created using a DDX Brick based on what location was first selected. Using a very simple example, The user selects FL, then the user Selects Ga then the User selects LA.

The way the table should be sorted should be GA, FL, LA instead of sorting alphabetically. How would I go about that? The Filter card I am using is the DDX Brick Filter Multiple Datasets.

Thank you

Best Answer

  • ArborRose
    ArborRose Coach
    Answer ✓
    Options

    Whatever helps you get an adequate solution. If I were tackling this as a problem of my own, I would try to explore using more than one dataset. Something that builds a dataset that acts as the sort order for the other. Grant is a much better source to give guidance on this.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

Answers

  • ArborRose
    Options

    I'm not sure if you are filtering or sorting. Here's an example of a dropdown selection that filters data (using Domo sale example data and a Blank Brick.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • ColinHaze
    Options

    ArborRose Its sorting, I figured out the filtering issue. Ideally Whatever Location is selected first in my filter Brick, I want to display first in my table Brick, Then when a user selects the second location it is displayed second in my table.

  • GrantSmith
    Options

    You'd likely need to utilize an event on your drop down to store the order in which the values are selected and also handle it when a value is deselected. You could store it in a hidden input type in a form on your DDX brick and then reference it when the event occurs so that you add or remove it out of the csv list you're storing in the hidden input.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • ColinHaze
    Options

    GrantSmith The ddx Bricks are using two different datasets, would that be a problem? The DDX Filter Brick strictly just has the locations for filtering, the table Brick has columns with values like sales, cost etc…

  • ArborRose
    Options

    The following example works as follows. Select a state such as New York, it sorts with New York first…then the others. Select a second state like Colorado, it sorts by Colorado, New York…then the rest. Select Ohio, it sorts Ohio, Colorado, New York, then the others.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • ColinHaze
    Options

    ArborRose I guess the issue I am having is that I am using two different cards. Would you recommend just having one card with a user input box at the top with the table below?

  • ArborRose
    ArborRose Coach
    Answer ✓
    Options

    Whatever helps you get an adequate solution. If I were tackling this as a problem of my own, I would try to explore using more than one dataset. Something that builds a dataset that acts as the sort order for the other. Grant is a much better source to give guidance on this.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • ColinHaze
    Options

    ArborRose Thank you for the advice, Straight out of college and the only one in my company that uses DOMO so thanks for answering the most basic questions LOL!

  • ArborRose
    Options

    These are not basic questions. I think you are already way ahead of me.

    Here's another exploratory test with bricks. In this example, you can enter a comma separated list into an input field. The data then sorts based on the list first, then the rest alphabetically. You could also modify it so it only shows states listed in the input.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **