web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Lookup and compare in ...
Power Apps
Answered

Lookup and compare in Sharepoint Library

(0) ShareShare
ReportReport
Posted on by 64

Hello,

 

Can somebody help if is it possible to lookup and compare a value in a Sharepoint Document Library, not list.

I have in Powerapp a field where I introduce a value and I want to make it compare that value with values in column in order to notify in case it does exist.

 

I tried this, but I get an error.

 

If(
!IsBlank(
LookUp('Documente in Vigoare', 'Cod Intern' = Value(Self.Text))
),
Notify("This reference already exists", NotificationType.Error)
)

Categories:
I have the same question (0)
  • VasileR Profile Picture
    298 Super User 2024 Season 1 on at

    Hei @RaduR ,

     

    Add the If to the OnChange property of the Text control, and the "Behaviour ..." error will go away.

  • RaduR Profile Picture
    64 on at

    I changed the idea by adding that value in a list so maybe it would be easier, in fact I got another error.

     

    "

    Concatenate(DepDoc.SelectedText.Value, " - ", TipDocum.SelectedText.Value, " - ", NrDoc.Text);

    If(
    !IsBlank(
    LookUp('Codificare Interna', 'Title' = Value(Self.Text)).'Title')
    ,
    Notify("This reference already exists", NotificationType.Error))"

     

    It says "Incompatible types for comparison".

     

    I don't know if i wrote something wrong or..

     

  • VasileR Profile Picture
    298 Super User 2024 Season 1 on at

    Where did you add that code, and on what property?

  • RaduR Profile Picture
    64 on at

    Is added on a Label. I need to concatenate 3 inputs into a label and verify if that label does exists in that ShrepointList.

  • VasileR Profile Picture
    298 Super User 2024 Season 1 on at

    The label does not support behavior functions in the Text field (like Notify).
    Either move the code to a button, or on one of the select steps (OnSelect for DepDoc or TipDocum).

  • RaduR Profile Picture
    64 on at

    I switched to a button, but I get that error every time even if that value it does not exist.

    I know "isBlank" is useless in this case, but I don't know how to reformulate the code for a button.

    If(
    !IsBlank(
    LookUp('Codificare Interna', 'Title' = Value(ConcatenareCodDoc.Text))
    ),
    Notify("This reference already exists", NotificationType.Error)
    )

  • VasileR Profile Picture
    298 Super User 2024 Season 1 on at

    You can remove Value() from the Concatenare, because you want to compare Text with Text.

    Is 'Title' a text column in your library?

    What is the error now?

  • RaduR Profile Picture
    64 on at

    I tried without Value, but then the Label goes in Error.

    Title is a column in List, I changed it now to "Codificare" as text column.

    The button that check works kind of, but it always returns the error.

     

    image.png

  • VasileR Profile Picture
    298 Super User 2024 Season 1 on at

    Can you paste a value from the 'Codificare' column, so I can see what it contains?
    I assume the label ConcatenareCodDoc is "0 - PL - 4214", right?

  • RaduR Profile Picture
    64 on at

    Yes, that is the label.

    In "Codificare" column I wrote exactly "0 - PL - 4214" so with the button I can check between column and label.

    I also wrote 1 - PL - 4214 in the label, but it still shows the Error

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard