cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerappBuilder
New Member

Issue with Execute SQL query with formal paramter in Flow

Hi,

 

I am currently having an issue with Executing a SQL query with parameter in Flow.

I have a PowerApp that calls a flow and give  certain paramaters to the Flow.

The goal of the Flow is that it Executes A query an give the result back to PowerApps.

 

I created a flow that takes input from Power Apps.

After that I use a Compose to transform the inputvariable (formatting input date to 'yyy-MM-dd')

After that I want to execute a SQL query with the output of the Compose as a formal parameter.

However it seems that he is not assigning any value to the formal paramater.

 

He is running succesfull, but does not return a value for @datum. He seems not store the date in that variable (it is not a connection issue since he do return the BD_opbrengst value).

Does anyone have an idea what I am doing wrong? Changing the datatype of the variable does not help either.

 

See below the ouput that I get when I test the flow:

 

Invoer
query
declare @datum as char(10); select @datum as datum, BD_opbrengst from dbo.opbrengsten
formalParameters
{
  "datum": "2011-08-15"
}
Query Results
{
  "OutputParameters": {},
  "ResultSets": {
    "Table1": [
      {
        "datum": null,
        "BD_opbrengst": 5000
      }
    ]
  }
}
 

Thanks!

2 REPLIES 2
Community Support
Community Support

Re: Issue with Execute SQL query with formal paramter in Flow

Hi @PowerappBuilder ,

 

Could you please share a screenshot of the configuration your flow?

Could you please explain more details about your issue?

 

Please share more details so we would try to provide a proper workaround for you.

 

Best regards,

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
PowerappBuilder
New Member

Re: Issue with Execute SQL query with formal paramter in Flow

Hi Alice,

 

Below the flow I am currently testing.

So I ask from PowerApps a variable, put that in Compose to transform that variable, and then assign the output of   compose as Formal Paramater to Excecute SQL query.

In picture you see that I give that value to "datum".

Whener I execute the query Select @datum he gives as ouput NULL.

Even when I just initialize a variable in Flow and give it a default value and give it then as a formal paramater to Execute a Sql query, he gives ouptut NULL.  So  whatever I try I do not get a value for the formal parameter returned by the query . He seems not able to assign the value to the formal paramater.

He do return the value from BD_opbrensgt (so there is no connectivity issue).

 

 

powerapp.png

Thanks!

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Users online (6,981)