Kinetic Dashboard

Hi All,

Does anyone if it’s possible to use search-chip to filter a BAQ in a dashboard…

Or given a textbox with a comma e.g PackNum 1010,1011 and return these results in the grid…

:confused:

1 Like

Search chip will create a delimited field like value1~value2~value3.
You would need to create an event after that field changes to parse the value into a new field formatted like this:
('value1', 'value2', 'value3').

:point_up_2:t2: use a function.

You can then set the BAQ where clause to use the “in” operator and set it to that field.

Visual with hard-coded values:

2 Likes

That was actually kinda fun to set up.

FiltersAndChips

I used a button click instead of an AfterFieldChanged event, so I can see and control what was happening while debugging; you can easily have that all happen after clicking OK from the search.

1 Like

I Like It Alot GIFs | Tenor

You calling a function on the button click then refreshing the dataset or replacing??

1 Like

The BAQ in the grid’s provider model has a “WhereList” item set up that’s looking for the value in the “Formatted” text box.
When the button is clicked, it calls a function that takes a tilde delimited list (Chip values) and returns it as a valid SQL “IN” value as you see in the Formatted box.
No need to replace the dataset assuming your grid has the BAQ bound to the provider model; the provider model updates automatically when a field in the WhereList is changed.

2 Likes

I was literally JUST trying to figure out how trackers work in Kinetic dashboards now… Do they have any out of the box functionality or do we have to set it all up now using custom items and events?

Out of the box, they set the trackers up to be slide out panels which behave awfully.

I like to remap them to be how they are today.
The secret sauce is how the where list is set up in the grid’s provider model. That allows for the real time filtering of the grid when values are changed without the need for custom events.

1 Like

Yeah I recall the where list in the provider model, but it’s been a minute since I’ve done one :sweat_smile:

When the tracker is created though do I just reference the tracker dataview + tracker control binding field in the where list of the provider model for the grid to get it to filter?

This might be beneficial: How To: Kinetic Dashboard Uplifts - Experts’ Corner - Epicor User Help Forum (epiusers.help)

:slight_smile:

1 Like

Thank you Hannah, you have so much stuff on here I often get lost trying to find the post that fits. Thank you so much for the link.

1 Like

Anyone know why this won’t convert?

string inputString = this.inTilde; 

if (inputString != null)
{
    string[] parts = inputString.Split('~');

    // Add single quotes around each part and join them with commas
    string convertOut = "(" + string.Join(", ", parts.Select(part => $"'{part}'")) + ")";
}

I’m just getting {"convertOut":null} from the function response…

I used this in my test:

List<string> listOfValues = InList.Split('~').ToList();
OutList = "";

if( listOfValues.Count > 0 )
{
  OutList = "(";
  
  foreach(string listItem in listOfValues)
  {
    OutList += "'" + listItem + "', ";  
  }
  
  OutList = OutList.Substring(0,OutList.Length - 2);
  OutList += ")";
}