Select to view content in your preferred language

Allow user to select SQL Expression Builder operator in Filter widget

1794
5
06-05-2023 01:51 PM
Status: Open
Labels (1)
CMV_Erik
Frequent Contributor

It would be helpful to empower the users of the Filter widget by allowing them to select the SQL Operator the same way they can enter/select their own Values. 

 

When using the SQL Expression Builder, the app designer specifies the Field (the attribute in the data), the Value (a value to compare with the Field's values), and an Operator (the type of comparison, such as "is", "is at least", "is blank", etc.). The designer can explicitly specify a Value or allow the user to specify their own. However, the designer must specify the Operator for each widget.

 

To give the user access to all possible comparisons for a numeric field like OBJECTID, the designer must create 12 different widgets to filter one Field. This takes up extra screen space and makes it more challenging to follow which widgets are affecting the filtered results.

 

Instead, it would be helpful to allow the user to select their own operator within a widget using a drop-down list, similar to how it appears in the SQL Expression Builder. The builder already includes an option to "Ask for values" for the value, which includes the ability to pre-specify options available in a drop-down list. One simple approach is to implement a similar "Ask for operator" option, and show the same Operator list to the user that the designer sees in the Expression Builder.

 

Example: a power user may need to consult and help maintain a large list of properties. They may need to filter using multiple fields, but each field's criteria could change for a particular task. For land value, they may currently be interested in properties of an exact value, within a range of values, or even properties to which no value is assigned. If they could select their own operator, the number of widgets required is minimized, and the app becomes a much more powerful tool.

 

Tags (3)
5 Comments
KatelynSullivan

I agree with this idea! This would be extremely beneficial, especially for apps with a lot of layers that have the possibility to be filtered. I have seen a lot of frustration with users not having this option in the EXB apps.

CameronLacelle

Agreed, I was disappointed learning this isn't currently an option as my team and I are working at developing our new corporate GIS viewer.

DebHSF
by

This would be extremely useful, as you say it takes up so much space to have multiple filters available when it could all just be in one small widget.

Marc_Patti

Great idea. As it stands, the only way I'm able to give users the ability to set And/Or operators is to have them use the filter in the List widget. It would be very nice if users could just click on a simple filter button to set their operators instead of having to include a cumbersome List widget that they otherwise don't need. 

IanNuttall

Commenting here to add more support to this idea. We use this exact feature using Web AppBuilder, and with WAB being retired relatively soon, I have to come up with a workaround that is less than ideal. I tried the Custom Filter, but the issue with that is, the end user has to create the whole SQL expression. Not all of our end users are tech savvy so that can become confusing and frustrating for them. Having the field predetermined by the designer and allowing the end user to set the operator and value would keep things simple but flexible.