Filter - How to select multiple criteria in "starts with" option?

Kalaiselvan shared this question 2 years ago
Answered

Hi Team,

In YF Filter, i need to select multiple criteria by "starts with" option. When i use Defined values/User prompt, i am able to select only one criteria. Could you please advice how to i achieve this in YF?

I here attached with BI and YF filter screenshots for reference.

Regards,

Kalaiselvan

Comments (6)

photo
1

Hi Kalaiselvan,

drag in multiple copies of the same filter and change the filter operator from the default AND to OR:


/AAAAAElFTkSuQmCCAA==


Please let me know if this does the job for you.

regards,

David

photo
1

Hi David,

Thanks for your response, but the issue is sometimes we need to select 10 or more, and the filter criteria is not same always. We choose different criteria every time. So, it will not make sense every time to add the field multiple time to the filter.

Is there any way to use other filter option to achieve this or any SQL code that we can use for this selection?

Thanks,

Kalaiselvan

photo
1

Hi Kalaiselvan,

yes, perhaps the Calculated Filter feature might be what you're looking for - you'll find in the Prepare screen of the View Builder:

/DTp9HLOzkTAAAAABJRU5ErkJgggA=


Please give that a try and and let me know whether it meets your reporting requirements.

regards,

David

photo
1

Hi David,

Thanks. I tried and it is working, but the issue here is User can't select the criteria. What i really need is

1. Creating common field for this filter

2. User can select the field & criteria by their wish

Can this calculated filter editable by the users to select their required criteria? or if anything can be done in the data base level please let me know, i will check with my technical team.

Thanks in advance. Please let me know if you have any questions?

Regards,

Kalaiselvan

photo
1

Hi Kalaiselvan,

OK, I understand now the requirements and I have the solution for you.

You will need to create a stored procedure in your database that splits a comma separated string into tokens, and then joins the token + wildcard to your desired table.

Then you must create a Yellowfin View from the stored procedure.

I have attached a short video of the working report.

I have attached the code for the stored procedure (and I separated the splitting functionality into a function), it is in T-SQL for SQL Server, it still might be useful for your DB guys to look at even if you are not using SQL Server.


If any questions or issues arise from this then please don't hesitate to let me know.


regards,

David

photo
1

Hi David,

Thanks for your response. Sorry for the late reply. I have checked with my IT team, they are fine with the first of your response, adding fields multiple times in the filter. Thanks for your guidelines. You can close this query.

Thanks,

Kalaiselvan