cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Fetching items failed. Possible invalid string in filter query error for updating multiple records.

Hi All , 

 

I am trying the following to update a set of records when they are changed in a gallery. When I hardcode the ID to a numeric value, The item is updated in the SPList, However, when I try to update multiple records, I am receiving the following error. 

Fetching items failed. Possible invalid string in filter query

I have recently started working on powerapps and do not have an idea how to resolve this. 

 

Can someone please let me know what am I doing wrong? 

 

Thanks in advance.

 

ForAll(
    Filter(
        galUsers.AllItems,
        tog_changed.Value = true
    ) As ChangedRows,
    Patch('EEDataBase',
        LookUp('EEDataBase', ID = ChangedRows.ID),
        {
           Active: ChangedRows.tgActive.Value
        }
    )
);

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
New Member

With( { InactiveEmployees: Filter( galUsers.AllItems, tog_changed.Value = true ) },
      ForAll( InactiveEmployees As Employee, 
              Patch( EEDataBase, Employee, { Active:Employee.tgActive.Value} ) ) );

I was able to resolve it with the above piece of code. Found it on https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/operators#as-operator

View solution in original post

1 REPLY 1
Highlighted
New Member

With( { InactiveEmployees: Filter( galUsers.AllItems, tog_changed.Value = true ) },
      ForAll( InactiveEmployees As Employee, 
              Patch( EEDataBase, Employee, { Active:Employee.tgActive.Value} ) ) );

I was able to resolve it with the above piece of code. Found it on https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/operators#as-operator

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,561)