virgonova Posted May 26, 2005 Posted May 26, 2005 I have an image database with rights managed photos; I would like to be notified when the licensing agreement expires. I have a container field with the image and an expiration date field. Email notification or some sort of flag within the record would be perfect. I found a thread a few months ago but cannot find it now. How do I make this happen? Mac OS X FM v7
sbg2 Posted May 26, 2005 Posted May 26, 2005 MyImageExpiredLabel = If(ExpireDate < Get(CurrentDate); "This image has expired") To send an email: -create a calculation field with global storage, called something like g_Expired = "This image has expired"; -create a second table occurence of the Image Database in the realtionship graph, relate the two Image tables by ImageDB::g_Expired = ImageDB2::MyImageExpiredLabel. -create a Value List named ExpiredList based on the ImageDB2::MyImageExpiredLabel field only using related values starting from the first ImageDB table occurence. then run a script on file open... ... ... ummmmm easier to look at the exampled I attached , its not as bad as it may sound. EmailFiles.zip
comment Posted May 26, 2005 Posted May 26, 2005 If you use Get functions in defined calculation fields, the calculation results must be unstored or the calculation will not update when the status changes. OTOH, an unstored calculation cannot be used on the right-hand side of a relationship.
virgonova Posted May 26, 2005 Author Posted May 26, 2005 It would be nice to not have to field through the database to see which images have expired, instead just receive notification maybe a month prior to expiration. Any other suggestions?
comment Posted May 26, 2005 Posted May 26, 2005 There is no perfect solution for this, AFAIK. The simplest way would be to run a script at startup that finds records where ExpirationDate < Get(CurrentDate) + 30.
-Queue- Posted May 26, 2005 Posted May 26, 2005 Create a script to find those records whose expiration date occurs within the next 30 days (or whatever criteria you want to use). Set Error Capture [On] Enter Find Mode [ ] Set Field [DateExpiration; Get(CurrentDate) & "..." & Get(CurrentDate) + 30] Peform Find [ ] If [not Get(FoundCount)] Show Custom Dialog ["No images expire within the next month."] Show All Records End If
sbg2 Posted May 26, 2005 Posted May 26, 2005 Hmmm, a little more complicated than I thought. What about using set field on a global[g_CurrentDate;Get(CurrentDate)] at startup and a global(g_LastExpiredCheckDate) when an export occurs? The startup script would check if g_LastExpiredCheckDate was different than g_CurrentDate and send an email with attached export of the found set if the two dates didn't match.
Recommended Posts
This topic is 7189 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 accountSign in
Already have an account? Sign in here.
Sign In Now