cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chauhanhardik
Frequent Visitor

Add existing records in subgrid in portal

Hi Community,

 

I'm working on a task where I need to associate a record in subgrid, and this can be achieved by adding entity form metadata. But once user clicks on Associate button, once pop-up will be comes up on screen and it should only display records which are not associated with the record on entity form.

 

Example:

In portal, You are on an account record and there's a Contacts subgrid. And in subgrid I can see below listed contacts.

1) Contact1

2) Contact2

Now I want to associate Contact3 with this account. So, I'll click on Associate button and pop up will be there to select contact, but in this pop-up I can see all contacts, I don't want to show associated contacts(Contact1 and Contact2). Except these 2 contacts should be displayed in pop-up.

 

Suggest any solution to achieve this.

 

Thanks,

Hardik Chauhan

3 REPLIES 3
OOlashyn
Super User
Super User

Hi @chauhanhardik,

There is a possibility to specify a view that is used by an associate button (as per official docs), but I don't think there is a way to define a view that will have records not associated with the current one (at least I cannot think of one right now).

----------------------------------------------------
If you find this post helpful consider marking it as a solution to help others find it.

chauhanhardik_0-1609948465805.png

Hi@OOlashyn 

yeah, we can specify view. If you check in advanced settings in Entity form metadata there's a one field "Filter criteria", maybe that can help me, but I don't know what to write in it to show only not associated records. Refer screenshot for field.

Filter criteria accept fetchxml expression (see here). But unfortunately, we cannot dynamically set properties to this filter and I cannot come up with a good idea how to exclude contacts associated with the current account.

----------------------------------------------------
If you find this post helpful consider marking it as a solution to help others find it.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,119)