Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

EventScript Plug in

Featured Replies

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

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

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.