cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cmanning
Super User
Super User

Selected Gallery - Extract Selected Items From Multi-Select Choice Column for Dataverse Data Source

I have a working canvas app that previously used SP List as data source and now I am using Dataverse.  I have multiple errors to address since removing the SP list data sources and adding my new DV replacement tables.  In particular, I am struggling with converting a gallery's selected item data that is multi-select choice column type to its Dataverse equivalent.

Below is a screenshot of a screen from my app.  There is a gallery on the left column, HTML text in the middle column, and an HTML text in the right column.  I can't find an example of retrieving data from a selected gallery item (data is saved in column as "item1; item2; item3") and rendering it as HTML text in the Resource Types Requested from the screenshot below.
Deal Intake App Assignb Screen 2.png

The Dataverse table, "DealIntakeApp" is shown below.
Deal Intake App DV Table main.png

Here is the column name "ResourceTypesNeeded" that is populated when a user selects one or more items from a combo box on another screen. 
Deal Intake App DV Table ResourceTypesNeeded Col.png
Here are the code examples I have tried as well the original code that worked for SP list data src.

// Works when using a SP list data src 
Concat( galleryLHAssignResources.Selected.'Resource-Types-Needed'.Value, Value, ", ") 

// Dataverse Approach 1 - Errors: "Concat has some invalid arguments" 
Concat( galleryLHAssignResources.Selected.cr4de_resourcetypesneeded.Value, Value, ", " ) 

// Dataverse Approach 2 - No errors but incomplete 
// How do I finish this to show selected values? 
Concat( galleryLHAssignResources.Selected.ResourceTypesNeeded.Value, ??

Anyone have any recommendations? 

1 ACCEPTED SOLUTION

Accepted Solutions

@cmanning 

You need to replace choices with ResourceTypesNeeded, it is just how it is named in my sample , sorry forget to mention you need to replace it.

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

4 REPLIES 4
Mira_Ghaly
Dual Super User
Dual Super User

@cmanning 

Option No. 1 : Is to use a Gallery Instead of the HTML Text

Mira_Ghaly_0-1648896207376.png

Option 2: Using the HTML Input will be using the Concat Function

Mira_Ghaly_1-1648896443717.png

Hope this helps!

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

@Mira_Ghaly - Thank you for your response!  I need to use the HTML text option since it will be better for performance.  Here is the code I tried based on your recommendation and there are errors in both the Concat & Text has some invalid arguments.  There is no reference to the specific multi-select choice column "ResourceTypesNeeded" (cr4de_resourcetypesneeded).  Any recommendations?  Thank you.  

// Concat & Text has some invalid arguments
Concat(galleryLHAssignResources.Selected.Choices, Text(ThisRecord.Value), "-")

 

@cmanning 

You need to replace choices with ResourceTypesNeeded, it is just how it is named in my sample , sorry forget to mention you need to replace it.

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

@Mira_Ghaly - Thanks for the update.  I made this change  and it works! Thanks again!

Concat( galleryLHAssignResources.Selected.ResourceTypesNeeded, Text(ThisRecord.Value), ", ")

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (3,055)