Hi,
Similiar questions have been asked before, so I hope this is not violating any rules but I simply cannot get this to work on my own after a long time of researching this forum.
That said, I'm a totally new to PowerApps.
To the problem:
1. I have a stored procedure as below:
/* Procedure to add new data to KPIs*/
CREATE OR ALTER PROCEDURE dbo.AddNewKPI
(
@KPIName VARCHAR(200)
, @KPIDescription VARCHAR(500)
, @KPIGroup VARCHAR(100)
, @KPISubGroup VARCHAR(100)
, @KPIOwner VARCHAR(50)
, @DateCreated DATE
)
AS
BEGIN
declare @KPI_ID int;
INSERT INTO dbo.KPI (KPIName, KPIDescription, KPIGroup, KPISubGroup,KPIOwner)
VALUES (@KPIName, @KPIDescription, @KPIGroup, @KPISubGroup, @KPIOwner);
set @KPI_ID = scope_identity();
INSERT INTO dbo.KPIValues(KPI_ID)
VALUES (@KPI_ID);
INSERT INTO dbo.KPITarget(KPI_ID)
VALUES(@KPI_ID)
END
2. I have set up a flow with PowerAutomate to execute the stored procedure by clicking a button in powerapps.
Note: I specified 'Ask in PowerApps' for the dynamic content of each paramter.
Please see the flow below:

3. Now, I added the Flow to the button and tried to select all the input values from the cards that specify the parameters used in the stored procedure. The values would be inserted by a given user to create a new KPI as in screenshot below.
However, I cannot get the formula to work without errors. I'm receiving an error 'The function 'Run' has some invalid arguments' when I try to select the value cards as input for the stored procedure.
How can I select the values inserted by a user to be the values for the parameters in the stored procedure?

I'm looking forward to any suggestions!
Thanks a lot!!