The Spotfire Community is moving to TIBCOmmunity and this forum location has closed. During the transition, you can still search the old forums but posting has been disabled. We encourage you to pick up the discussion at the new Spotfire community on TIBCOmmunity.
Custom Expression Dialog - TIBCO Spotfire Community

Custom Expression Dialog

Last post Sun, Jan 23 2011 9:20 AM by samerqutob. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • Mon, Jun 7 2010 2:45 PM

    Custom Expression Dialog

     Hi,

    We're creating new visualization for Spotfire 3.1  One of the requirement is to be able to support Axis selection using Custom Expresssion via Spotfire's Custom Expression Dialog.  I have a couple of questions:

    1.  Is there an API that would bring up the native Spotfire's Custom Expression Dialog and return the user selection when he click ok?

    2.  If the answer is no, is there API for sub components of the dialog that we can use to assemble the dialog ourselves?   A source code example would be great!

     Thank you very much for your input,

    Tamara =)

    Tamara Nguyen
  • Tue, Jun 8 2010 6:57 PM In reply to

    Re: Custom Expression Dialog

    Hi Tamara,

    Unfortunately , there is no API that will do what you are asking for.

    There are some sample dialogs in some of the SDK examples that you can use as a starting point, but they do not contain any sub components of the native dialog.

    This would be a good enhancement request, so please contact support at support.tibco.com and submit it with your use case listed above.

     

  • Sun, Jan 23 2011 5:57 AM In reply to

    Re: Custom Expression Dialog

     Hi Kevin,

    How can I write a custom expression that returns a list of columns that match it in a specifc data table?

    The idea is to allow users to define some expression based on column properties ... this expression when evaluated (against the data table) identifies all matching columns and returns them.Do we have such feature in Spotifre?

    Thanks


    Samer.
    Filed under:
  • Sun, Jan 23 2011 8:57 AM In reply to

    Re: Custom Expression Dialog

    Hi Samer,

    What specific logic are you trying to match? Are you trying to do this in a C# Tool or Script control, or just in the UI?

    You can create a new column property , which is a Boolean and is set to either true or false based off some logic. That logic would be what you are trying to match.  Then you have a column property which you can use in your query to say return all columns where the new property is set to true.

    Custom expressions are not really meant to return a list of columns but really a list of values in a column.  However, if the logic you want to use is based  off a column name and not a column property, you could use an expression to output the specific columns:

    For example, let's say you wanted to output all column names in a given data table (in our example its called 'Data Table') which began with 'exp', you can use the following:

    <$map("[$csearch([Data Table],"exp*")]"," NEST ")>

     If you place this on the X-axis of a Bar Chart it will list all the columns. 

    I suspect you want to search based off logic other than its name and you are doing this in a C# tool, so I would go down the route of creating a document property, then setting it to true or false based off your logic (either manually or via the APIs), then in your tool you can loop through all columns, check the value of this property and only use it if its true.

    Let me know if I am getting close to your requirement,or if this is something you wanted to do in the UI just with an expression and based off some logic that is not the column name...we could probably do this via a  hidden property control.

  • Sun, Jan 23 2011 9:20 AM In reply to

    Re: Custom Expression Dialog

     Thanks for your quick reply.

    As I mentioned, we are trying to create a visualization where x-axis is based on a set of columns. But these columns are not hard-coded, they are instead identified by some column property. So whenever we refresh our data table, some extra column may be added or some other columns may be removed, In this case my x-axis will be intelligent enough to search for the columns by their column property value. The logic may be complex like "find all columns whose unit is mA and extrenal name matches *XYZ* and Limits.Upper < 100".

    To do this I would love to use custom expression if possible ... this will avoid me writting a parser to parse the expression.

    PS: Could you please give me more details about  "hidden property control" and this can help me in my request.

    Samer.
Page 1 of 1 (5 items)
┬ęCopyright 2000-2011 TIBCO Software Inc | Privacy Policy | Terms of Use I Blog I Contact Us I Content Center