cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerAppsMicro
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
PowerAppsMicro
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
PowerAppsMicro
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (67,672)