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 / Where is the unexpecte...
Power Apps
Answered

Where is the unexpected Character?

(0) ShareShare
ReportReport
Posted on by

I am getting the error that characters are used in an unexpected way.

 

"For example, the character '\' isn't expected after a number, like this: '32\'. A space ('32') would be expected so that it's just the number 32 or another number (as in '323') would be expected.

 

Filter('HSS Picksheet020521Z', StartsWith(Title,ResourceDropDown.SelectedText.Value)), If(IsBlank(SerialSearchBox.Text),Filter('HSS Picksheet020521Z','Serial Number'=V1),Filter('HSS Picksheet020521Z',StartsWith('Serial Number', SerialSearchBox.Text)))

Categories:
I have the same question (0)
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Please share a screenshot of this formula with the red lines and error.   That message can be confusing and doesn't necessarily refer to a character that shouldn't be there.

     

     

  • Community Power Platform Member Profile Picture
    on at

    SAMUELAL_0-1612792998489.png

    The red line only appears under the comma (I drew it in because it goes away when you click away from the screen)

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    .SelectedText is deprecated try .Selected.Value

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Try reconstructing your filter statement something like this:

     

    If(
    IsBlank(SerialSearchBox.Text),Filter('HSS Picksheet020521Z','Serial Number'=V1),
    !IsBlank(ResourceDropdown.SelectedText.Value), Filter('HSS Picksheet020521Z', StartsWith(Title,ResourceDropDown.SelectedText.Value))
    Filter('HSS Picksheet020521Z',StartsWith('Serial Number', SerialSearchBox.Text))

    )

     

    Currently where the comma is it's expecting ';'.  

  • Community Power Platform Member Profile Picture
    on at

    How do I fix this?

     

    Edit: this was meant to be a response to another post

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Did you see my previous answer?   Your filter statement needs to be reconstructed.    I gave you an example based on what you have now.

     

    Let me ask this.

     

    Here is what I see in your filter statement.   You want it to filter by the value of the Resource dropdown or by the search box value.  If the searchbox is blank it will automatically filter by the value V1.

     

    Try this:

     

    If(

    !Isblank(SerialSearchBox.Text, Filter('HSS Picksheet020521Z', StartsWith('Serial Number', SerialSearchBox.Text) Or StartsWith(Title, ResourceDropDown.SelectedText.Value),

    IsBlank(SerialSearchBox.Text), Filter('HSS Picksheet020521Z', 'Serial Number' = "V1")

     

    )

  • Community Power Platform Member Profile Picture
    on at

    My apologies: 

    My comment "How do I fix this?" was intended for another post.

     

    My intention is that my data table is filtered by a 'Resource' (the drop down) AND filtered by a 'serial number'. I want the user to have the option to scan a barcode of the 'serial number' OR type in the serial number if a barcode is not available.

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

     

    Ok, you will still need to reconstruct your filter statement.   It's not going to to work the way you have it.   The whole filter statement needs to be in within the If(), to work properly.

     

    Try it this way.

     

    If(

    !Isblank(SerialSearchBox.Text And !IsBlank(SerialSearchBox), Filter('HSS Picksheet020521Z', StartsWith('Serial Number', SerialSearchBox.Text) And StartsWith(Title, ResourceDropDown.SelectedText.Value),

    IsBlank(SerialSearchBox.Text), Filter('HSS Picksheet020521Z', 'Serial Number' = "V1")

     

    )

  • Community Power Platform Member Profile Picture
    on at

    There are some things that need debugging in the formula you provided. I am assuming that fixing errors at the top of the formula checker will resolve the ones on the bottom of the list.

     

    Here is the first one:

    SAMUELAL_0-1612796943046.png

     

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    If you copied and pasted, check the first isBlank.   Make sure it's IsBlank and not Isblank.   Surprisingly enough you can get some really strange errors when there are case mismatches in the commands.

     

    Is your SerialSearchBox a simple text input or something else?

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