So I am plowing along, pretty successfully using what I learned in in this post (https://powerapps.microsoft.com/en-us/blog/return-an-array-from-flow-to-powerapps-response-method/) to call an SQL stored procedure from a Flow and then call that Flow in turn from a PowerApp but I have encountered a roadblock and am not coming up with the right strategy to solve it. Here is a step-by-step of where I am and I would be extremely appreciative of any direction someone could point me in. I have been browsing those sites to answer the question ("Can I pass more than one argument from a PowerApp to a Flow that needs four). While I have seen some similar posts (https://powerusers.microsoft.com/t5/Building-Power-Apps/PowerApp-Button-pass-2-seperate-parameters-to-a-Flow-for/m-p/92677#M34789), nothing that directly addresses this problem, which I suspect others are encountering from the variety of different posted questions.
I have created a SQL Server stored procedure that takes 4 string arguments that works successfully.
ALTER PROCEDURE [dbo].[FlexQueryProductInventory]
@Salesperson varchar(50) = '',
@Crop varchar(50) = '',
@Variety varchar(50) = '',
@WarehouseName varchar(50) = ''
AS
BEGIN
SET NOCOUNT ON;
SELECT [Company Number]
,[Company Name]
,[Bus Unit]
,[Bus Unit Desc]
,[LOCATION]
,[Item Nbr Short]
,[Item Number]
,[Item Desc01]
,[Item Desc02]
,[Unit of Measure]
,[Qty On Hand]
,[Qty In Transit]
,[Qty On PO]
,[Qty Commit]
,[Qty On Backorder]
,[Qty Available]
FROM [BI_Mart].[dbo].[RT_Product_Inventory]
WHERE
[LOCATION] LIKE '%' + @Salesperson + '%' AND
[Item Desc02] LIKE '%' + @Crop + '%' AND
[Item Desc01] LIKE '%' + @Variety + '%' AND
[Bus Unit Desc] LIKE '%' + @WarehouseName + '%'
ORDER BY [LOCATION], [Item Desc02], [Item Desc01], [Bus Unit]
END
I have created a Flow to execute this. I have not gotten this to execute completely correctly yet in test mode since it is only prompting me for a single variable instead of four. If I enter a string during a test, it placed that into each variable and while it ran successfully, it didn’t return any rows (because of course the search criteria didn’t result in any matches). I then created a simpler stored procedure with a single WHERE test that did test out successfully (which is where I got the JSON payload to feed to the Response step to generate the schema). So I have not successfully executed this Flow with proper strings being fed to each of the four variables which was perhaps a foreshadowing of the problem I am encountering. I have fiddled around a little with the configuration of the Initialize Variable step but to no avail so far.
Flow with multiple parameter variables
I then went into my PowerApps and started to configure the Button to call the Flow and there is where I have encountered the block. Notice the Invalid number of arguments: received 4, expected 1 error message. This seemed eerily similar to my inability to test my Flow with more than one string entry (one for each variable).
(the screen shots are showing up in line so I have attached them as files to the bottom)

Now we get to my question. Can more than one argument be passed to a Flow from PowerApps? If so, of course, how? I am beginning to believe based on reading the posts that I might have to pass a concatenated CSV string to the Flow in one argument. Then I will have to make the Flow parse the single input string and populate each of the four variables, perhaps with the Split function which I don’t know how to do yet so I need to better understand that process too (as I suspect that will also be useful in the future). But I am wondering if perhaps there is a different way to write the Flow from scratch to accept more than the one argument. This seems like it should be straightforward but as we know very little is straightforward in PowerApps and Flow😉.
For just a little more context, here is the whole PowerApps app where I will populate the Data Table in the middle with the results of this stored procedure based on the search parameters passed and the lower Gallery with the results of the second stored procedure which fortunately only requires one variable to be passed after an item is selected from the Data Table.
