Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Is there anyway to import a date from a text file and check and see if that date is greater than 90 days. I have an application and I want a shut off procedure that exits the program if the date text file they have is greater than 90 days. Does anyone have any ideas and the code if possible.

Posted

Yes, but i'd recommend against that. I imagine you are distributing a solution and want an easy way to make the product expire. Using the method you suggest, a savvy user could just open the text file and change the date.

It's slightly more complicated to do this completely within FM--you'd basically need a global field called "PurchaseDate" which you could set to auto-fill with the current date the first time the file is opened, then check that field against Status ( CurrentDate ) to check for the 90-day limit.

Unless that text file has other significance or is somehow auto-generated...

Jerry

Posted

Thanks for your help. I having to come in behind someone and take over a product that has already been created. So what you are saying is import the text file into a global field and check and see if that field and the current date is greater than 90 days. We are looking at changing the text file date every day, the user will be able download their data(there are 4 txt files including the txt we are talink about) as long as they are active user with us they can download the txt with the date. Does this sound like the best way to do this?

Posted

So you are saying there is other data in this or other text files that users will need to refresh daily? The system you seem to be suggesting is still not very secure, as it seems the user could just download the text files, change the date in the appropriate text file, and steal your data. I would change the point of restriction to wherever they download from, and just prevent the remote user from even getting the 4 txt files you speak of if they are not currently licensed.

How does that download occur? Do they download from an ftp site or what?

J

Posted

Your best, most secure option will definitely be to restrict access to the downloadable files. But if i were going to implement a system where the user is authorized based on the contents of the text file you described, i would create a script called Opener and set your file to run this script upon opening.

The steps in Opener:

Import Date From Text File

If ( Status ( CurrentDate ) - DateImportedFromFile ) > 90

Exit Application

End If

where DateImportedFromFile is the field into which your data has been imported.

J

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