Forum Discussion

Domi333's avatar
Domi333
Copper Contributor
Jul 13, 2022
Solved

How to detected duplicate item using Power Apps

Hello, 

I have problem how to detect duplicate item before saving it in sharepoint list using Power Apps. I wrote this function based on what I found in Internet but there are errors and I can't uderstand what is wrong.

My function:

If(IsBlank(LookUp('BrowseGallery2_1', title=DataCardValue5.Text)),

SubmitForm(Form1),

Notify('Error duplicate values detected", NotificationType.Error)

)

Shown error: The function 'LookUp' has some invalid arguments.

Incompatible types for comparison. These types cant't be compared : Error, Text.

I don't uderstand the errors. The type of column title is text. 

I will be grateful for every answer. Thanks 🙂

  • Domi333 you're getting the error because you're trying to lookup data from the gallery whereas you need to lookup from the data source (SharePoint list etc).

     

    Rob
    Los Gallardos
    Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

     

1 Reply

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    Domi333 you're getting the error because you're trying to lookup data from the gallery whereas you need to lookup from the data source (SharePoint list etc).

     

    Rob
    Los Gallardos
    Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

     

Resources