cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ComputerHabit2
Resolver III
Resolver III

Adding MultiChoice field results in Data Table issue

I had a text field that I wanted to populate with data from a multichoice field but was having issues.  I removed the text field and replace it with a like name field that is multichoice.  In the data table I removed the existing field and added it back.  It still gives m an error saying it's expecting a text value.

 

In Text I have "thisitem.columnname.value" but I still get an error.

 

So it's two questions:

How would I populate a text field with data from a multichoice field?  I thought it'd do commas but the text field wouldn't take more than the first value. Maybe I have to concat and convert to text to save it.

For the multichoice field I'm trying to replace it with.  It is an empty multichoice field.  I wanted to populate the field with data from a different data source.  I just don't seem to be able to get it to save.  I'm not sure what is wanted or needed.

In the data table I'm getting the incompatible error about should be a text field.  I don't know what it wants from my multichoice field to save the data.


1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@ComputerHabit2 

I'm confused as to why you are not just using what I provided you...it is what you need.

As per this message:

 

Your Update property should be:

Concat(ComboboxName.SelectedItems, Value & ",")

Your DefaultSelectedItems property of the combobox should be:

RenameColumns(Filter(Split(Parent.Default, ";"), !IsBlank(Result)), "Result", "Value")

 

It does it all for you.  The only part I have not asked is what is your Items property for the combobox?  It should be Value column based from the formula.  If not, then you can change the Value in the above formulas to the proper column name.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

13 REPLIES 13
RandyHayes
Super User
Super User

@ComputerHabit2 

If it is multiple choices allowed, then the column would be a table, not a record.

So, to display the values, you would need:  Concat(ThisItem.columnName, Value & ",") This would give you a comma separated list.

I'm not sure what you are needing for pulling from another data source.  If you could explain what is going on there and how you are doing that currently (or trying), I could provide more information.

You're not going to be able to show the results of the multiple selections in a datatable.  Is there a particular need for a datatable - they're very inflexible?

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

I have a list of Item ID's from another SharePoint list.  I'd like to be able to choose from this list of values and store the ID's in a different list.  The ID's themselves are text values from the Title field of another list.  

I wanted to be able to search for the ID's I wanted to select and add multiple items.  

RandyHayes
Super User
Super User

@ComputerHabit2 

Okay.  However, can you clarify your original post?  You first mentioned that you had changed a text column to a multiple choice column.  Then you mentioned that the datatable was giving you an error.  And then you provided a formula for a Text property - which has nothing to do with a datatable.  

So, can you clarify that?

 

As for what you are trying to do, you really don't want a multiple choice column in your "near" list.  Having a text column is sufficient and recommended.  IN that text column, you can provide a separated list of ID's for the "far" list and that will be fine.

If you stick with a multiple choice column then it will be a tremendous amount more of work that needs to be done.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Yeah sorry about that.  
After creating as a Choice field I get this error.  

ComputerHabit2_0-1638987905647.png


I think you're right about the text box so I'm switching back to it.  Kind of makes this error go away.  I'll post after completed.

 

RandyHayes
Super User
Super User

@ComputerHabit2 
Yes, that should help to switch to the text column.

Post back on the next issue...

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

I'm replacing my textbox with the combo box that has the values I want displayed.  I'm trying to get it to display values and save values properly right now.  

For save I have can get a single value to work but not multiple.

selected.number works and saves 1 value
selecteditems.number.value does not work

 

ComputerHabit2_0-1638995726036.png

 

RandyHayes
Super User
Super User

@ComputerHabit2 

It appears this is in a form...so, 

Your Update property should be:

Concat(ComboboxName.SelectedItems, Value & ",")

Your DefaultSelectedItems property of the combobox should be:

RenameColumns(Filter(Split(Parent.Default, ","), !IsBlank(Result)), "Result", "Value")

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

getting somewhere
Update =  on the data card

 

Concat(cmbRelated.SelectedItems, 'Number', ";")

 

RandyHayes
Super User
Super User

@ComputerHabit2 

It's not correct - in syntax nor for what you need.  The two formulas I provided are what you need.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,331)