5 Replies Latest reply on Jul 29, 2011 9:01 AM by philmodjunk

    Email Notifications/Alerts

    DanielGordon

      Title

      Email Notifications/Alerts

      Post

      Hi,

      I am looking into the best way to flag any work that is pending with a deadline approaching.

      I have a table that has a deadline field and a payment field, ideally I want to flag any deadlines that are approaching maybe with a 5 day grace and the payment field empty(also the option for this to be repeated on a daily basis leading up to the deadline).

      I will have 18 different users so am looking into the best way of displaying the notification, all records will have a user name field too if that helps?

      Is it possible for each user to log in and receive their own notifications based on the username field?

      Alternatively we have a generic email address that all users have access to. An automatic email could be sent to this address showing the company name and the deadline?

      I am unsure of the best way to create an alert/notification to suit our needs.

      I am using filemaker 11.

      Your feedback would be greatly appreciated.

      Dan

       

        • 1. Re: Email Notifications/Alerts
          philmodjunk

          Can you get Send Mail to work for you? (It doesn't work with all email clients and sometimes requires some configuring to get it to work correctly.)

          You can certainly set up a script that runs every time the file opens. This is a setting in File Options.

          Your script can use the current user's account name or their user name and also today's date to perform a find to locate any such records. If any are found, email notifications can be sent out.

          I'm not clear as to whether your users are to be the senders or the recipients of this warning message.

          • 2. Re: Email Notifications/Alerts
            DanielGordon

            Thanks for the quick reply.

            The users would be the recipients of these warning messages.

             

            • 3. Re: Email Notifications/Alerts
              philmodjunk

              If the users are the recipients, do they need to be notified by email or would a message from a script that checks for such notifications and pops up a message with a list of the relavent records each time they open the database do the job? (That's a simpler solution than sending out emails.)

              • 4. Re: Email Notifications/Alerts
                DanielGordon

                I am looking for the easiest way of producing a notification.

                A message that pops up each time a user logs into the database would be ideal, I and the users would much prefer this option.

                 

                Many thanks.

                • 5. Re: Email Notifications/Alerts
                  philmodjunk

                  Ok, here's a general outline of the solution. You'll need to fill in the details to adapt it to your specific database design.

                  In File OPtions, you can select a script so that it runs everytime the file opens.

                  In this script you can use Get ( AccountName ) and/or Get ( UserName ) to identify the user who has opened the file. (UserName is a setting in Preferences and can thus be a different name than the AccountName used with the password to open the file.)

                  If your records have a field that contains this name, your script can perform a find for records with that name and which also uses whatever additional criteria is needed to find just the records that are the ones that need to be brought to the users attention. If no records are found, the script can simply take the user to whatever layout you want them to see as their initial layout. If records are found, the script can present them in a list on a layout with text on the layout telling them that this is something they need to deal with. Make sure your find criteria is such that such records found will not keep being brought up once the user has dealt with them.

                  Here's a generalized script for this method:

                  Freeze Window
                  Enter Find Mode [] // clear the pause check box
                  Go to layout [Select layout you'll use to present your list of records needing user attention]
                  Set field [YourTable::AccountNameField ; Get ( AccountName ) ]
                  Set Field [YourTable::YourField ; //use as many set field steps as you need to pull up the desired records]
                  #You can even create multiple requests--including Omit type requests if necessary here
                  Set Error Capture [on] // Keeps dialog from FIleMaker from interrupting your script if no records are found
                  Perform Find []
                  IF [ Get ( FoundCount ) // some records were found ]
                     Sort [Restore ; no dialog ] //sort into most useful order, may not be needed
                  Else
                     Go To Layout [Specify main menu layout, dashboard, whatever works for initial layout here]
                  End If