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 / Unexpected Characters
Power Apps
Answered

Unexpected Characters

(0) ShareShare
ReportReport
Posted on by 76

I am trying to enable a combobox drop down on my custom form to pull from the choices on my Sharepoint list called Major Incident Dashboard - Test, the combo box is linked to a lookup column on my list called Root Cause Secondary. I want the choices to filter based off a column on the Root Cause Secondary list called Root Cause. I wrote the code below and I have been around the block few times when it comes to power apps but I am getting the error seen in the screenshot for unexpeceted characters. Any ideas how to correct this.

Filter{ 
 Choices('Major Incident Dashboard - Test'.'Root Cause Secondary');
 Value in Filter ('Root Cause Secondary', DataCardValue15.Selected.Value in RootCause)
}

IncidentManage_0-1673566467271.png

 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @Incident-Manage ,
    Apart from having curly brackets {} on your filter instead of normal (), you also need to specify the field in the other table it needs to match (correct of my guess it wrong). You also have a mix of separators ; and , I do not know your location, but use the one for your Region

    Filter(
     Choices('Major Incident Dashboard - Test'.'Root Cause Secondary');
     Value in 
     Filter(
     'Root Cause Secondary';
     DataCardValue15.Selected.Value in RootCause
     ).'Root Cause Secondary'
    )

     

    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

  • Incident-Manage Profile Picture
    76 on at

    Hi @WarrenBelz This worked thanks for your assistance.

  • Incident-Manage Profile Picture
    76 on at

    @WarrenBelz @Question as I’m working on this today I’m noticing that some options where I have things available under multiple options such as for the option Caused by Change it shows up 4 times in my filter

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @Incident-Manage ,

    I cannot see your data, but you must also have duplicates in your choices - you could do this

    Distinct(
     Filter(
     Choices('Major Incident Dashboard - Test'.'Root Cause Secondary');
     Value in 
     Filter(
     'Root Cause Secondary';
     DataCardValue15.Selected.Value in RootCause
     ).'Root Cause Secondary'
     ),
     Value
    )

     

    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

  • Incident-Manage Profile Picture
    76 on at

    @WarrenBelz So when using it I am now getting no options in my drop down menu. I made some slight changes to what you provided to what worked with my data previously. What I fed into powerapps is below.

     

     

    Distinct(
     Filter(
     Choices('Major Incident Dashboard - Test'.'Root Cause Secondary'),
     Value in Filter('Root Cause Secondary', DataCardValue15.Selected.Value in RootCause).'Title'),Value
    )

     

    blank options.PNG

     

  • Verified answer
    WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    @Incident-Manage ,

    Probably because the output is now Result instead of Value

    RenameColumns(
     Distinct(
     Filter(
     Choices('Major Incident Dashboard - Test'.'Root Cause Secondary'),
     Value in 
     Filter(
     'Root Cause Secondary', 
     DataCardValue15.Selected.Value in RootCause
     ).'Title'
     ),
     Value
     ),
     "Result",
     "Value"
    )

     

    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

     

  • Incident-Manage Profile Picture
    76 on at

    @WarrenBelz this works partially I get the options but when I test it the selection doesn’t save to it’s designated column.

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @Incident-Manage ,

    What is the name and type of field you are updating and what is the current Update of the Data Card

  • Incident-Manage Profile Picture
    76 on at

    @WarrenBelz The name of the field is Root Cause Secondary which is what I pass in the choices option of the code so Power Apps reads it as 'Major Incident Dashboard - Test'.'Root Cause Secondary'. and it is a lookup. Update is currently set to DataCardValue16.Selected.

  • Verified answer
    WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    @Incident-Manage ,

    Yep - lookup columns will cause you a lot of unwanted (and unnecessary) grief and I have never needed to use them. You need to get the Id back, which is the ID of the item in the other list being looked up, so the Update of the Data Card should be

    {
     Value: DataCardValue16.Selected.Value,
     Id:
     Lookup(
     'Root Cause Secondary',
     RootCause = DataCardValue16.Selected.Value
     ).ID
    }

     

    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

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