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 Apps / Dataverse Multi-Select...
Power Apps
Answered

Dataverse Multi-Select Choice Field to Power Apps Table

(0) ShareShare
ReportReport
Posted on by 26

This shouldn't be so hard! 🤤  I don't have any more hair to pull out.

 

Here's the situation:

I've got a Dataverse table of questions.  That table has a column for the question number.  Let's call them "q-1, q-2", etc.

I've got a second Dataverse table that defines question "sets".  This table has a multi-select choice column that holds the question numbers I want in that set.  For example, I could have a "set" of questions called "qSet-1" (a text column) and the multi-select column value of "q-1, q-3, q-7, q-10").  Those values represent question numbers in the first table.  However, there is no Dataverse relationship established.  (The question numbers in each question set are set initially by linking the multi-select column to a lookup global choice with all possible values of the question number.  If that's important, let's call that global choice, "allPossibleQuestionNumbers").

 

SetNumberQuestions (multi-select linked to "allPossibleQuestionNumbers")
qSet-1q-1,q-3,q-7,q-10
qSet-2q-1,q-2,q-5,q-10
qSet-3q-2,q-6,q-9,q-11

 

QuestionNumberQuestionCodeValue
q-1What is your name?myCode1
q-2What is your age?myCode2
q-3What is your quest?myCode3
q-4Where do you live?myCode4
<and so on><and so on><and so on>

 

Now, inside Power Apps, I need to select one of the question sets by setting a variable.  For example, let's say I've set my variable, "vSelectedSet" to "qSet-1".  So far so good.

 

However, now I need to somehow programmatically create a table in Power Apps of the selected questions (and other data from the questions table) that are part of that set.  So, in this example, I need a table like this to be created when the variable is set to qSet-1 (which I plan to do using a "deep link" URL for the app, but I don't think that's important):

QuestionNumberQuestionCodeValue
q-1What is your name?myCode1
q-3What is your quest?myCode3
q-7What is your favorite color?myCode7
q-10What is your favorite movie?myCode10

 

Obviously, if my app with started with a different value for the variable (selecting a different question set), the table above needs the data from those different questions instead.

 

It seems like the biggest difficulty is in first creating a table, based on the selected set that has the set members in a Power Apps table (or collection).  Once that is done, then I need to populate the rest of the table (or collection) with values from the question table.

 

Using the following, I'm able to get the set members into a text string, but I don't think that is getting me anywhere.  I can't find a way to convert that string (vQuestionSetString) into a Power Apps table (or collection):

 

Set (vSelectedSet, "qSet-1")

Set(vQuestionNumbers, LookUp(QuestionSets, SetNumber = vSelectedSet, Questions));
Set(vQuestionSetString, Concat(vQuestionNumbers, Value & ","));

 

I've tried coming at this from several different ways, but I just can't seem to make it work.

I have the same question (0)
  • Mira Ghaly Profile Picture
    11,413 Moderator on at

    @korebreach 

    I want to clarify something on this first table for the questions set, the multi-select a relation, or what is the field type, If it is a choice column (MultiSelect) then every time you add a new question .. do you go back and update the choice column?

    Mira_Ghaly_0-1711405792155.png

     

  • korebreach Profile Picture
    26 on at

    @Mira_Ghaly Yes.  It's a choice column tied to a global choice.  The global choice is populated with about double the number of choices than I will probably need.  Of course, I can always add more if the number of questions grows.

  • Verified answer
    Mira Ghaly Profile Picture
    11,413 Moderator on at

    @korebreach 

    I think from design perspective the set number table should have a N:N relationship with the questions table in that way you will not have to maintain the global optionset when you add a new question or as your questions grow and expand , so you do not need a system customizer to modify the optionset , this is just a thought and with this change it will be easier as well to build what you are trying to achieve .

     

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard