Jump to content

Comparing 2 fields


mf

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

Recommended Posts

Is there a way to do a find by comparing 2 fields without creating a 3rd field(that would contain the result of the comparison)?

for example, set field("field 1", ">= field 2")

FM is not accepting this: it is not taking the value of field 2 but the actual field name...

Link to comment
Share on other sites

If you want to do something like today-14, I would create a script like this:

code:


Enter find mode [no restore]

Set Field [MyDateField, Status(CurrentDate)-14]

Perform Find [no restore]


That will find all record exactly 14 days old. If you want to find anything more than 14 days old, you can use this script.

code:


Enter find mode [no restore]

Insert calculated value [select][MyDateField, "<"]

Insert calculated value [MyDateField, Status(CurrentDate)-14]

Perform Find [no restore]


If these are frequent searches that you are doing, the script is the way to go, because you don't have to wait for records to recalculate and re-index. Also, you can use global fields to get some of the search criteria from the user and then use the script to transfer it to the appropriate fields in the find request. Globals don't take up any significant amount of room and they give the user some flexibility.

[ September 19, 2001: Message edited by: BobWeaver ]

Link to comment
Share on other sites

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