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

Notifications

Announcements

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,354 Super User 2025 Season 2 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 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 74 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 55

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard