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 / Set Lookup Field in Sh...
Power Apps
Unanswered

Set Lookup Field in Sharepoint to Blank

(0) ShareShare
ReportReport
Posted on by 33

Hello,

I have a Lookupfield in a sharepoint list. In powerapps, I have a dropdown, now I set the dropdown to value and save the Form. All ok, but now I want to have a button, when I click this button i will that in my sharepoint lookupcolumn this entry will be deleted, same as I go to sharepoint and delete this item manually . So I used this code : 

 

Patch(Liste_Personal; LookUp(Liste_Personal; ID = Value(DataCardValue518.Text)); {fk_per_pc_emprunte: Blank()});;

 

No error on the code, but m in my Sharepoint list , what do I do wrong? Thanks

 

Screenshot 2024-05-03 164801.png

Categories:
I have the same question (0)
  • Rajkumar_M Profile Picture
    3,743 Super User 2025 Season 2 on at

    Hi @wuffwuff2004 

     

    The Blank() function is used to represent a blank value for text fields, but for a Lookup field, you need to set it to null by using a record with a Value field set to null.

     

    Patch(
    Liste_Personal,
    LookUp(Liste_Personal, ID = Value(DataCardValue518.Text)),
    {fk_per_pc_emprunte: {Value: Blank()}}
    );

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

  • wuffwuff2004 Profile Picture
    33 on at

    Hello, I tried exactly this but this gives me the following error (I try to translate correctely): 

    "Wrong argument. It is needed an other record type with an other schema. In your formula is missing a column Id from type NUMBER"

    Many thanks

  • Rajkumar_M Profile Picture
    3,743 Super User 2025 Season 2 on at

    Try this formula,

     

    Patch(
    Liste_Personal,
    LookUp(Liste_Personal, ID = Value(DataCardValue518.Text)),
    {
    ID: Value(DataCardValue518.Text), // Ensure this matches the column name and type in your data source
    fk_per_pc_emprunte: {Value: Blank()}
    }
    )

    (Or)

     

    Patch(
    Liste_Personal,
    LookUp(Liste_Personal, ID = Value(DataCardValue518.Text)),
    {
    ID: Value(DataCardValue518.Text),
    fk_per_pc_emprunte: Blank()
    }
    );

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

  • wuffwuff2004 Profile Picture
    33 on at

    Hi, Many thanks, the first one gives me the same error, the second one doesn't give me an error instead it won't remove the entry in my Sharepoint List.

    Best regards

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
Kalathiya Profile Picture

Kalathiya 421

#2
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard