Reputation: 127
I have a table that has a composite primary key.
CONSTRAINT [PK_FileContainerFiles] PRIMARY KEY CLUSTERED
(
[FileId] ASC,
[ContainerId] ASC
)
I am trying to delete the row using logic app connector. It works if the primarykey is having one element.
How to input two identifiers in 'RowId' of Logic app. when I tried something like below, Am getting error. Is this a Microsoft logic App Issue? Any Idea. Please help.
Upvotes: 1
Views: 2330
Reputation: 63
Another working solution is to use instead the "Execute Query" action and do a delete with all the conditions you need. Sorry for answering such an old post but I had the same issue and found it so I think other people may find it useful too.
Upvotes: 1
Reputation: 415
Yes, it is possible. The SQL Connector (which, btw is the same connector used in flows as well as LogicApps and PowerApps) treats primary keys just like SQL. That is, you simply use each key in sequence separated by a comma to construct the "full" key.
My example using composite key:
@{join(createArray(items('For_each')?['BUKRS'],items('For_each')?['LIFNR']),',')}
TLDR: values separated by comma.
Upvotes: 3
Reputation: 566
The Row Id stands for the unique identifier of the row you wish to delete. So if you would like to delete a row based on those 2 input parameters, you would first need to find a way to return you the Row Id (unique identifier) of the row(s) you'd like to delete and then execute the Delete row for each of the returned rows.
Another way would be to use a stored procedure to handle the deletion of the rows.
For Reference: https://learn.microsoft.com/en-us/connectors/sql/
Upvotes: 0