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 / Powerapps Portals mult...
Power Pages
Unanswered

Powerapps Portals multiselect optionset

(0) ShareShare
ReportReport
Posted on by 94

Hi,  i follow this blog for multiselect option fields: https://www.engineeredcode.com/blog/powerapps-portals-multiselect-option-set?unapproved=1175&moderation-hash=e7bf92fb4c1317fa57d393c2aaeb76e6#comment-1175

 

but somehow I don't get it right and get it right.

 

What do he mean with HTML Field? is it just a label of what we actually do or how?
When i add the JavaScript Code here (https://powerusers.microsoft.com/t5/Power-Apps-Portals/PowerApps-Portals-custom-HTML-or-javascript-field/m-p/549187/highlight/false#M1389), why it is not workling?
or did I forget something?

 and what is it with the plugin?


Can anyone help me please?

Categories:
  • OOlashyn Profile Picture
    3,498 Most Valuable Professional on at

    Hi @PowerPat ,

     

    By the HTML field he means the field that was created by code and will be used only as UI element and doesn't directly bind to CDS field.

     

    To make this example work make sure that you followed the article and create a multi-select field (it will not be placed on the form), text field (that will be placed on the form and be hidden by the JavaScript code) and Plugin that will actually populate our multi-select field based on the value of the text field.

     

    Plugins are server side code written in C# that perform some complex business logic. You can find out more about plugins in this official docs and tutorials.

     

    If you have issues with UI part on the portal make sure that you added text field to the form, added JavaScript in the custom JavaScript field in Advance tab on the Entity Form, in the JavaScript you put correct name of your custom field, and after that Sync Configuration (open Portal app and press Sync Configuration on the top right).

     

     

  • PowerPat Profile Picture
    94 on at
    what meanes this code? var favouriteColour = $('#ec_favouritecolourportal'); favouriteColour.hide();
  • OOlashyn Profile Picture
    3,498 Most Valuable Professional on at

    This code uses jquery library to get field by id and hide. You can find more about jquery here.

     

    // get field with id ec_favouritecolourportal and store it in variable
    var favouriteColour = $('#ec_favouritecolourportal');
    //hide the field
    favouriteColour.hide();

     ec_favouritecolourportal - is a logical name of the text field that was created to store selected values. You will need to replace it with the name of your text field.

  • PowerPat Profile Picture
    94 on at

    ok my field names: ' multiple '

    also:

    var favouriteColour = $('#multiple');
    favouriteColour.hide();

    or without # ?

  • OOlashyn Profile Picture
    3,498 Most Valuable Professional on at

    Your field name consists both with publisher prefix and the name itself. To find out correct name open make.powerapps.com navigate to Solutions, open solution in which you created your modifications, open entity on which you are working and open Fields tab. There you will be able to see the Name column - that's the name of your field. If you added field not in a solution, go to Data>Entities, find your entity and open Fields tab.

     

    # means reference by id. In your case you need to add # because field name is a field id as well. Check out the link I shared on the previous reply for jquery tutorial - you will be able to find a lot of examples on how to get fields, set their values etc.

  • PowerPat Profile Picture
    94 on at
    what means the # ?
  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    "#" is the ID Selector in jQuery: https://api.jquery.com/id-selector/

    whenever referencing an element by id you use the hash symbol: $("#YourElementId")

     


    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Thank you @OliverRodrigues  and @OOlashyn . Great explanation. Very clear with UI part but on the C# part I am getting error on "GetAttributeValue". Please find the screenshot below. Kindly advise on this. Thanks 

     

    ragavanrajan_0-1598240707333.png

     

  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    hi @ragavanrajan can you add a snapshot of your code itself?

    if you double click that error line, Visual Studio will probably point you to the code with error

  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    @OliverRodrigues  Please find the snapshot of the code as requested.  Awaiting for your response

     

    ragavanrajan_0-1598260505551.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

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
M Bilal Khan Profile Picture

M Bilal Khan 117

#2
Mohsin Ali Profile Picture

Mohsin Ali 37

#3
11manish Profile Picture

11manish 21 Super User 2026 Season 2

Last 30 days Overall leaderboard