I'm trying to write a search (on a custom record) ...
# suiteanalytics
j
I'm trying to write a search (on a custom record) where one of the columns uses a CASE to retrieve one of two different columns Let's say my custom record has 4 fields: fields a and c are of type MyOtherCustomRecord fields b and d are of type Percent I want to use the Percent fields to determine whether I'm returning field a or field c. In regular SQL, it would look something like this: SELECT CASE WHEN field_b > field_d THEN field_a ELSE field_c END FROM MyCustomRecord I'll need to return the ID of the MyOtherCustomRecord (either from field_a or field_c depending on which has a higher percent in field_b/_d) I'm not entirely sure how to achieve this? The Formula column types dont't seem to have an option to return a Record rather than a text/numeric/etc field