cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DawidK
Helper I
Helper I

Muliple line text SP / multiple choice combobox. Edit screen

Hello,

I have an issue with multiple choice combobox, multiple line text column in SP.

I am inputing the info like this ; Patch - Mistakes: Concat(Mistakes.SelectedItems.Value, Value&", ") everything work OKej. The choices are in a table in the app ["a","b","c"] as items

But i would like to edit those choices made . The SP column is a Multiple Line text. 

I would like to have on my Edit Screen to show me ,when i enter the ID of the row, the selection made and the possibilty to change them. 

Example: 

ID                       Mistakes

1                       a

2                       b, c

3                       a, c, b

 

When i choose on the edit screen 2 i want on the combobox to have choosen the "b", "c" options and i want to be able to edit them to substract "b" or add "a" then save it.

 

1 ACCEPTED SOLUTION

Accepted Solutions

@DawidK 

Then it is mismatching.  The Default Selected Items MUST match EXACTLY to the records in the Items.

Let's review:

You stated that your Items property of the Combobox is hard coded table of values (I'm assuming from your pictures)

    ["Missing Basic Information", "Wrong Service", "Wrong Escalation Group"...etc..]

 

You stated that you are Patching the Mistakes column with this formula (please double check your formula - there was a mistake in your first posted formula, this one is correct):

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

 

Now, you have resolved getting the actual string value from the Mistakes column in your datasource.

 

This formula should do exactly what you need based on the above exact conditions:

   RenameColumns(Filter(Split(Lookup(yourDataSource, ID=identifier, Mistakes), ","), !IsBlank(Result)), "Result", "Value")

 

Please double check everything.  Make SURE that the Allow Searching is on for the ComboBox and make sure there are no extra spaces in the original Concat you were doing.  This is all based off of  "," not ", "

 

 

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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

18 REPLIES 18
RandyHayes
Super User
Super User

@DawidK 

Then in your EditForm, set the DefaultSelectedItems property of the Mistakes ComboBox to:

RenameColumns(Filter(Split(yourSharePointColumn, ","), !IsBlank(Result), "Result", "Value")

 

That should do what you are looking for.

I hope it 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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

Thanks for the response. That doesn't work. I Made it like this : RenameColumns(Filter(Split(SecondLineTracker_1.Mistakes, ","), !IsBlank(Result), "Result", "Value")) And have errors Invalid argument type (table). Split has some invalid arguments and Invalid numbers of arguments receive 1 expected 3 or more.

Can u explain me why did u tell me that function ? 

Thanks !

@DawidK 

Yes, you are not using the string value in the formula I provided.

You stated the value was in stored in a string as "a,b,c," 

What is the name of your multiline text column in SP?  That is what you need to get the value from.

SecondLineTracker_1.Mistakes is not a valid string.  It is a table or a control or something else - you would most certainly get an error from that.

 

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

My Column Name is "Mistakes".
True the value's are in a string but because i concat them from a multichoice combobox.
I tried know RenameColumns(Filter(Split(Mistakes, ","), !IsBlank(Result), "Result", "Value") and have also error about the invalid arguments

@DawidK 

You have GOT to use the string value from the field for that parameter.  You can't use a table or anything except that.

If you are in an EditForm, then you can use the ThisItem.Mistakes in that formula.

i.e.  RenameColumns(Filter(Split(ThisItem.Mistakes, ","), !IsBlank(Result), "Result", "Value") 

 

By the way, this might seem convoluted with the Filter, but that is important to get the selections to work properly in the cobobox since your original storing of the string will have a trailing , (comma) and the filter in this formula will get rid of the empty element.

 

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

All right. I see the problem, the big issue is that it works on a FORM. But i am working without forms. That are inputs. I tried it the formula on Forms and that works fine but i am not using forms i rather patch/update my inputs. That's the issue i think. I am trying to do it for 2 days xD

@DawidK 

No problem, then you just need to lookup that value if you don't already have it in something else.

 

RenameColumns(Filter(Split(Lookup(yourDataSource, ID=whateverIDgetsYouWhatYouNeed, Mistakes), ","), !IsBlank(Result), "Result", "Value") 

 

Just fill in the items above that should be replaced with items in your app and  you should be fine.

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

@DawidK 

Oh - also make sure you have Searching turned on for your combobox, otherwise you'll get odd results.

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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 last error ;D going great ;D thx for the help i have 3 hours to finish that last bit 😉 I have missing arguments old_column and new_column in the rename function. When i want to close without it that doesnt work. i Must choose the Combobox name for the new_column ? i will need to look at renamecolumn function after i finish that 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (3,723)