web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Issue comparing multis...
Power Apps
Unanswered

Issue comparing multiselect ComboBox selected values with stored values in SharePoint text field

(0) ShareShare
ReportReport
Posted on by 244

I have a custom SharePoint list form where I set up a combobox using a lookup list of values. The combobox is multiple select enabled and it stores the result in a multiple lines of (plain) text field in the SharePoint list. I need to compare the values in the combobox with the value saved in the text field to know when the field has been updated. 

 

I have tried comparing Concat(TaskValue.SelectedItems, Title, ", ") with ThisItem.Task

Concat(TaskValue.SelectedItems, Title, ", ") = ThisItem.Task

and this never evaluates to true, so it always thinks there's been a change. 

 

How can I compare the value currently in the combobox and the value stored in the Task multiple line of plain text field accurately?

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,415 Most Valuable Professional on at

    Hi @CCJones ,

    Try

     ThisItem.Task in Concat(TaskValue.SelectedItems, Title, ", ")

    or simply

    ThisItem.Task in TaskValue.SelectedItems.Title

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • CCJones Profile Picture
    244 on at

    Hi @WarrenBelz ,

     

    Thanks for the response. This is always evaluating to false. Basically, I just need to know if any of the originally selected values have changed. If so, I need to set a boolean variable to true. 

    This is the code I set up in the OnChange property of the combobox to test it:

    If(
     Not(ThisItem.Task in TaskValue.SelectedItems.Title),
     Set(
     varTaskChanged,
     true
     )
     ),
     Set(
     varTaskChanged,
     false
     )
    );

     

    No matter what I do, adding new selections, deleting selections, it always evaluates varTaskChanged to true. 

  • WarrenBelz Profile Picture
    155,415 Most Valuable Professional on at

    Hi @CCJones ,

    I cannot see your data, but is is assuming that TaskValue is a Table (Multi-select Combo Box ?) with a field called Title in this Table (is this what the Combo Box is displaying?) and ThisItem.Task is a String Value. It then is looking for any instances of the String in the Table.

  • CCJones Profile Picture
    244 on at

    Yes, it's a multiselect combobox (it's complicated because there are multiple systems that can be selected and based on the selected system, the combobox can be single or multiple select). When it's set to single select, your solution works since it's only one value changing. The task name is in the Title field of the table which is another SharePoint list. However, when there are multiple selections, ThisItem.Task in TaskValue.SelectedItems.Title never evaluates to true.  I just can't figure out how to compare exactly what is in the combobox with exactly what is in the text field. 

  • WarrenBelz Profile Picture
    155,415 Most Valuable Professional on at

    Hi @CCJones ,

    Again please note I cannot see your data, so have to rely on you to investigate.
    Firstly what is the Items of TaskValue (note it cannot be both single and multi-select in structure at the same time although you can select only one item from a multi-select combo box). Also when you refer to ThisItem.Task, is this a Single Line of Text field in the data source ?

  • CCJones Profile Picture
    244 on at

    @WarrenBelz wrote:

    ... (note it cannot be both single and multi-select in structure at the same time although you can select only one item from a multi-select combo box)


    Yes, understood. But I am setting the "SelectMultiple" property as shown here:

    If(
     SystemValue.Selected.System = "CluePoints",
     true,
     false
    )

     When it only allows a single selection, the comparison is simple. When it allows multiple selections, not so much. 


    @WarrenBelz wrote:

    Firstly what is the Items of TaskValue 


    Items is set to:

    Filter(
     Sort(
     colTasks,
     SortOrder
     ),
     System = SystemValue.Selected.System
    )

    It is filtering out Tasks related to specific systems. 

    DefaultSelectedItems is set to:

    RenameColumns(
     Split(
     ThisItem.Task,
     ","
     ),
     "Value",
     "Title"
    )

    @WarrenBelz wrote:

    ...Also when you refer to ThisItem.Task, is this a Single Line of Text field in the data source ?


    ThisItem.Task is a Multiple Lines of Text field in SharePoint. 

     

    Thanks!

  • WarrenBelz Profile Picture
    155,415 Most Valuable Professional on at

    Hi @CCJones ,

    If you are trying to set a conditional data structure, my experience is that controls do not respond well to this (much like having different data sources conditionally) and whether this is a bug or by design (but an error message would be good), regularly simply do not produce the expected result. The outcome you are receiving suggests strongly that this is an example (and I can understand why as you cannot have an output that is valid only in certain circumstances)

    I suggest you consider leaving it a multiple and simply select one item if that is all you need.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • CCJones Profile Picture
    244 on at

    Unfortunately leaving it as multiple won't work either because I still can't get the comparison between what's in the combobox and what's in the multiple lines of text field. I'd love to make it single select only, but the option to select multiple is a requirement for a specific set of tasks. I'm sure they'd be amenable to just selecting one task for the systems that only require one, but again, I still can't get the comparison when multiple tasks are selected. This ruins my email notifications setup because of just one field. 

     

    Thanks for the aid!

  • WarrenBelz Profile Picture
    155,415 Most Valuable Professional on at

    Hi @CCJones ,

    I do not have exactly your example, but when I need conditional output to be provided, I have two/more controls, with one visible for each requirement and the Update of the Data Card or Patch also conditional as to which one gets used in the circumstance.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 846

#2
Valantis Profile Picture

Valantis 532

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard