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

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

Recommended Posts

  • Newbies
Posted

Hi everyone,

Wondered if someone can help me?  I'm kind of new to Filemaker and I have created a database that works off of Filemaker GO so that users can fill out information on a table called Diary from their phone.

 

My question is, is there a way to create a script that can send an alert to a particular email address if the user of the phone app doesn't fill out information from their Diary table for a certain amount of time (if they haven't filled anything out for the last 24 hours)? 

 

On a similar note, if such a script is too difficult, is there a way to create a report that shows that user's answers for the day, but can this report be sent out automatically to an email address rather than having the Filemaker developer create a report each day?

 

And if the answer is yes to either question, is there an example of such a script somewhere?

Thank you so much!
~Terry

Posted

I am assuming that these diaries are running as a contained app on an iPhone/iPad and are not connected to a server?  Because via server this would be really easy.  If they are on their own out in the wild the question becomes: "How to get that information sent out?" 

 

Jane has a diary but does not open it in three days. To inform you of that fact she would need to first open the app.  Therefore I think having a script run when the dairy log is completed would be idea.  You could have this done by having the user push a button titled "Log Dairy" then the script simply runs "send Mail" script step and set the send mail script step to send to the address you would want.  In the subject line you could put "I did it!". In the Body you could leave it blank.  Make sure "Send Automatically" or the like is turned off in the send mail script step settings.  Then the client will see the email before it is sent (gives them piece of mind that the contents of the diary are not being sent) and have an opportunity to add any information they want then hit send.

 

You could also play with script trigger when file closes but not sure how reliable that would be on GO

  • Newbies
Posted

Thanks, Nuos, but unfortunately, that's not what my boss asked for.  Is there a way to create a script that only sends an email if the person hasn't submitted in 24 hours, not whenever a person submits the record...?

 

Yes, the diary app is stored on the Filemaker Server...

Posted

If it's on server then great! Much easier job for you

Create a user login table and have the login time adjust each time the user connects. Create a global field on the fmgo splash page table (or first table loaded when database opens - Doesn't have to be visible.). Connect this field to the user log table via the same account name (or unique descripter) field in the log table. Set connection to allow record creation in log table.

Create script that sets the global field to the account name/identifier and then set the time stamp to Get(currenttimstamponhost). Have this script run on startup.

Once that is working create a script that searches for all records whose difference in date is greater than 1 day (you can subtract Get (CurrentTimestamp) from log::timestamp ) display the users name in a layout. Save/print report.

On server in the server console (not your database) set the search script to run everyday at x time.

Ask boss for raise

  • Newbies
Posted

Thanks so much, Nuos.  What you describe suchs great in theory, but how do you actually implement it?  Are there any examples or resources you can point me to?  For example, how do you "Connect this field to the user log table via the same account name (or unique descripter) field in the log table. Set connection to allow record creation in log table." or "Create script that sets the global field to the account name/identifier".

 

Would it be easier to to just have a layout that's a report and have some way for this report to be emailed to a certain person everyday?

This topic is 3760 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.