cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rmaziwis
Resolver I
Resolver I

Formula not working when I try deleting a record from power apps

Hi All 

 

i have an issue with a  record that Iam faulting to delete in Power apps 

 

The formula iam using is Select(Parent);Remove('[rp].[Form InjuriesOnDutyF]',ThisItem)

 

But the Below  is not deleting from the powerapps front end as it should any thoughts??

rmaziwis_0-1651150603387.png

 

 

 

 

3 REPLIES 3
Drrickryp
Super User
Super User

@rmaziwis 

Is the data source for your gallery a collection or the actual data source?

In any event,  try this as the OnSelect property of your icon.  

Remove(
        '[rp].[Form InjuriesOnDutyF]', 
                                Lookup(
                                     '[rp].[Form InjuriesOnDutyF]]',ID=ThisItem.ID
                                 )
)

If your data source for the gallery is a collection, then you will need to recollect it after removing the item from the original data source. 

 

rmaziwis
Resolver I
Resolver I

Thank you this iam currently testing 

rmaziwis
Resolver I
Resolver I

The above did not also work but funny enough it works on the test environment.

 

I have opted to Delete from SQL unless there is another idea  

 

---Update to delete injury on duty record
USE [PFPAPP]
GO

DELETE FROM [rp].[Form InjuriesOnDutyF]
WHERE [Id] =284;

 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (4,144)