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 / Check/get selected opt...
Power Pages
Suggested Answer

Check/get selected options from a 'Choices' field using custom Javascript on power pages

(0) ShareShare
ReportReport
Posted on by
I have a choices / multi-select field on power page, where an user can select 1 or more values. the values are Title, first name, last name, age. Based on these list of values, I would want to show the respective field using the custom javascript on power pages.
 
Please let me know how do I check / get the list of selected values from a choices / multi-select control.
 
Thanks in advance.
Categories:
I have the same question (0)
  • Suggested answer
    Fubar Profile Picture
    8,487 Super User 2026 Season 1 on at
    This post by Oliver Rodriguez contains a number of pieces of JavaScript for working with multiselect choices
  • Suggested answer
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 1 on at

    Pls try the following it will fix.

    • Access the Multi-Select Control: First, make sure the multi-select field has a unique ID or class that you can target with JavaScript.

    • Get the Selected Values: Use JavaScript to retrieve the selected values from the multi-select field. In Power Pages, the multi-select field stores values as an array, so you can loop th rough the selected options.

    • Check Which Fields are Selected:You can use the .map() or .forEach() method in JavaScript to get the selected values and then determine which fields to show based on the user’s selection.

    • Show/Hide Fields Based on Selection: Use JavaScript to show or hide the corresponding fields based on the values selected by the user.

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 Pages

#1
DP_Prabh Profile Picture

DP_Prabh 51

#2
rezarizvii Profile Picture

rezarizvii 35

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 33 Most Valuable Professional

Last 30 days Overall leaderboard