Skip to main content

How to compare two linked-to-other-records fields

  • April 12, 2017
  • 4 replies
  • 91 views

Forum|alt.badge.img+2

I have two fields:

  1. Contracted
  2. Completed

Each of these fields are set to link to multiple records. In this case they are modules students may choose to complete.

I would like to have a third field that automatically looks at the linked records in field 1 and checks to see if the same records are linked to in field 2.

I tried {field 1} = {field 2}

This works if the linked-to records are in exactly the same order.

But, if they differ

The formula does not recognize the same records are linked. In this case, I would like {field 1} = {field 2} to evaluate to true.

I would appreciate any insight you can share. Thank you.

/s

4 replies

Forum|alt.badge.img+1
  • Participating Frequently
  • 7 replies
  • September 28, 2017

Did you ever get an answer to this question? I think I am looking for something similar. I have two fields that each link to only one record. I want another formula field to either return the enter in Field 1 if the entries are identical, or return the text from both (e.g. “Field 1/Field 2”) if they are different.


Forum|alt.badge.img+5
  • Inspiring
  • 1386 replies
  • September 29, 2017

Did you ever get an answer to this question? I think I am looking for something similar. I have two fields that each link to only one record. I want another formula field to either return the enter in Field 1 if the entries are identical, or return the text from both (e.g. “Field 1/Field 2”) if they are different.


Your situation is much more straightforward. This formula should give you what you want:

IF({field 1}={field 2},{field 1},{field 1}&", "&{field 2})

@Sydney_Brown

There are ways to provide the functionality you desire – depending on the number of possible modules to consider. For instance, this base assigns a ‘unique’ power-of-2 value to each course and uses SUM(values) rollup to calculate a numeric value for the linked courses. Since there is a unique value for each possible combination of courses, comparing the values will test for matching courses regardless the order in which they are linked.

Admittedly, this is a bit of a kludge – and if you’re dealing with a catalog of hundreds of courses, it’s not an option – but in many instances it can be a quick and simple solution.


Forum|alt.badge.img+4
  • Participating Frequently
  • 6 replies
  • October 20, 2023

I'm having this exact same issue... as this query is 6 years old, I'm not holding out much hope... unless there is some newer function that does this?


Forum|alt.badge.img+10
  • Inspiring
  • 26 replies
  • January 23, 2024

See my reply here