Geetika Saini 2 Posted March 10, 2020 Share Posted March 10, 2020 Hello Fellows, I have a requirement to store the marked data in a text area. In my use case, I am invoking Iron python script to navigate to a different page hence script given in below link is not working as My active page is getting changed every time I am marking data on the page https://community.spotfire.com/questions/mark-row-and-show-particular-column-value-text-box I am attaching mydxp which navigate to new page whenever we mark the data on the first page. I have added a text area where I need to store the marked values. I will appreciate if anyone can provide me any pointer or help to achieve the functionality Link to comment Share on other sites More sharing options...
Tyger Guzman 2 Posted March 10, 2020 Share Posted March 10, 2020 Change the marking of your table on page 2 to a different marking than the visual on page1. I opened your dxp and the functionality seems to be working. I mark item(s) on page1 and it navigates to page2 showing me the marked items. If I change the marking on page2 to "new marking" then no markings I make on page2 affect the document property selectedValue Link to comment Share on other sites More sharing options...
Geetika Saini 2 Posted March 10, 2020 Author Share Posted March 10, 2020 Markings are working fine and it is navigating as well. My use case needs to save the values I marked on the first page. If you check the text area on the second page of my dxp, you will see that I want to save those selected values in text area. That is what I am trying to achieve Link to comment Share on other sites More sharing options...
Tyger Guzman 2 Posted March 10, 2020 Share Posted March 10, 2020 You will want to change your data function. The input should be an expression : Unique Concatenation of the values you want to pass to a document property having it be limited by your Marking. attached is a working example Link to comment Share on other sites More sharing options...
Geetika Saini 2 Posted March 10, 2020 Author Share Posted March 10, 2020 Thank you for the Help, Appreciate the effort. Though I still have a question, I am not sure if that is something we can achieve here in this case, but I would Like to know your thoughts. Is it possible to store the selected values as value 1, value 2 under different document property like I showed in my text area, the reason I am asking this format because using the values of those document Property I want to limit my other visualization but in this case, they are coming as concocted string labels which I cannot use in limiting expression. Link to comment Share on other sites More sharing options...
Tyger Guzman 2 Posted March 11, 2020 Share Posted March 11, 2020 With some extra python scripting yes you can assign to other document properties. But how many items are can be marked Instead of assigning to multiple documents properties I would use python to format correctly for use in the limit expression. What type of expression are you wanting to use Link to comment Share on other sites More sharing options...
Geetika Saini 2 Posted March 11, 2020 Author Share Posted March 11, 2020 Hello, Thank you for your response.I want to use the expression in data limiting. I will be marking two points at any give time on the Line chart in my dxp. once I receive these points, I want to store them as T1 and T2 in any document property. Now I want to use these T1 and T2 to limit the data in other table where I have time as one of the columns Basically I want to extract the data between T1&T2 timelines from other tables These tables are related but have different Timelines Regards, Geetika Link to comment Share on other sites More sharing options...
Tyger Guzman 2 Posted March 11, 2020 Share Posted March 11, 2020 Set up two docuemnt properties (labels) as DateTime then update your scritp to: # This script just checks that there is a value in the input, and if so changes the page selecetedValue = Document.Properties["selectedValue"] if selectedValue!="": for page in Document.Pages: if (page.Title == "page 2"): Document.ActivePageReference=page z = selecetedValue.split(',') Document.Properties["MyVal1"] = z[0] Document.Properties["MyVal2"] = z[1] Link to comment Share on other sites More sharing options...
Geetika Saini 2 Posted March 11, 2020 Author Share Posted March 11, 2020 Thanks a lot for your response !!! I will implement in my work and let you know Link to comment Share on other sites More sharing options...
Geetika Saini 2 Posted March 19, 2020 Author Share Posted March 19, 2020 @tyger0951- I have implemented the script we discussed above, I am having one error-"Could not execute function call 'pagechangefunction'Could not execute script 'changepage': 'NoneType' object has no attribute 'split'"This is appearing when nothing is selected on the Graph, I know its a valid error as our script work only when something is selected but I was wondering is there any way to get rid of the error as it will be issue for users if they get this issue every time I hope you can help me out with this error 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