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 / Multiselect lookup/dro...
Power Pages
Unanswered

Multiselect lookup/dropdown in Power pages / Calling Dataverse API (InsertOptionValue) in Power Pages

(0) ShareShare
ReportReport
Posted on by 8

Hi All,

 

 Requirement: 

In Power Pages, contact entity form, we have two lookup columns say Market & Store, we were able to filter store based on market selection, the client want store lookup should be multiselect, i.e. allowing users to select all store or multiple store based on filtered market.

 

our best bet would be to use (insertOptionValue) dataverse API to upate choice columns in Contact table, but it always through authentication exceptions, and we have Portal pages access external users.

 

Kindly assist if anyone have come across this kind of simple but complex requirement? let us know what would be the best solution.

 

This all options we tried – ( But none of them worked)

 

S.No

What we tried

Why didn’t worked

Ref URL

1

Tried using third party multiselect lookup control

This didn’t worked because it is compatible only with Modal driven app which have field service license and it will not work in Power Portals

 

https://byrondittberner.com/blog/2022/04/13/how-to-configure-a-multiselect-lookup-in-dynamics-365/

 

https://www.inogic.com/blog/2021/09/multiselect-lookup-control-pcf-now-available-in-dynamics-365-crm/

 

2

Tried to update Choice column with Portal Web API

There is NO portal web api which can update choice options on the fly, All Portal web API uses table name and only used for CRUD operations

 

Eg: https:// *****.powerappsportals.com/_api/contacts

 

https://learn.microsoft.com/en-us/power-pages/configure/web-api-overview

3

Tried to update Choice column with Dataverse Web API

We do have dataverse web api to update optionset for choice column, but this require OAuth Authentication every time, hence its not possible to call this dataverse API in Power Pages

 

Eg:

https://org*****.crm.dynamics.com/api/data/v9.2/GlobalOptionSetDefinitions(Name='splt_testl2choice')

 

https://org*****.api.crm.dynamics.com/api/data/v9.2/InsertOptionValue

 

https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/create-update-optionsets

 

4

Updating choice column through HTML Javascript

This is very cumbersome process, and lot of dependencies in updating existing choice control, we can add options but unable to select option and many other challenges

 

Categories:
I have the same question (0)
  • Lucas001 Profile Picture
    2,429 Super User 2025 Season 2 on at

    Hello @Mehul510,

     

    Have a look at that post: https://powerusers.microsoft.com/t5/Power-Apps-Portals/Select-Multiple-values-from-Lookup-on-Power-Apps-Portal/td-p/681267 which describes the multi select of  a look up field.

     

    You will additionally need a cascading relationship: https://www.youtube.com/watch?v=GbqnAH5m11o

    So Market will be a separate table, store as well. Store than needs a multi lookup from the first link and in the end the contact table will need a lookup to both.

     

    Hope that helps.

  • Mehul510 Profile Picture
    8 on at

    Thanks, Lucas, for respond,

     

     i did checked the article you shared above, but that i not what i am looking for,  i just want my lookup column to be multiselect and their is no way we can make lookup column as multiselect

     

    hence i tried to use choice column, and want to do multiselect, but then i want to update the choices based on market lookup selections, hence i was trying to use this web api

    https://learn.microsoft.com/en-us/power-pages/configure/web-api-overview

     

    but their is no way that you can call this Dataverse web Api from Portal, it always ask for authentication token access

  • Lucas001 Profile Picture
    2,429 Super User 2025 Season 2 on at

    Hi @Mehul510,

     

    now I understood what you want.

    The only way which I can think of on how to achieve your need excluding the graph api, would be to create the multi select lookup column yourself with javascript and fetchXML to retrieve the data from dataverse.

    You could than create the html elements yourself and in the end you will need to place custom button which than calls a webhook to power automate to populate dataverse again. Depending on how exactly it's set up there might be some adjustments needed in dataverse as well.

     

    But as you said, this is a lot of work and currently not easily possible.

     

    Hope that helps.

  • Mehul510 Profile Picture
    8 on at

    Perfect, this is what i have done after trying all the options, but I really want to know answer from Microsoft that, when Dataverse Api exist, and we are calling Dataverse Contact table within same environment, then why we are restricted with CORS policy?

     

    Through Power Pages Web API we can update any contact fields without any issue, then why not choice columns in same contact table

    I am referring this web Api: Create and update choices (option sets) using the Web API - Power Apps | Microsoft Learn

     

  • Fubar Profile Picture
    8,338 Super User 2025 Season 2 on at

    I am not 100% clear on what you are tying to do, am understanding correctly, you are trying to add another option into a multi-select option set (i.e. update the metadata of the Choices field) so the new option will become a selectable item to all users, rather than select items (e.g. via JavaScript) in the existing multi-select.

     

    If you are wanting to insert a new option this is a metadata update, and is not the same as creating/updating a data record (like the contact record).  Whilst technically you could work around this  (by using the portals support of OAuth 2 .0 Implicit Grant Flow) your next problem would be that the  item would not be available straight away due to the portals cache (and to make it worse your update would be metadata not record data).

     

    If you are trying to select items on the form for the user this may be possible - but I haven't tried to do it - I do know you can retrieve the selected items via JavaScript on the form. 

    The Portals Web API is meant to support the selection/deselection of existing options https://learn.microsoft.com/en-us/power-pages/configure/choices-column

     

  • Mehul510 Profile Picture
    8 on at

    Thanks Fubar for responding,

     

     I am looking for options to select multiple values in my lookup field in Dataverse field which i am using in Basic form.

    As by design Lookup field is just many to one, we cannot select more than 1 value in lookup field.

     

    Hence i thought of populating all my lookup filed values in Choice field dynamically and set this choice filed to multiselect but the provided WEB API by Microsoft is not working to dynamically update choice fields.

     

    hope you got my issue now.

  • Pragatij Profile Picture
    44 on at

    Hi @Mehul510 

    I hope you are doing well.

    I wanted your help.

    I am trying to integrate a multiselect lookup for contacts in the project entity, where for the project entity I want multiple contacts to be selected (1:N relationships).

    The above requirement is for the Basic Entity form and power pages.

    After much research, I was not able to find a proper solution.
    I was going through your thread, and it seems you have also faced similar issues.

    Can you please help me with this?
    I am waiting for your reply.

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
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard