I am using a ValueHelpDialog with range support. So these tokens are generated based upon selection and values entered. e.g. For 'contains' a Token like *abc* is generated and for 'equal to', =abc is generated. These tokens can be fetched on clicking OK on the ValueHelpDialog as seen below.

I need to create a sap.ui.model.Filter for these selections. How can I evaluate the Tokens to retrieve FilterOperator and the value to be filtered?
Kindly assist, Thanks!
You can retrieve the filter data from the token with the data function.
const oProperties = oToken.data("range");
/*
{
exclude: false,
operation: "Contains",
keyField: "PROPERTY_PATH",
value1: "abc",
value2: null
}
*/
const oFilter = new Filter({
path: oProperties.keyField,
operator: FilterOperator[oProperties.operation],
value1: oProperties.value1
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With