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

Featured Replies

I have a layout that uses a plug-n called MMEmail. I have three fields I have set as Required but users can still use the MMEmail function to email portions of the layout even if they haven't filled out the required fields yet. The plug-in simply calls up an email window which is populated with merge fields and emails it using a local email client as support.

When the user clicks on the button to summon the email window I would like to see that script validate those three fields. The fields are a Date filed, and two Text fields. Any ideas?:)

Let (

[

To = Purchase::SendToMail ;

Subject = "Purchase Request Approval Needed" ;

Body = "Your approval is requested for the following purchase order by <>:)¶¶Purchase ID#: <>¶Product: <>¶Quantity: <>¶Total Cost: <>¶¶Date Requested: <>¶Program: <>¶Vendor: <>¶Pro Card Purchase: <>¶¶Comments: <>" ;

Attachment1 = "" ;

Attachment2 = "" ;

Attachment3 = "" ;

MergeFields = "" ;

SendEmail = "True"

];

MMEmail_ShowMessageDialog( To ; Subject ; Body ; Attachment1 ; Attachment2 ; Attachment3 ; MergeFields ; SendEmail )

)

Add a commit records/requests script step prior to the script step that calls the plugin. This will trigger the validation, and if you Set Error Capture [on], you can use Get(LastError) in an if statement to control the flow of your script based on the validation.

Commit Records []

If[Get(LastError)=0] //no error found

Set Field [pluginField;pluginFunctionCalls]

Else

Show Custom Dialog [you need values in blah blah fields...]

EndIf

You can make it more complicated than this to test for more different things, but that's the basic idea.

Create an account or sign in to comment

Important Information

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

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.