cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Re: Using Flow in Powerapps to create any printable file

@Pstork1 Well maybe I spoke a little too soon. 

 

I was using a default Batch_ID as my parameter in my stored Procedure.  I have changed my flow around slightly.  When My Green Bean Loader submits a batch I want that to be the trigger to kick off the flow so the Roast Tag can be 'printed'.  The flow looks like it runs successfully but there is nothing in the ouput of the table.  Whereas before with the hard coded '25' there was.  The flow is obviously getting the correct parameter passed to it but not pulling the table (record in this case) from the stored procedure.

 

 

SELECT bd.ID, ss.SKU_Number, bs.Blend_Number .... and a few others
FROM Batch_Data bd

JOIN SKU_Source ss ON bd.SKU_ID = ss.ID
JOIN SKU_Blend_Join sbj ON ss.id = SKU_ID
JOIN Blend_Source bs ON bs.ID = sbj.Blend_ID
And few other join statements

WHERE bd.id = @Batch_ID

GROUP BY ............

GO

@Batch_ID is getting the right integer it just seems like it isn't getting passed into the SP.  Any Ideas?

 

 

Dual Super User
Dual Super User

Re: Using Flow in Powerapps to create any printable file

Was it hard coded as '25' or 25? one is a string and the other an integer.  Are you sure the proper BatchID is actually getting fed to the stored procedure?  What data type in SQL is bd.id?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

Re: Using Flow in Powerapps to create any printable file

@Pstork1 it was hard coded into the flow action of execute a stored procedure.  It is an INT and the primary Key in teh Batch_Data Table with the Identity (feature?), i just did quotes for emphasis(sorry for the confusion).  When I had the procedure execute upon a new item being created in the Green_Data Table it is passing the correct value and I could see it in the flow after it ran.  However this is the output parameters:

{
  "OutputParameters": {},
  "ReturnCode": 0,
  "ResultSets": {
    "Table1": []
  }
}

Before when hard coded the Table1 would have all corresponding info in the query.

 

 

 

Dual Super User
Dual Super User

Re: Using Flow in Powerapps to create any printable file

Have you tried running the stored procedure manually with a BatchID of 156 just to make sure the stored procedure is returning the values for that specific batch?  Otherwise it looks to me like the BatchID is being passed correctly.  Although some of the connectors do have issues with numeric data types.  YOu might want to try passing the parameter as a string (varchar) and then converting it in the stored procedure to the right data type.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

Re: Using Flow in Powerapps to create any printable file

I found the issue with some things not showing up.  In my query I also join on Flavor_ID, well not every SKU is flavored so therefore those queries will not return any values.  I tried it with different Batch_ID's for the ones that are flavored and everything passes correctly.  

 

I guess my next step is to figure how to pass null values to flavor when that SKU isn't flavored.

 

My tables are set up as such:

SKU Source:

ID

SKU_Number

SKU_Description

 

SKU_Flavor_Join:

ID

SKU_ID

Flavor_ID

 

Flavor_Source

ID

Flavor_Number

Flavor_Description

 

Since not every sku is represented int eh SKU_Flavor_Join Table the query results are empty.

Anonymous
Not applicable

Re: Using Flow in Powerapps to create any printable file

@Pstork1 i changed my joins to Full Outer Joins and now even those UnFlavored batches now produce a Roast Tag.  

 

Thanks for your help

Dual Super User
Dual Super User

Re: Using Flow in Powerapps to create any printable file

Glad you found the issue.  SQL stored procedures can sometimes be really tricky.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,633)