December 16, 200916 yr Hi, I am new to this Forum and please forgive me if I made any mistake. What I want: I would like to build in a kind of (selectable -on/of and days before the birthdate selectable) alarm in which when opening the database that you are warned that a birthday is coming up? I am also looking to make it editable some way so that I can decide on the period (14 days, 10 days, 7 days, whatever I like) the alarm works on. Currently I am using a script by which when I open the database its automatically search for upcoming birthday in next 14 days. Will be waiting for experts help. Thanks, FMbuddy
December 20, 200916 yr Author I was trying this script for my solution. [This was collected from another topic] Script: Enter Find Mode [ ] uncheck pause Set Field [ Client_Data::cConvertBD ; Let ( today = Date ( Month ( Get ( CurrentDate ) ) ; Day ( Get ( CurrentDate ) ) ; 4 ) ; today - 1 & ".." & today + 14 ) ] Set Error Capture [ On ] Perform Find [ ] I made one change and that is for range[i.e. 14]. I want it in editable format. Though I failed to do that more efficiently, so I created a new layout and a new field name "range", type: number. Now the script in my database look like this : Enter Find Mode [ ] uncheck pause Set Field [ Client_Data::cConvertBD ; Let ( today = Date ( Month ( Get ( CurrentDate ) ) ; Day ( Get ( CurrentDate ) ) ; 4 ) ; today - 1 & ".." & today + ContactManagement::Range ) ] Set Error Capture [ On ] Perform Find [ ] In layout I put this filed and made it a drop down list with number from 1 to 31 as range. What I planned was, I will choose the range 1,2, 10 or 31 and the above script will automatically update and search as per the given range. To test it I added some dob in my database. 1. 12/29/1909 2. 1/1/1890 3. 12/29/1980 4. 12/25/1890 But when the month is changing then the script isnt showing the results properly. I mean till 10 days range its showing perfectly 3 results found but when I am choosing 31 days then its not showing the 2nd result [i.e. 1/1/1890]. I have tested the script also in its original form and change the range from 14 to 31 but still it didnt showed the all results. Help will be appreciated. Thanks, FMBuddy
Create an account or sign in to comment