web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power apps Model drive...
Power Apps
Suggested Answer

Power apps Model driven subgrid modified

(2) ShareShare
ReportReport
Posted on by 8
Hello,
I am working on a way to list the hardware for each desk.
For this, I have created two tables:
→ Hardware
→ Desk

Hardware has a lookup to Desk (many-to-one relationship).
 
On the Desk table, I have created a modified subgrid (Picture 1).
In this subgrid, I have a button → Add Hardware (Picture 2).
This button gives me a list of all my hardware, and I can choose what to add (Picture 3).
 
I would like to know if there is a way to hide hardware that is already assigned to a desk.
Is this possible using parameters, JavaScript, or something else?
 
Thank you for your answer.
Bastian
Picture 1.png
Picture 2.png
Picture 3.png
Categories:
I have the same question (0)
  • Suggested answer
    Pablo Roldan Profile Picture
    316 on at
    Hey there indeed that'll be great to have a custom filter you'll have to work with the back and bone of the entity download that solution export the XML and manually edit it to set a custom JavaScript... You can break something in the process...
     
    another approach and is what I suggest its following 
     
    1. Create a JavaScript Web Resource e.g. 
    2. Create a custom Command and Hide the existing Subgrid + Add Existing Button e.g  + Add Custom Hardware
    3. Create a Custom Page (Like a Canvas app but Lighter) 
    4. always publish your work
    NOTE 1: Edit your App Site map and include your created Custom Page if not, it won't work
    NOTE 2:  in Step #3 you need to include the JavaScript created in Step #1 as the command
    NOTE 3:  Canvas app needs the logic to filter only that hardware is Null/blank in Desk lookup, do the link between entities, and make it pretty 
     
    Indeed, lots of steps but it makes the trick would be nice if it'd be OOB feature
     
    I only include JS Code 
    function openCustomPageBlade(primaryControl) {
        var pageInput = {
            pageType: "custom",
            name: "your_custom_page_name", // Replace with your Custom Page name (logical name)
        };
    
        var navigationOptions = {
            target: 2, // Opens in a dialog
            position: 2, // Right side (blade)
            width: {
                value: 400,
                unit: "px"
            },
            title: "Custom Page Blade"
        };
    
        Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(
            function success(result) {
                console.log("Custom page opened successfully.");
            },
            function error(error) {
                console.error("Error opening custom page: ", error.message);
            }
        );
    }
    
    result
     
    regards,
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard