Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Updating SharePoint field is failing due to "possible invalid string in filter query'

(1) ShareShare
ReportReport
Posted on by 14

Hello!

I'm new to creating power apps! I'm trying to create a power app form that will update a current row in a SharePoint list I have created. WhenI run the form, I get a read error stating: "possible invalid string in filter query'. I'm sure it is a simple fix but I haven't been able to figure out where is is failing. 

 

Patch('2025 Draft Project List', LookUp('2025 Draft Project List','ID'='ID'),{'Current Phase':'Current Phase'})

  • Michael E. Gernaey Profile Picture
    41,007 Super User 2025 Season 1 on at
    Re: Updating SharePoint field is failing due to "possible invalid string in filter query'

    Hi @HMay 

     

    I am going to assume that the Phase as an Option?????

     

     

    If So then

     

    In your patch its

     

    'Current Phase': MyControl.Selected.Value

     

    Because you have to pass the value of the optionset

     

    If its not, please please add more details going back and forth is umm yeah.. 

  • HM-22072112-0 Profile Picture
    14 on at
    Re: Updating SharePoint field is failing due to "possible invalid string in filter query'

    The new value would come from the form so the user would change the phase in the form and then that would go to update the current phase in SharePoint.

    HMay_0-1720814534785.png

     



  • Michael E. Gernaey Profile Picture
    41,007 Super User 2025 Season 1 on at
    Re: Updating SharePoint field is failing due to "possible invalid string in filter query'

    Hi @HMay 

     

    Based on what you wrote, you simply essentially told the Column to update itself with its own value.

     

    What Control or String or whatever, does the new value come from??? You need to use that.


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • Michael E. Gernaey Profile Picture
    41,007 Super User 2025 Season 1 on at
    Re: Updating SharePoint field is failing due to "possible invalid string in filter query'

    Hi @HMay 

     

    Unfortunately thats a totally separate issue, so if you mark mine as the answer to the original question we can work on the next.

     

  • HM-22072112-0 Profile Picture
    14 on at
    Re: Updating SharePoint field is failing due to "possible invalid string in filter query'

    Ahhh okay - I see what you are saying! Now my form submitted without error but isn't updating the list. 😞

  • Michael E. Gernaey Profile Picture
    41,007 Super User 2025 Season 1 on at
    Re: Updating SharePoint field is failing due to "possible invalid string in filter query'

    The built in SharePoint ID field is always a number, not a string.

  • Michael E. Gernaey Profile Picture
    41,007 Super User 2025 Season 1 on at
    Re: Updating SharePoint field is failing due to "possible invalid string in filter query'

    Hi @HMay 

     

    Yes it is, but ID is a number not string so unless you convert it to a string first don't put the  ' ' on it, its a number


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

  • HM-22072112-0 Profile Picture
    14 on at
    Re: Updating SharePoint field is failing due to "possible invalid string in filter query'

    Thank you for responding! The ID and Current Phase items are fields within my power app form and my SharePoint list. What is odd when I look at the formula, It is recognizing 'Current Phase':'Current Phase' the bolded portion as a field within the form. However with '2025 Draft Project List','ID'='ID' the bolded portion appears to be unrecognizable as it doesn't format it as it recognizes it is a field within the form. When I type the 'ID', it pops up in the eligible criteria but when I select it, it doesn't recognize it.

     

    HMay_0-1720813111894.png

     

  • Verified answer
    Michael E. Gernaey Profile Picture
    41,007 Super User 2025 Season 1 on at
    Re: Updating SharePoint field is failing due to "possible invalid string in filter query'

    Hi @HMay 

     

    Looking at the Patch, what is 'ID' ??? your 'ID' = 'ID' would cause an issue because you need to use double quotes for strings, same thing for 'Current Phase'

     

    Its ok to use Single Quotes on Field Names (especially if there are spaces), but the values have to be "" if its a string

     

    Patch('2025 Draft Project List', LookUp('2025 Draft Project List','ID'='ID'),
     {
     'Current Phase':'Current Phase'
     }
    );
    
    


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard