Jung Choi Posted October 11, 2022 Share Posted October 11, 2022 Hello,I currently have a ListBox document property have and have set property values through: fixed values. I'm able to create display names and assign a value to that display name but was wondering if it was possible to assign multiple values to one specific display name? For example, I have display name "cars" and want to assign it "honda, nissan, ford" so that if I select "cars" in the ListBox, it'll search the table for "honda" or "nissan" or "ford". Is this possible in Spotfire? Would it require an Ironpython script? Thank you in advance! Link to comment Share on other sites More sharing options...
Tushar Badlani Posted October 17, 2022 Share Posted October 17, 2022 Hi Jung, To add filters to the data when you click on any item for a listbox, you can set the property value via expressions, please find an example attached. Link to comment Share on other sites More sharing options...
Jung Choi Posted October 17, 2022 Author Share Posted October 17, 2022 Hi Tushar - Thank you for your reply. I think what I need is slightly different and apologies if this wasn't clear in my original question. The display name I want is "Cars", but the value I want is the different forms that "Cars" can come in i.e. cArs, CARS, caRS, etc. Is there a way so that multiple variations of the value can be covered under one display name? Would adding what's below as the expression to a display name work? "cArs" or "CARS" or "caRS"Thanks! Link to comment Share on other sites More sharing options...
Gaia Paolini Posted October 18, 2022 Share Posted October 18, 2022 You can put an expression in the fixed value, and then the document property you create can be used e.g. as a Limit by expression in a plot.In your specific example, you could for instance set a value to:lower([mycolumn])='cars' Link to comment Share on other sites More sharing options...
Jung Choi Posted October 18, 2022 Author Share Posted October 18, 2022 Hi Gaia,Appreciate your response. What if my document property is being used as an on-demand filter for multiple tables? I understand that if my document property was being used to filter on one table, we can use the expression example you've given but if my doc property is being used for multiple tables where each table has a different variation of the string, how can I set the display value to encompass all the different variations? Hope that makes sense. Thanks. Link to comment Share on other sites More sharing options...
Gaia Paolini Posted October 18, 2022 Share Posted October 18, 2022 In that case, the challenge is to find an appropriate regular expression. You need to have an initial idea of all the possible variations, which you can refine with more tables and examples appearing. Link to comment Share on other sites More sharing options...
Jung Choi Posted October 18, 2022 Author Share Posted October 18, 2022 I see. Would you be able to share an example of how to implement the regular expression in the document property? I know all the possible variations of the string. Would it still go through the expression option? Link to comment Share on other sites More sharing options...
Gaia Paolini Posted October 18, 2022 Share Posted October 18, 2022 there is no single catchall regular expression. How you tackle this task depends on what your variations are. Can you share these? Link to comment Share on other sites More sharing options...
Jung Choi Posted October 18, 2022 Author Share Posted October 18, 2022 Yes. I want the display name to be "Cars 2022". The different variations of the value are:Cars 2022Cars2022Planes (it's not really a variation of Cars 2022 but would the regular expression be able to handle this?) Link to comment Share on other sites More sharing options...
Jose Leviaguirre Posted October 18, 2022 Share Posted October 18, 2022 Hello Jung Choi, Hard for me to follow what is the exact use case based from the original question, but let me try. It depends on how and where you are using this. If it is being used in other expressions then this can work as discussed so far. For example, you can nest multiple functions within an expression to make Cars 2022 and Cars2022 consistent. In this example, I am using lower, trim and substitute to remove and lowercase any inputs that might well come from a column and then checks with the expected output::Substitute(Trim(Lower("Cars 2022"))," ","") in ("cars2022", "vehicles2022, vehicles22, planes")Substitute(Trim(Lower([CarsColumn])," ","") in ("cars2022", "vehicles2022, vehicles22, planes")If you are using this as an input property for an on-demand data table then that wont work, and would require a different approach. Maybe an on-demand Input from expression or data function. If there are too many variations to handle another approach could be to clean the data with a proper ETL before loading it to Spotfire or running specific data function to analyze these patterns. Link to comment Share on other sites More sharing options...
Jung Choi Posted October 18, 2022 Author Share Posted October 18, 2022 Hi Jose,Thank you for your response. Basically, I want to give a user the ability to choose the string they want to use as an input property for multiple on-demand tables using a List box document property. The issue is that one table might have one variation of a string while the next table has another variation. For example, Table 1 has "Cars 2022" while Table 2 has "Cars2022". Both tables are using the same document property as an on-demand input. This is why I was hoping that when creating the document property to use as the on-demand input, that one specific display name can represent different variations of a string. I can get this to work by manually adding each variation separately as an option in the document property but this is not efficient. Hopefully this makes more sense. Any idea how we can get this to work? Thanks. Link to comment Share on other sites More sharing options...
Fredrik Rosell Posted October 20, 2022 Share Posted October 20, 2022 Hello Jung,It appears that this issue might be difficult to resolve through the Community - it might be better handled as a support case, where our support engineer can interact with you more directly. If you want to explore that option, please open a case in the TIBCO Support Portal (https://support.tibco.com).Best RegardsFredrik, TIBCO Spotfire Support 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