Jump to content
Server Maintenance This Week. ×

Filtered Portal


geleng

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

Recommended Posts

I am not sure where this goes so my apologies if it's in the wrong sub forum.

Some background information:

I am trying to create a runtime solution that should work on a Windows 2000 OS. I do not have access to older versions of FileMaker so I am using FMProAdvanced11 to edit a runtime solution (the .usr file) that was created in FMPro8.5; i know it sounds weird, but doing this ensures that the runtime will work in Windows 2000.

Main Problem:

My database has a Company Table with a field called LastUpdated. LastUpdated is a date field that is automatically updated with the latest modification date. I'm trying to create a layout that will show companies that have not been updated for x (x is user defined) months.

I managed to do this in FM11 by doing the following - I created a calculation field in my Company which calculates the number of months between the current date and the date in the LastUpdated field. When the user enters the layout, a prompt asking the user to key in the desired value, X, will appear. X is then stored in a seperate field. I created a filtered portal with the criteria being X larger than the calculation field mentioned earlier.

This works perfectly on my computer when I run the database with FMProAdvanced11 but it does not work in the runtime solution created in FMPro8.5. I figured that it was probably because FM8.5 does not have the filtered portal capability. If that is the case, does anyone else know any other way that I can get the layout I want?

Thank you very much!

Link to comment
Share on other sites

You're correct, filtered portals are new to FM11.

You cannot really achieve what you want prior to FM11, because your bottom half of the relationship is unstored. That is, your X value is unstored bcs it must rely on Get (CurrentDate). You cannot build a parent-child relationship using an unstored field in the child.

However, you can simply build an interface where the user does a find in the X field.

Link to comment
Share on other sites

You can calculate the latest date of interest as =

Let (

today = Get ( CurrentDate ) 

; 

Date ( Month ( today ) - X ; Day ( today ) ; Year ( today ) )

)

and use a > relationship to compare this date to the (stored) modification date.

Hi,

I created a script that replaces the field Period between the current date and the last updated date that will triggers on entering the layout and then uses the > relationship method.

Thank you!

You're correct, filtered portals are new to FM11.

You cannot really achieve what you want prior to FM11, because your bottom half of the relationship is unstored. That is, your X value is unstored bcs it must rely on Get (CurrentDate). You cannot build a parent-child relationship using an unstored field in the child.

However, you can simply build an interface where the user does a find in the X field.

Thank you for your help! Instead of using a calculation field based on Get(CurrentDate), I've changed the field to a text field and created a script that will replace the content of the field whenever the the user enters the layout.

Link to comment
Share on other sites

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