Menu
SuiteCRM Pull Request Party hosted by SalesAgility
Welcome, Guest
Username: Password: Remember me

TOPIC: Filtering in List View based on related field's "ID" and not "Name"

Filtering in List View based on related field's "ID" and not "Name" 1 month 1 week ago #80134

  • rdpaul
  • rdpaul's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
While filtering Opportunities in the List View, based on Account, the Advanced Search popup lets you choose an Account "Name" and on applying the filter, you see all Opportunities where the name of the Account matches the chosen "Name".

If more than one Account has the same name, then you will see all Opportunities linked to these multiple Accounts, whereas I would like to see the Opportunities linked to just the one chosen Account, based on that particular Account's ID.

I notice that if you set a filter on the Assigned User, the ID of the Assigned User (and not the Assigned User's Name) is always used while filtering records, which is exactly what should happen in case of other related fields also.

Any help on this will be greatly appreciated!
The administrator has disabled public write access.

Filtering in List View based on related field's "ID" and not "Name" 1 month 1 week ago #80165

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 9833
  • Thank you received: 1468
  • Karma: 349
Is there a good reason to use different Accounts with duplicate names? I think this could get confusing in many places...

However, you are probably right that this is an inconsistency in the app. Are you capable of doing some PHP code changes, with a little help?

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

Filtering in List View based on related field's "ID" and not "Name" 1 month 1 week ago #80182

  • rdpaul
  • rdpaul's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
Thanks for your reply.

I was giving an example of Account records with duplicate names to illustrate my point.

In reality, I have an Enrollments module to record admissions in a college, and each Enrollment is linked to a Class, which in turn is linked to a Course. The Classes for a particular Course, tend to have duplicate names and I am not able to filter the Enrollments List View to show Enrollments for a particular Class. The List View shows all Enrollments where the Class "Name" matches the chosen Class (instead of using the Class ID to do the filtering).

Yes, I would be able to make PHP code changes, if you point me in the right direction.

Thanks for your help in advance!
The administrator has disabled public write access.

Filtering in List View based on related field's "ID" and not "Name" 1 month 1 week ago #80227

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 9833
  • Thank you received: 1468
  • Karma: 349
I see.

I don't know the exact instructions to give you. I just know that you need to dive into the listviewdefs which define the List view, and the metadata/SearchFields.php files that define the Quick filters. Maybe look for a core module that has a case similar to yours, and see how it is done in those files.

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

Filtering in List View based on related field's "ID" and not "Name" 1 month 1 week ago #80302

  • rdpaul
  • rdpaul's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
Thanks for your response. Will give it a shot and see how it goes.

Of course would welcome anyone who has implemented a solution for this and can contribute some specific code changes!
Last Edit: 1 month 1 week ago by rdpaul.
The administrator has disabled public write access.
Time to create page: 0.028 seconds
Powered by Kunena Forum