How to populate one record in reference field even multiple records exist with search criteria

Mukesh Singh
Tera Contributor

Hi Developers,

We have one reference field on custom table(a), reference field fetching data from another custom table(b). We have multiple records with the same name on that custom table(b). When searching data on reference field with record name, it is showing all records with that name. But we want to show only one record even though multiple records exist.

Please suggest how to achieve this requirement.

3 REPLIES 3

Mark Manders
Mega Patron

What is your business case? You have several records with the same name, but they are different records. How do you figure out what the correct record is? 

If I open the phone book (yes, I am that old) and look for 'John Smith' I get a lot of hits. You are saying 'just give me one number'. How big is the chance that you will get the correct one? 
If you are using a reference field, it is because you want to records to be linked to each other. You want the correct one, right? Wouldn't it be better to update the name, or use a different field to search on so the correct record is found? 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Hi Mark,

These all records with same name are associated with different CIs. And there is another field on form which is also fetching data from the same table but will reflect CIs name. So All Cis should be visible on the field.

 

MukeshSingh_0-1734000834931.png

 

Please refer attach screenshot. Here records showing with same name but associated with different CIs. No matter what record selected on that field all CIs will be visible on next field.

MukeshSingh_1-1734001069464.png

 




That doesn't answer the question how you think the system should know which record to show. That you have another field with another qualifier doesn't answer that. It may not matter to you which record is chosen, but technically you are searching for a name that is in the system more than once, so it returns all of those.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark