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 / Remove Record and Clos...
Power Apps
Answered

Remove Record and Close Form

(0) ShareShare
ReportReport
Posted on by

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:
I have the same question (0)
  • Verified answer
    SebS Profile Picture
    4,622 Moderator 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
    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

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard