February 5, 200620 yr I have a table of documents. There are 3 types of documents specified in a field as LET MRI RPT and depending upon the type of document I wish to display it in a specific layout. IU have set up a trigger field which calculates the following If ((Letter_Type = "MRI" and Get (LayoutName) = "Letters:Letter" ) or (Letter_Type= "LET" and Get ( LayoutName ) = "Letters:MRI" ) or (Letter_Type="RPT" and Get (LayoutName) = "Letters:Letter" ) or (Letter_Type="LET" and Get (LayoutName) = "Letters:Report" ) or (Letter_Type="MRI" and Get (LayoutName) = "Letters:Report" ) or (Letter_Type="RPT" and Get (LayoutName) = "Letters:MRI");........ then I wish to run a SCRIPT called Select_Layout which chooses the correct layout according to this calculation: "Letters:" & Case (Letters::Letter_Type = "MRI"; "MRI" ; Letters::Letter_Type = "RPT"; "Report" ;"Letter" ) so my question is, how do I set up the Plug in to call this script in that calculation as described? I hope this is clear enough. Thanks in anticipation Graham
February 5, 200620 yr I guess you can place your EventScript invokation at the end of your calculation !? Something like If ((Letter_Type = "MRI" and Get (LayoutName) = "Letters:Letter" ) or (Letter_Type= "LET" and Get ( LayoutName ) = "Letters:MRI" ) or (Letter_Type="RPT" and Get (LayoutName) = "Letters:Letter" ) or (Letter_Type="LET" and Get (LayoutName) = "Letters:Report" ) or (Letter_Type="MRI" and Get (LayoutName) = "Letters:Report" ) or (Letter_Type="RPT" and Get (LayoutName) = "Letters:MRI");........ And S4HU_EventScript ( Get (FileName); "Select_Layout"; "" ) ) Then in the script Select_Layout, you can place a "Go to layout" script step that making use of the option "Layout Name by calculation..." I think your calc Case (Letters::Letter_Type = "MRI"; "MRI" ; Letters::Letter_Type = "RPT"; "Report" ;"Letter" ) should works fine !? The idea is 1. to trigger the script at the moment you want it to be triggered (this is called the "event") then, 2. in the triggered script you can do whatever you need to complete your process. HTH.
Create an account or sign in to comment