Iron Python Wizards/Ray , Request help with an Error ?

Iron Python Wizards/Ray , Request help with an Error ? ? 'HtmlTextArea' object has no attribute 'Data' ?  - 

I have a script that does two script that  does two things .

1. Takes the user to the Selected Page.  
2. Limits the data with the required condition-.

IP SCRIPT

From Spotfire.Dxp.Application.Visuals import VisualContent, VisualTypeIdentifiers

Document.ActivePageReference=ActPage

# Filter data to the specified Expression in the document Property-

For visual in ActPage.Visuals:

    if visual.TypeId==VisualTypeIdentifiers.Table:

    ActPage.ActiveVisualReference=visual

vc=ActPage.ActiveVisualReference.As[VisualContent]()

vc.Data.WhereClauseExpression="("+ Subasset +")"

The Code works fine in the Page when the Visualization Type is Table(with and without the TextArea), but  throws an error  when the visual is a Cross table or any other viz. (No Error-if Text Area is taken out of the ?Variance? Page) . I believe the issue stems from  vc=ActPage.ActiveVisualReference.As[VisualContent]()-which makes the last clicked Item as ?Active Page? ( in this case the Text Area when the user clicks the ?<<<HOME/BACK? button)  and applies the data limiting specified .

Also attached is Sample  DXP

Page 1 is the main Navigation page ? which Takes users to the required pages. All buttons under"VARIANCE-CROSSTABLE" throw an error ? the Other Script Control buttons for  "DOWNTIME"
and "DATA" are working fine as they are table visuals

Thanks

Attachments

AttachmentSize
Binary Data IPSCRIPT FOR CROSSTABLE.dxp127.1 KB

(6) Answers

Login