Chun Seong Low Posted October 6, 2022 Share Posted October 6, 2022 HiI have a question on how can I apply on-demand settings for multiple input parameters? Currently, I only managed to achieve that by allow 1 input parameters, the parameter is coming from user entry value, linked to properties control. But I want to add in more parameters, sometime user want to filter by parameters A, sometime parameters B, it is always filter by either 1 parameters and NOT both.Appreciate if anyone could advice. Thanks. Link to comment Share on other sites More sharing options...
Fredrik Rosell Posted October 7, 2022 Share Posted October 7, 2022 Hello,This is labelled (the topic is set) as both Jaspersoft Studio and Spotfire. To increase the change of receiving an answer, please clarify what product your are referring to. Assuming that this is Spotfire, could you please explain the use case in a bit more detail?Do you e.g. have multiple different parameters (let's say age and name), that should control different columns in the on-demand query, resulting in a SQL statement like ....WHERE (T1.AGE = 20 AND T1."NAME" = 'BOB')By default this would, as in the example above, filter on both, i.e. do an AND. Are you trying to only filter on one at a time (e.g. WHERE (T1.AGE = 20), somehow determined by what the user has selected/entered. As you have the ability to use expressions as input, so you can add some logic to what should be used, that might be what you should look into using. ORDo you have a single property, that should control a single column in the on-demand query, that can contain multiple valuesexample:WHERE (T1.NAME IN ('BOB', 'SUE') ORSomething else Link to comment Share on other sites More sharing options...
Chun Seong Low Posted October 11, 2022 Author Share Posted October 11, 2022 HiYes, this is for Spotfire.Default, I load the entire data set, with lots of columns. On the design page, I would create 3 input field, all free text entry, and user allow to key in anything they want in the fields (each with multiple values), assuming the 3 fields are Name, State and Country.Scenario 1, user would like to only search for certain Name only, and leave State & Country empty, and I would like the on-demand settings to filter by whatever user entered.Scenario 2 would be same idea, but say they want to filter by Country, and both the others empty.Currently, I am using on-demand settings and what I have done is enabled a single entry field with multiple values, which works great. Beyond that, I could not find a way for multiple entry field.Regards Link to comment Share on other sites More sharing options...
Ken Maksimchuk Posted October 11, 2022 Share Posted October 11, 2022 HiI am also trying to do something very similar to Chun Seong Low - trying to use an on demand data setting filtering on either of 2 columns (not both) based on user defined inputs which are stored in respective document properties.Thanks,-Ken Link to comment Share on other sites More sharing options...
Daire Murphy Posted November 23, 2022 Share Posted November 23, 2022 Also trying to do something similar. I can set up multiple parameters but the problem is if any one of the input fields is left blank then no data is returned... Link to comment Share on other sites More sharing options...
Chun Seong Low Posted November 24, 2022 Author Share Posted November 24, 2022 HiI still could find a direct solution for this, ended up I did something else, which manage to give me what I want.For each parameter that I need to apply filter, I create a dedicated page for it, so 1 page, 1 properties control, 1 parameter. It is repetitive but no conflicts and it get the job done.Hope this helps. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now