Jump to content

cut/paste multiple values into a text filter


david hicks 2

Recommended Posts

Im new to spotfire... so maybe there is an obvious way to do this and I am missing it

so I have spotfire sitting on top of a a large db. We are trying to use spotfire as a descriptive tool to monitor changes etc.. in the db. But it would also be very useful to be able to query a primary key by dropping in a list of values of interest.

is it possible to create a text box that I could query this field by dropping a list of values .. say

12345678

59632456

25032456

and return all the relevant data associated with these primary key's in the source data

This sort of query always starts external to spotfire.. i.e we want to know something about the data associated with a handful of values (might be 10 values or a thousand values). Ideally this could accomodate a cut/paste from excel into a text box, but if it had to be comma delimitated that would work too.

Regards

  • Like 1
Link to comment
Share on other sites

Create an InfoLink with your wuery as stored procedure, configure it as details on demand with property as input. (Source)

Now in Spotfire you can create multi line inputs for properties (edit text area > insert property control > multi line input) this will let you past values into it.

Depending on DB configuration etc you might have to add quotes or commas after each value but if it's just static formatting a simple IronPython script will resolve it.

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

Been trying to use you script but keep getting errors in the Data Function Properties:Data function UWIListFilter debug outputUnmarshalling 1 input parameters.

Input 'inputValues', sent by inline XML

chr ""

Done unmarshalling input parameters.And the following TERR error:TIBCO Enterprise Runtime for R returned an errorThe data function 'UWIListFilter' could not be executed.Error in .internal.sub(pattern, replacement, x, ignore.case = ignore. : object 'potential.header.fields' not found

    eval(expr, envir, enclos)

    eval(expr, envir, enclos)

    read.csv(connValues)

    read.table(file = file, header = header, sep = sep, quote = quote,

    gsub("^\s|\s$", "", unlist(potential.header.fields))

    .internal.sub(pattern, replacement, x, ignore.case = ignore.case,

 Any pointers to fix the script would be helpful.   

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...