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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Hide Quick view control label in power pages

(0) ShareShare
ReportReport
Posted on by 89
Hello,
 
I have a lookup field to be displayed in the power pages form, the quick view control is added to show the details for that lookup field. But I want to hide the quick view control's label when no selection in lookup field. I tried to use Javascript to hide that label. but the whole quick view control does not show up when there is a selection in lookup field. below is the label needs to hide when there is no value in lookup field. we need to show the quick view when there is value in lookup field.
I have the same question (0)
  • Suggested answer
    Muhammad Shahzad Shafique Profile Picture
    2,507 Most Valuable Professional on at
    function toggleQuickViewLabel(executionContext) {
        var formContext = executionContext.getFormContext();
    
        var lookupValue = formContext.getAttribute("YOUR_LOOKUP_FIELD_LOGICAL_NAME").getValue();
    
        var quickViewControl = formContext.ui.quickForms.get("YOUR_QUICK_VIEW_CONTROL_NAME");
    
        if (lookupValue != null) {
            // Show Quick View
            quickViewControl.setVisible(true);
    
            // Wait until it is loaded to hide the label
            quickViewControl.addOnLoad(function () {
                var labelElement = document.querySelector("label[for='QuickviewControlYOURCONTROLID']");
                if (labelElement) {
                    labelElement.style.display = "none";
                }
            });
        } else {
            // Hide Quick View
            quickViewControl.setVisible(false);
        }
    }
    
    Add the script to your form libraries.
    Call toggleQuickViewLabel in:
    • Form OnLoad
    • Lookup field’s OnChange
  • Suggested answer
    Varun Singh Profile Picture
    943 on at
    I encountered the same issue with the Power Page portal form. It seems the new D365 Solution editor couldn't hide the label, but the old Classic Solution editor worked perfectly. Just toggle the 'Display Label' property for the quick view in the Classic editor and publish. That solved the problem for me.
     
     
    qvlabel.PNG

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 Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 135

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 86 Super User 2026 Season 1

#3
Martin Dráb Profile Picture

Martin Dráb 58 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans