Newbies dmurnane Posted June 9, 2009 Newbies Posted June 9, 2009 I have several clients with whom I have annual contracts. I give them a database which they have to login to use. I want to be able to put a time limit on their ability to login. In other words if their contract expired at the end of July and they decided not to renew, then after 1 month their login would be de-activated. I am using FM 8.5 advanced. I tried the following script but it immedietly de-activates them. I have tried changing the date format mm/dd/yyyy but still the same result. Can you advise? Many thanks, Dominic If [(Get CurrentDate) > 01/09/2009 Go to Layout ["Startup" (Assets)] Show/Hide Status Area [Hide] Beep Show Custom Dialog ["Database Maintenance Alert"; "Please contact Compass - 087-xxx if you are seeing this message as your user licence may have expired."] Enable Account [Account Name: "Me"; Deactivate] Re-Login[ ] End If
IdealData Posted June 9, 2009 Posted June 9, 2009 You cannot use 01/09/2009 as a date. You must use: Date (09 ; 01 ; 2009) Please see the syntax for the Date function in the calculation dialog as the ";" delimiter may be "," on your system.
Lee Smith Posted June 9, 2009 Posted June 9, 2009 It is not a good idea to hard code your dates. I would have a expire date, and then use that in the If Statement. If [ Get ( CurrentDate ) > ExpiredDate + 30 ] Lee
El_Pablo Posted June 9, 2009 Posted June 9, 2009 You surely have a customer table. Link a subscription table to it. Here's a simple structure customers (pkCustomerID, ...) subscriptions (pkSubscriptionId, fkCustomerID, dateStart, dateEnd, active, ...) Do a login script. Check if the customer has a valid subscription, if not send a message and deactivate the accound.
Recommended Posts
This topic is 5802 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