Jump to content
The ORIGINAL FileMaker Community - Forum - Online Business Apps & Software Forum
apelust

timer/alerts/ calender... please help

Recommended Posts

apelust

i have a question.

is there anyway to tag certain files with a timer or an alert.

For example.

I have 100 items in my invoice with deadlines to be meet and i need an email alert if time goes by too long before they are finished.

 

Is there something like that in filemaker pro?

 

thanks

Share this post


Link to post
Share on other sites
Maarten Witberg

do you mean an email alert to customers who should pay their invoice?

Share this post


Link to post
Share on other sites
apelust

no. an email alert to employees. like little postit notes making sure that certain files don't get forgotten.

Share this post


Link to post
Share on other sites
Maarten Witberg

you could create a startup script which performs a find on all records where Due Date ≤ today's date. If the found set is >0, then you can pop up a dialog message alerting the user and giving him the choice to view the found set or proceed otherwise. Something like that? An email message is also possible, but it seems a bit silly to send someone a message from a program they are just opening.

Share this post


Link to post
Share on other sites
xroox

Also very interested in this. Not an email but an alert of some kind saying "it's time to call this person"

 

I have found no information about doing this. Not sure why.

Share this post


Link to post
Share on other sites
simonsays452

Having a hell of a hard time trying to set this up. I'd like to have a pop-up window display an alert when a records' approval expiration is 30days from the current date. Then I'd like to have one of the buttons in the pop-up window allow the user the view all records whose approval expirations are within 30 days of the current date.

 

tks in advance.

Share this post


Link to post
Share on other sites
dlnorman

I, too, am trying to set up an email alert based on an upcoming deadline date. I know I can create a script trigger to run the script when the file is opened, but I don't know how to tell it to respond to a date that is, lets say, within two weeks of the current date.

 

Any advise?

 

Thanks,

Daniel

Share this post


Link to post
Share on other sites
AHunter3

Even in FileMaker 10, with script triggers, scripts don't "just happen"; verbs (things that happen) still have to have a triggering event, and in FileMaker the CURRENT DATE (and time; "now" in other words) cannot be invoked except on a "calculate as needed" basis. That limits what you can do with dates (and times) in places like relationships (like trying to set up a relationship to UNEXPIRED coupons or UNEXPIRED daily appointments only) and it also means you can't make a script "just happen" when SomeDateField ≤ Get(CurrentDate) or SomeTimeStampField ≤ Get(CurrentHostTimeStamp).

 

You can have a script run when anyone logs in (opens the file) which brings up the list. That is what most people do when they are talking about records within a DATE RANGE of today. That doesn't handle folks who want things popping up when a scheduled TIME (as well as date) comes due, but you latter two posters are both asking about dates, so that is what I would do if I were y'all.

 

I don't know how to tell it to respond to a date that is, lets say, within two weeks of the current date.

 

Enter Find Mode []

Set Field [YourTable::YourDueDateField; ≤ Get(CurrentDate)+14]

Set Error Capture [On]

Perform Find []

If [Get(FoundCount)>0]

.. Show Custom Dialog ["These items are coming due and need your attention!" / OK]

Else

.. Show Custom Dialog ["There are no items coming due at this time" / OK]

.. Show All Records

.. Go to Layout [Main Menu Screen or Whatever]

End If

Share this post


Link to post
Share on other sites
Jack Rodgers

Set up a script like this simple script:

 

SCRIPT: show alerts

Perform find for records

if found count > 0

show as list

end if

 

now, you simply perform that script within other scripts of your choice so that the user will see this list after or before performing certain other scripts.

 

Close all windows would be a good script.

Done with this process would be another.

 

Thus, all during the day your user could be checking on these found records.

 

You could also put a timer on the script such that it would only run every fifteen minutes rather than every 15 seconds.... :)

Share this post


Link to post
Share on other sites
dlnorman

Enter Find Mode []

Set Field [YourTable::YourDueDateField; ≤ Get(CurrentDate)+14]

Set Error Capture [On]

Perform Find []

If [Get(FoundCount)>0]

.. Show Custom Dialog ["These items are coming due and need your attention!" / OK]

Else

.. Show Custom Dialog ["There are no items coming due at this time" / OK]

.. Show All Records

.. Go to Layout [Main Menu Screen or Whatever]

End If

 

AHunter3,

 

Thank you so much for this. When it performs this script, and the value is true from the Set Field calculation, then it only shows the first record containing the DueDateField, regardless of the date of that particular record. If there are not records matching the find, then it moves on to the Else script. Any suggestions?

 

Thank you!

Share this post


Link to post
Share on other sites
AHunter3

I don't know what you're doing wrong without seeing your database. (If you join as a full member you can post it here for us to look at, by the way).

 

Here are the things I would check:

 

Enter Find Mode []

Set Field [YourTable::YourDueDateField; ≤ Get(CurrentDate)+14]

Set Error Capture [On]

Perform Find []

If [Get(FoundCount)>0]

.. Show Custom Dialog ["These items are coming due and need your attention!" / OK]

 

You should now have a found set of one or more records. Each record should have a value in YourDueDateField that is equal to or older than (lower than, less than) the date 14 days after today's date. If you ran it today, that would mean any date less than or equal to Nov 24, 2009. You SURE that's not what you've got?

 

 

Else

.. Show Custom Dialog ["There are no items coming due at this time" / OK]

.. Show All Records

.. Go to Layout [Main Menu Screen or Whatever]

End If

Share this post


Link to post
Share on other sites
dlnorman

I'll talk to my employer about membership! Thanks.

 

I definitely have the date field set as a date. It's indexed, 4-Digit Year Date, strict data type required.

 

Enter Find Mode and Perform Find are both without Restore. If I click Specify for the Perform Find, it lists Find Records in the action and the criteria is blank. Once I close that dialogue, the Specify find requests is checked, and I uncheck it to remove the restore.

 

Is there a way to Show Found Record Set? Or is that supposed to automatically occur after the Set Field step?

 

Thanks again for your time AHunter3!

Share this post


Link to post
Share on other sites
AHunter3
Is there a way to Show Found Record Set? Or is that supposed to automatically occur after the Set Field step?

 

Immediately after the Set Field script step, you should still be in Find Mode. You do not have a found set when you are in Find Mode! After the next step, the Perform Find script step, you should have a found set and it should consist of all records where the due date is 14 days from now or earlier.

 

Try doing the FIND manually:

 

⌘-F (or Ctrl-F if you're on a PC)

click into the DueDate field

from the Operators, where you can pick symbols, etc, pick ≤

after that, type today's date + 14 which is "11/24/09"

 

your DueDate field should now look like this: ≤ 11/24/09

 

hit enter or return to perform the find

 

Do you get the same results as the script?

Share this post


Link to post
Share on other sites
steels28
AHunter3,

 

it only shows the first record containing the DueDateField, regardless of the date of that particular record.

 

 

Is the due date a field in another table?

Share this post


Link to post
Share on other sites
dlnorman
Immediately after the Set Field script step, you should still be in Find Mode. You do not have a found set when you are in Find Mode! After the next step, the Perform Find script step, you should have a found set and it should consist of all records where the due date is 14 days from now or earlier.

 

Try doing the FIND manually:

 

⌘-F (or Ctrl-F if you're on a PC)

click into the DueDate field

from the Operators, where you can pick symbols, etc, pick ≤

after that, type today's date + 14 which is "11/24/09"

 

your DueDate field should now look like this: ≤ 11/24/09

 

hit enter or return to perform the find

 

Do you get the same results as the script?

 

 

I did the find (⌘) and it didn't work at first. I had to disable the Strict Data option in the DueDate field. Then the find worked perfectly, but the script is still just showing record 1, which even has a date beyond the calculation.

 

I believe the calculation is working because if I create records that have a date within the two weeks, then the correct IF dialogue appears. But if I change the dates for all records to be beyond the calculation, then the Else dialogue appears. So it seems the calculation is working, it's just not listing the found set, only listing record #1 instead.

Share this post


Link to post
Share on other sites
dlnorman
Is the due date a field in another table?

 

The field is in the same table.

Share this post


Link to post
Share on other sites
AHunter3
I did the find (⌘) and...the find worked perfectly, but the script is still just showing record 1

 

If the manual Find bring up the correct found set (I assume that's what you mean by "works perfectly") but the script does not, you've made an error in the script setup.

 

Please insert this script step and then run the script and tell me what you actually SEE in the DueDate field where it pauses:

 

Originally Posted by AHunter3

Enter Find Mode []

Set Field [YourTable::YourDueDateField; ≤ Get(CurrentDate)+14]

 

Pause [indefinitely]

 

Set Error Capture [On]

Perform Find []

If [Get(FoundCount)>0]

.. Show Custom Dialog ["These items are coming due and need your attention!" / OK]

Else

.. Show Custom Dialog ["There are no items coming due at this time" / OK]

.. Show All Records

.. Go to Layout [Main Menu Screen or Whatever]

End If

 

 

 

If (as I am starting to suspect) you do NOT end up with "≤ 11/24/2009" in that field, your Set Field script step is not configured properly.

 

In which case I would ask you to read this brief tutorial and see whether that sheds any light on your problem.

Share this post


Link to post
Share on other sites
dlnorman
If the manual Find bring up the correct found set (I assume that's what you mean by "works perfectly") but the script does not, you've made an error in the script setup.

 

Please insert this script step and then run the script and tell me what you actually SEE in the DueDate field where it pauses:

 

Originally Posted by AHunter3

Enter Find Mode []

Set Field [YourTable::YourDueDateField; ≤ Get(CurrentDate)+14]

 

Pause [indefinitely]

 

Set Error Capture [On]

Perform Find []

If [Get(FoundCount)>0]

.. Show Custom Dialog ["These items are coming due and need your attention!" / OK]

Else

.. Show Custom Dialog ["There are no items coming due at this time" / OK]

.. Show All Records

.. Go to Layout [Main Menu Screen or Whatever]

End If

 

 

 

If (as I am starting to suspect) you do NOT end up with "≤ 11/24/2009" in that field, your Set Field script step is not configured properly.

 

In which case I would ask you to read this brief tutorial and see whether that sheds any light on your problem.

 

Okay...so when I run with the pause, it goes to a different field (lets call it ItemName...a drop-down list) and enters a 1.

 

When I originally went to enter the Set Field parameters, I was not able to include the ";" in the calculation. Meaning I left the top "Specify Target Field" unchecked, hit the "Calculated Result", chose the field from the list on the left, then chose the operator and the function as you wrote it.

 

If I try to add the ";" then a dialogue pops up saying "An operator (e.g. +, -, *, ...) is expected here," then highlights the ≤ symbol. But if I delete the ";" then it accepts the equation.

 

So, then after reading your other Invoice post, I cleared the step, added it again, went to the top button, Specify Target Field, chose the correct field from the pop-up dialogue, hit the specify button within the same dialogue, then I come to the same calculation window. If I just enter the operator and Get(CurrentDate)+14, it gives me the same warning saying "An operator (e.g. +, -, *, ...) is expected here." So if I add the Table::Field to the beginning of the equation, it accepts it, but then the script step reads:

Set Field [Table::Field [Table::Field ≤ Get(CurrentDate)+14]]

 

...which still goes to the same wrong field during the find, but it does not enter a 1 value, it's just blank.

 

If I select the top button (Specify Target Field), choose the field, it then says 1 in the Repetition line. Hit ok, then go to the bottom field, I have the same problem that it won't allow me to just enter ≤ Get(CurrentDate)+14. So if I add the field before the operator, then my script step reads:

Set Field [Table::Field ; Table::Field ≤ Get(CurrentDate)+14]] (the ; being the only difference)

 

And when I run the script, it puts a 1/*/2009 in the DueDate Field, then jumps into the ItemName field and pauses.

 

I'm sure I'm just making some fundamentally dumb mistake, but I'm not sure where I'm going wrong...

 

Your help is so tremendously appreciated!

Share this post


Link to post
Share on other sites
AHunter3

Totally MY fault. Sorry.

 

Instead of specifying it as ≤Get(CurrentDate) +14, specify it as "≤" & Get(CurrentDate) + 14

 

(do include the quotation marks around "≤" and don't forget the & )

Share this post


Link to post
Share on other sites
dlnorman
Totally MY fault. Sorry.

 

Instead of specifying it as ≤Get(CurrentDate) +14, specify it as "≤" & Get(CurrentDate) + 14

 

(do include the quotation marks around "≤" and don't forget the & )

 

 

You are AWESOME! Thank you so much for your help. The script only works if I'm already in the table's layout, so I added a Go To Layout at the top and now it work great!

 

Thanks again! Do you work for this site, or were you kind enough to take all this time out of your day to help? Either way...You Rock!

 

Best,

Daniel

Share this post


Link to post
Share on other sites
AHunter3

Thank you!

 

You'll find this place is well-populated with helpful folks. The range of expertise is from novice up through professional expert, and the tone and purpose of the board is definitely friendly and supportive.

Share this post


Link to post
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use