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 Pages / Can I hide list of dat...
Power Pages
Unanswered

Can I hide list of data in lookup field in Web Portal entity form?

(0) ShareShare
ReportReport
Posted on by 6

Hi, Can I disable the list of records when I use a lookup field in entity form? I need to use the lookup field only for searching if the record exists or not in entity. Thanks a lot for advise.

Categories:
  • justinburch Profile Picture
    Microsoft Employee on at

    Hi @MichalB_106,

    If I understand correctly, you want users to search for the record but not actually make a selection? Is the lookup data associated to the entity?

    If not, you could consider a few different options:

    1. Add an Entity List to your Web Template & Page, but not in a "If, Else", instead showing both
    2. Change the Lookup to a Sub-grid, but de-select "Only Show Records Associated to this Record", which will then give you a read-only sub-grid of all records the user has permissions to (won't enable search, unlike entity lists)
    3. Create a custom lookup field using the FetchXML-as-an-API method popular in Portals. You can even use the existing field as a placeholder to target where to put it, and then hide the existing field
    4. Use client-side or server-side code to set the lookup to null on submit
  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    Best approach would probably not having a lookup at all if you don't want to select a value. You can create a custom web template / snippet just to retrieving and render your data and finally you just add that in your page via JS or HTML.

    If you really wish to manipulate the Lookup modal, I have recently posted an article on removing records based on condition: http://oliverrodrigues365.com/2021/01/24/power-apps-portals-custom-lookup-filter/

    Perhaps you can use similar approach and hide select / buttons from the modal.

  • MichalB_106 Profile Picture
    6 on at

    Hi @OliverRodrigues and @justinburch, Thanks for your advices. Today later or tomorrow I'll try them.

  • MichalB_106 Profile Picture
    6 on at

    Hi @justinburch , have any link to detailed instructions?

  • justinburch Profile Picture
    Microsoft Employee on at

    Hi @MichalB_106 ,

    You'll have to put together the pieces here:

    1. Add an Entity List to your Web Template & Page, but not in a "If, Else", instead showing both
      1. Create a new Web Template, copying whatever template you're using now, and change it to be like so - but keep in mind this is off memory, so double check what changes to make against 'Layout 1 Column'

        // Typical template
        {% if page.adx_entityform %}
        {% entityform id:page.adx_entityform.id %}
        {% elsif page.adx_webform %}
        {% webform id:page.adx_webform.id %}
        {% else %}
        {% entitylist id:page.adx_entitylist.id %}
        {% endif %}

        // Make it
        {% if page.adx_entitylist %}
        {% entitylist id:page.adx_entitylist.id %}
        {% endif %}
        {% if page.adx_entityform %}
        {% entityform id:page.adx_entityform.id %}
        {% elsif page.adx_webform %}
        {% webform id:page.adx_webform.id %}
        {% endif %}​​

    2. Change the Lookup to a Sub-grid, but de-select "Only Show Records Associated to this Record", which will then give you a read-only sub-grid of all records the user has permissions to (won't enable search, unlike entity lists)
      1. This one should be self explanatory.. just add a subgrid showing that Table, don't use "Show related records"
    3. Create a custom lookup field using the FetchXML-as-an-API method popular in Portals. You can even use the existing field as a placeholder to target where to put it, and then hide the existing field
      1. Same concept you can find details for elsewhere, original is probably here: Dynamics 365 portals: Use liquid to return JSON or XML – Colin Vermander (wordpress.com)
    4. Use client-side or server-side code to set the lookup to null on submit
      1. Client-side: Add following JS to entity form
        $(function() {
        entityFormClientValidate = function() {
        $("#id_of_your_lookup").val("");
        };
        });​​
      2. Server-side: Just create a PowerAutomate or Workflow to set that field to "null" each time it's set.. or ignore it

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Pages

#1
Mohsin Ali Profile Picture

Mohsin Ali 20

#2
11manish Profile Picture

11manish 18 Super User 2026 Season 2

#3
DianePana Profile Picture

DianePana 9

Last 30 days Overall leaderboard