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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Remove Record and Clos...
Power Apps
Answered

Remove Record and Close Form

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, 

 

I have a "Tasks" datatable connected to a Sharepoint list. I have a form inside a container with a delete button. So far I can create and edit records, but there's a problem configuring the record deletion: I added a delete icon and I've set its OnSelect property to: 

Remove('Randomizer - Tasks',DataTable1.Selected)

This works fine, but then I want it to delete the record and Close the form by setting its OnSelect to:

Remove('Randomizer - Tasks',DataTable1.Selected) && Set(modalView, false)

it doesn't work. It shows this error: "Invalid argument type: Expecting one of the following: Boolean, Number, Text, Option set value"

 

I've already set the visible variable for the form.

 

Both functions work individually, but they don't work together with the &&. However, in some other buttons I have a SubmitForm and Set functions working together without a problem.

delete button.png

I appreciate your help on finding what my error is.

Categories:
  • Verified answer
    SebS Profile Picture
    4,867 Super User 2026 Season 2 on at

    @Anonymous 

     

    Use semicolon to separate them that will execute all actions You should not use && for this

     

     

     

    Remove('Randomizer - Tasks',DataTable1.Selected); Set(modalView, false)

     

     

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You're the best, thanks! That worked.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard