Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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.

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

  • Author

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?

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

  • Author

The program imports the data from a file that they download, once they download the txt file, the program automatically deletes the file.

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

  • Author

Thanks for your help. I live in Alabama and with the Hurricane coming through we were closed Thur and Friday. I will try this, Thanks again.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.