tag:blogger.com,1999:blog-1078032318127767231.post7788798096655071930..comments2024-03-20T01:42:16.872-05:00Comments on Spotfire Developer: Add columns dynamically to a Data TableJose Leviaguirrehttp://www.blogger.com/profile/12377756211132280060noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-1078032318127767231.post-67937512931443718332016-10-12T12:37:09.347-05:002016-10-12T12:37:09.347-05:00Hello Tali,
Thanks for your feedback. I am glad ...Hello Tali, <br /><br />Thanks for your feedback. I am glad this blog is useful for you and many. The goal of this blog is to provide developers with sample code snippets for their projects, hence they are not perfect but hopefully good enough to get you started. What you did by changing the script is exactly what I expect from users like you. <br /><br />One way to handle errors is by using try-except clause.<br /><br />try:<br /> #code that breaks<br /> a+1<br />except Exception,e:<br /> #code that should never break if error happens<br /> print "There was an error. The error was:\"" + str(e) + "\""<br />Jose Leviaguirrehttps://www.blogger.com/profile/12377756211132280060noreply@blogger.comtag:blogger.com,1999:blog-1078032318127767231.post-47687064584755840522016-10-12T11:05:33.774-05:002016-10-12T11:05:33.774-05:00Hi, first off, thanks so much for posting the scri...Hi, first off, thanks so much for posting the scripts. Your blogspot has been invaluable during my project. I've modified your script slightly so that you can have several multiple select list controls and one action script button - all in one text box. This makes it easier for the user to find the column they want. Thing is - if one of the multiple select list controls doesn't have a selection, it returns this error:<br /><br />Could not perform action 'Show Selected Columns'.<br />iteration over non-sequence of type <br /> at IronPython.Runtime.Operations.PythonOps.GetEnumeratorForIteration(CodeContext context, Object enumerable)<br /><br />I think it's possible to put a few lines in the script to tell it to ignore anything boxes that don't have anything selected, but I'm not sure how to do this.Tali Hhttps://www.blogger.com/profile/16181959303366458980noreply@blogger.comtag:blogger.com,1999:blog-1078032318127767231.post-19835681717919946872016-09-01T18:09:12.763-05:002016-09-01T18:09:12.763-05:00Ronnie,
The code is hitting an exception and tel...Ronnie, <br /><br />The code is hitting an exception and telling you about it in the console. This is OK. Spotfire cannot add the same column twice on data table visualizations so it is a way to prevent the code from crashingJose Leviaguirrehttps://www.blogger.com/profile/12377756211132280060noreply@blogger.comtag:blogger.com,1999:blog-1078032318127767231.post-22998827941121136292016-09-01T15:21:19.029-05:002016-09-01T15:21:19.029-05:00I'm having some difficulty. The output return...I'm having some difficulty. The output returns "L is already in table", "E is already in table", "A is already in table", etc., spelling out each column name.Anonymoushttps://www.blogger.com/profile/04947043740402894698noreply@blogger.comtag:blogger.com,1999:blog-1078032318127767231.post-10324454513120006322014-07-07T10:26:51.105-05:002014-07-07T10:26:51.105-05:00I use the API http://stn.spotfire.com/dxpI use the API http://stn.spotfire.com/dxpJose Leviaguirrehttps://www.blogger.com/profile/12377756211132280060noreply@blogger.comtag:blogger.com,1999:blog-1078032318127767231.post-75511975075247995542014-06-26T07:57:35.224-05:002014-06-26T07:57:35.224-05:00Thank you for your blog site and this innovative s...Thank you for your blog site and this innovative soluitions. One of hte struggles I have when creating scripts is determining the classes and methods I need to use to perform the desired task. What references do you pull from to determine the proper classes, methods, and properties?Johnhttps://www.blogger.com/profile/09580489706327343017noreply@blogger.com