cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Verceti87
Helper I
Helper I

Filterting EntityLists by 2 contact fields

Hi Experts I am trying to filter an entity list by 2 different fields on a case. Here is my setup:

 

Verceti87_0-1663607056843.png

 

Verceti87_1-1663607116413.png

 

How can i filter based on both primarycontactid and authorized agent so that when both of these users log in, they will see the same case record?

 

Thanks

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Fubar
Solution Sage
Solution Sage

Several ways you could do it

  • Have the List without any filtering of the Contact records, and control it via Table Permissions i.e. (Table Permission to the Primary Contact lookup and a Table Permission to the Agent Lookup, assign both to one or more Web Roles that you assign to your Contact.
  • On the Views that you are going to use for that List, add both fields to the condition as an OR and select any Contact record for each Lookup so you can save the view definition (this is a now undocumented feature from back in the Adx days, Contact lookup  in a View will resolve to the currently logged in Portal User's contact record irrespective of what record is populated in the query in Dataverse).
  • Create 2 Lists and use different Filter Conditions (as per your screen shot).  For this to work well you need some other way of telling a Contact would be the Agent etc so you can put an IF statement in a Web Template and switch to the respective List (or have 2 menu options one for Agent List and the other for  Contact List)
  • Custom Web Template with FetchXML and build your own list from the results.

(and of course will need relevant Table Permissions to each of the Lookup fields)

View solution in original post

2 REPLIES 2
Fubar
Solution Sage
Solution Sage

Several ways you could do it

  • Have the List without any filtering of the Contact records, and control it via Table Permissions i.e. (Table Permission to the Primary Contact lookup and a Table Permission to the Agent Lookup, assign both to one or more Web Roles that you assign to your Contact.
  • On the Views that you are going to use for that List, add both fields to the condition as an OR and select any Contact record for each Lookup so you can save the view definition (this is a now undocumented feature from back in the Adx days, Contact lookup  in a View will resolve to the currently logged in Portal User's contact record irrespective of what record is populated in the query in Dataverse).
  • Create 2 Lists and use different Filter Conditions (as per your screen shot).  For this to work well you need some other way of telling a Contact would be the Agent etc so you can put an IF statement in a Web Template and switch to the respective List (or have 2 menu options one for Agent List and the other for  Contact List)
  • Custom Web Template with FetchXML and build your own list from the results.

(and of course will need relevant Table Permissions to each of the Lookup fields)

Verceti87
Helper I
Helper I

Wow thank you so much. Your first method worked like a charm!

Helpful resources

Announcements
Carousel Community Blog

Check out the Community Blog

Read all about the most recent blogs in the community!

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Carousel News & Announcements

What's New in the Community?

Check out the latest News & Events in the community!

Users online (4,166)