Skip to main content
Question

Formula Query to search for matching records with the exception of a specific field not matching

  • May 11, 2022
  • 0 replies
  • 161 views

Forum|alt.badge.img+1
I currently am using a Formula Query to identify when specific fields match it returns the Record ID# that has the matching data. This is to help identify duplicate record entries for things that can not be unique fields.

It works just fine.

I am now trying to figure out a Formula Query to look for records that should share the same data in 3 specific fields but doesn't.
The logic would be When [Field 5] equals [Field 6] but not equal to [Field 7] return [Record ID#]

What needs to go in the butnot location for my logic to work for this Formula Query?
GetFieldValues(GetRecords("{5.EX. ' "&[Field 5] &" '} AND {6.EX. ' "&[Field 6] &" '} butnot {7.EX. ' "&[Field 7] &" '} AND {3.EXE. ' "&[Record ID#] &" '}" ),3)

------------------------------
Jovan Vucovich
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
The operator for Not Equals is XEX.  sort of the opposite of EX.

So try this

GetFieldValues(GetRecords("{5.EX. ' "&[Field 5] &" '} AND {6.EX. ' "&[Field 6] &" '} AND {7.XEX. ' "&[Field 7] &" '} AND {3.XEX. ' "&[Record ID#] &" '}" ),3)


------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------

Forum|alt.badge.img+3

Could you please share the formula query to searching record? or is it working after saving the record or while creating the record because I also want to check whether the record already exists or not at the time of creation.