Jump to content
Sign in to follow this  
mf

Comparing 2 fields

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...

Share this post


Link to post
Share on other sites

Too bad...

Again,without adding another field (the file has over 30000 records, so I am trying to avoid adding extra fields), can a date field be compared to a formula like "Today - 14"?

You are probably going to give me the same answer, but I had to ask...

1124965230-Copy_and_Paste_Single_file.zip

Share this post


Link to post
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 ]

Share this post


Link to post
Share on other sites

Excellent!

I did not know about this "Insert Calculated Result", it works great. This is exactly what I needed.

Thank you very much.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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