Hi All,
I have "Condition" table in CDS its lookup field "Condition Lookup" in "Detail" table. And on portal I am using Condition field as multiselect as shown in image. The condition Lookup column is of type lookup. So when I multiselect and inserts data how the data will get saved?
Please help
@OOlashyn
Hi @Anonymous,
As @OOlashyn mentioned, it wouldn't be possible to have a multi-select lookup. By nature, a lookup is a one-to-many. One record (Pregnant, Post-partum) would be associated to many records (whichever record you want the multi-select on). I think what was originally thought to be the consideration is multi-table lookups (Multi-table lookups - Power Platform Release Plan | Microsoft Docs) which is coming later and may not immediately be available for use on the Portal.
What you need is a change to your relationship; you should have a Many-to-many relationship between the tables instead. This way, you will see a subgrid which can have any combination of pregnant, post-partum, etc., if that indeed does need to be a table (and not an option set, as recommended in the Dataverse forum).
I hope this helps!
Justin
@Anonymous unfortunately you cannot have a lookup column that will have multiple values.
Hi @OOlashyn ,
Thank you for your response.
Is it possible in CDS to show data like below? Can condition Lookup records column be of Lookup datatype and have multiple values?
Detail Record | Owner | Condition Lookup Records |
Test A | Justin | Test 1, Test 3 |
Test B | Chris | Test 4 |
Test C | John | Test 2, Test 3, Test 4, Test 5 |
Test D | David | Test 3, Test 5 |
@Anonymous as of now in Dataverse only special system fields are multi select lookups ( they are PartyList lookups - see more in official doc). Unfortunately, you cannot create your custom fields that will act like that. You can try to implement something similar with a Web API, by creating records and relating them to main record (you would be able to see them via subgrid in dataverse) and styling that as a multi select. Or if set of records you want to select from is small and constant you can try to use Choices field type (however, it is not support on the Portal as of now, but there are workaround - like this one).
Hi @OOlashyn ,
I tried this-
but is not working. I want multi select lookup values. How can I do that?
Is custom multiselect lookup possible? And how it will be saved in the DB?
Hi @Anonymous,
Are you rendering your lookup using Multiple Choice control style via Basic Form Metadata or via some custom implementation? I never tried to render a lookup as a multi select, but I assume that the form will through an error. Did you try to submit the data to see the results?
Lucas001
60
Super User 2025 Season 1
Fubar
55
Super User 2025 Season 1
surya narayanan
35