Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Invalid filter clause: unsupported operation in Lookup Function

Posted on by 2
Hi I get this error when trying to use a Lookup function with a single = (eq) as the expression

Error when trying to retrieve data from the network: Invalid filter clause: unsupported operation. Only single 'eq', 'ne', 'contains', 'startswith' or 'endswith' is currently supported.

I only use one eq in the Lookup so I'm not sure what the issue is. A different post with a similar issue suggested that PowerApps gets confused if columns are named the same so I made my input collection and my datasource have unique column names. Here's the full code, the issue is on the first Lookup clause. I tried hardcoding the lookup i.e. dbEquipment = "Test" but it still didn't work. I believe the Filter inside is working as I can see a preview of it in PowerApps. AutoData is my datasource, an excel table. Any help is appreciated
 
Clear(colAutoFormDS);
ForAll(
    Gallery5.AllItems,
    Collect(
        colAutoFormDS,
        {
            colProjectName: tiProjectName.Text,
            colEquipment: ThisRecord.Equipment,
            colComplexity: Dropdown2.SelectedText.Value,
            colClassOrInstance: Dropdown2_1.SelectedText.Value,
            colNumUnits: tiNumUnits.Text,
            colUnitCost: tiCost_3.Text,
            colIO: tiIO.Text,
            colTotalCost: tiCost.Text
        }
    )
);
If(
    EditMode,
    ForAll(
        colAutoFormDS,
        If(
            !IsBlank(ThisRecord.colEquipment),
            Patch(
                AutoData,
                LookUp(
                    Filter(
                        AutoData,
                        dbProjectName = tiProjectName.Text
                    ), dbEquipment = "Test"
                ),
                {
                    dbProjectName: colProjectName,
                    dbEquipment: colEquipment,
                    dbComplexity: colComplexity,
                    dbClassOrInstance: colClassOrInstance,
                    dbNumUnits: colNumUnits,
                    dbUnitCost: colUnitCost,
                    dbIO: colIO,
                    dbTotalCost: colTotalCost
                }
            ),
            Patch(
                AutoData,
                Defaults(AutoData),
                {
                    dbProjectName: colProjectName,
                    dbEquipment: colEquipment,
                    dbComplexity: colComplexity,
                    dbClassOrInstance: colClassOrInstance,
                    dbNumUnits: colNumUnits,
                    dbUnitCost: colUnitCost,
                    dbIO: colIO,
                    dbTotalCost: colTotalCost
                }
            )
        )
    ),
    ForAll(
        colAutoFormDS,
        Patch(
            AutoData,
            Defaults(AutoData),
            {
                dbProjectName: colProjectName,
                dbEquipment: colEquipment,
                dbComplexity: colComplexity,
                dbClassOrInstance: colClassOrInstance,
                dbNumUnits: colNumUnits,
                dbUnitCost: colUnitCost,
                dbIO: colIO,
                dbTotalCost: colTotalCost
            }
        )
    )
);
Navigate(scrAutoHome);
 
  • WarrenBelz Profile Picture
    WarrenBelz 143,246 on at
    Invalid filter clause: unsupported operation in Lookup Function
    Excel is going to cause you more problems than that - do you have access to SharePoint ?
  • CU19110206-0 Profile Picture
    CU19110206-0 2 on at
    Invalid filter clause: unsupported operation in Lookup Function
    Hi, thanks for the response. This code works. The issue is my datasource is Excel, so the && operator is not delegable. Nesting the Filter in the Lookup was my was of trying to workaround the && operator.
  • WarrenBelz Profile Picture
    WarrenBelz 143,246 on at
    Invalid filter clause: unsupported operation in Lookup Function
    Firstly, try this
    ForAll(
       Gallery5.AllItems As _Items,
       Patch(
          AutoData,
          If(
             !IsBlank(_Items.Equipment) && EditMode,
             LookUp(
                AutoData,
                dbProjectName = _Items.tiProjectName.Text && dbEquipment = "Test"
             ),
             Defaults(AutoData)
          ),
          {
             dbProjectName: _Items.tiProjectName.Text,
             dbEquipment: _Items.Equipment,
             dbComplexity: _Items.Dropdown2.SelectedText.Value,
             dbClassOrInstance: _Items.Dropdown2_1.SelectedText.Value,
             dbNumUnits: _Items.tiNumUnits.Text,
             dbUnitCost: _Items.tiCost_3.Text,
             dbIO: _Items.tiIO.Text,
             dbTotalCost: _Items.tiCost.Text
          }
       )
    );
    Navigate(scrAutoHome);
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard