We have a UserCodes field that stores some customer segmentation info. We want to filter to rows that do not have this information populated. Leaving the combo box unselected returns all results. How would I go about searching for blank values from the combo box in the dashboard?
I tried that. No results came up. I also need a way to still return all results. So the default blank is good the way it is… but I need to somehow add an extra “Show Only Blanks” option to the existing list I’m thinking. That doesn’t seem fun.
I am not sure if this is possible in the base dashboard. I am thinking there might be a way around it. In the past I have used the tracker view to make my own custom fields. First setup tracker view as normal with your filter fields. Deploy the dashboard, then customized the deployed form. From here, hide the native controls that Epicor added for you. Epicor will still use those controls to update the grid view, but now we can add our own fields to the tracker view, and use our fields to set the value in the native (hidden) fields.
For example, you have a combobox on the tracker view to filter by UserCodes. Deploy that and open it up in developer mode to customize that form. Now hide the native controls in the tracker view. Create a new combobox, and populate it with whatever is convenient. Maybe add a check box that says, find blanks. In your customization you have to take the data you enter in those new controls you added and push them into your hidden tracker view fields. So, if the user chooses to search for blanks, then instead of passing in the value to search for, we just pass in blank. I would normally do this with a ValueChanged event in the code.
And now we get back to the root of the problem. We have to change the way the tracker view processes the value in the control. The honor null flag in the dashboard editor must be changeable at program time in one way or another. My approach would be to figure out how to change that honor null based on the status of a checkbox or other trigger. Right off the bat, I don’t see any way to access that property at runtime.
Bing AI had an interesting approach, to create two BAQs or tracker views, one that honors nulls and one that doesn’t. Then use C# customization to switch between the views based on the user input. Honestly, this seems like a doable approach.
Good luck! Let us know what you find!
Edit: The only place I found a reference to HonorNull is in the *.dbd dashboard export file. Here you can see the xml line:
<DashboardHonorNull>false</DashboardHonorNull>
I don’t think you can change a dbd file at runtime, so a workaround like @TDray suggest might be worth it.
Could you just add a boolean calculated field in the BAQ based on if it is blank and then when searching for the blanks just search based on that being true?
That was a nice thought and I was eager to run with it… but it really needs to be if checked, show me blanks, if unchecked show me blanks and nonblanks.
So make your prompt greater than or equal to rather than equal to.
Booleans are treated as 0 and 1.
Greater than or equal to means unchecked shows both true and untrue. Checked only shows true