cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ShowMeTheAnswer
Level: Powered On

Remove function not workin online, SQL Datasource

Hi,

I added a simple button on my products screen.

It's a screen that has a "datatable" of products.

Required functionality of button:

 - "Deletes" a record from SQL Database Table called [MAIN].

 - (Potentially refreshes the screen as well).

Actual observed functionality of button:
 - Nothing happens.

 

Code is here:

Remove('[dbo].[MAIN]',First(Filter('[dbo].[MAIN]', "KAPMT_ProductDataTable.Selected.MAIN_ID_1"=Text(MAIN_ID) )));Refresh('[dbo].[MAIN]');Refresh('[dbo].[KAPMT_MAIN_VIEW_2]')

 

I have access to delete records in SQL using my Windows Login.

App uses an ID that also has access..any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
ShowMeTheAnswer
Level: Powered On

Re: Remove function not workin online, SQL Datasource

Fixed it myself:

Remove('[dbo].[MAIN]',First(Filter('[dbo].[MAIN]',MAIN_ID=KAPMT_ProductDataTable.Selected.MAIN_ID)));Refresh('[dbo].[MAIN]');Refresh('[dbo].[KAPMT_MAIN_VIEW_2]')=

Issues

Quotes around this bit:

KAPMT_ProductDataTable.Selected.MAIN_ID
Order seems to matter, datasource column to go first.

1 REPLY 1
ShowMeTheAnswer
Level: Powered On

Re: Remove function not workin online, SQL Datasource

Fixed it myself:

Remove('[dbo].[MAIN]',First(Filter('[dbo].[MAIN]',MAIN_ID=KAPMT_ProductDataTable.Selected.MAIN_ID)));Refresh('[dbo].[MAIN]');Refresh('[dbo].[KAPMT_MAIN_VIEW_2]')=

Issues

Quotes around this bit:

KAPMT_ProductDataTable.Selected.MAIN_ID
Order seems to matter, datasource column to go first.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 40 members 4,084 guests
Please welcome our newest community members: