Is there a way to build a model condition that returns records based on comparing two fields in the same row?
For example:
I have a Salesforce formula field that returns TEXT: let’s call it “formula__c”
I have a Salesforce Picklist field: let’s call it “picklistfield__c”
I want to return all records where “formula__c” <> “picklistfield__c”
I’ve seen a few topics that attempt to address this issue, but I have not seen a successful solution.
Things I’ve tried:
setting the “Field from another model”.
I’ve tried it with both the “any row” and the “first row”, but it did not work because I am not trying to compare the value with any/all of the values in the model, I want to compare the same row with itself.
Subquery.
This did not work because I need the same object in the subquery that I have in the original query, and the system won’t allow that.
Single Specified value with a merge field. {{formula__c}}
I’m guessing this did not work because it couldn’t resolve the field since there is technically no data in the model yet.
I was hoping I could have had something similar to the lookup filters with the option “another field from row”.
- I also tried adding a new field in Salesforce that did the comparison for me and returned a checkbox, but, alas, the dreaded “Error: Compiled formula is too big to execute” squashed that idea.
Any solutions out there?