Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6868 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

This topic is 6868 days old. Please don't post here. Open a new topic instead.

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...

Important Information

By using this site, you agree to our Terms of Use.