I have a flow that connects to an on premise gateway and retrieves data based on two parameters.
In my Power app on a forms on visible I have the following code.
If(Connection.Connected,
ClearCollect(ManifestDetails,GetManifestDetails.Run(First(LocalDataCollection).UserLogin,Text(DatePicker1.SelectedDate,"yyyy-mm-dd")));
SaveData(ManifestDetails,"SavedDetails");
ClearCollect(Manifest, GroupBy(ManifestDetails, "Id","PickupDate", "Orders"));
Set(Online, "Hello Date Picker"),
Set(Online, "You are currently offline and cannot refresh this screen")
)
The flow is called as I can see it has run successfully in the run log but the data returned is not saved in to the collection called ManifestDetails.
I have copied the result of the flow and created the following code for on visible and this works.
If(Connection.Connected,
ClearCollect(ManifestDetails,
{Id: 1,
PickupDate: "2021-11-24T00:00:00",
OrderID: 1,
PickUpAddress1: "24 Ravello Rise ",
PickUpAddress2: "Flat Bush",
PickUpCity: "Auckland",
DeliveryName: "Test Company",
DeliveryPhone: "",
DeliveryMobile: "",
DeliveryAddress1: "25 Ravello Rise",
DeliveryAddress2: "Flat Bush",
DeliveryCity: "Auckland",
ApplicationUserID: "09ad1ff9-a64b-4503-9858-956333e27812",
OrderStatus: "placed",
ItemName: "Test Item",
ItemDescription: "This is a Test Item",
Length: 1,
Width: 1,
Depth: 1,
Weight: 10,
Quantity: 2,
LineStatus: "",
OrderDetailsId: 1
},
{
Id: 1,
PickupDate: "2021-11-24T00:00:00",
OrderID: 2,
PickUpAddress1: "24 Ravello Rise",
PickUpAddress2: "Flat Bush",
PickUpCity: "Auckland",
DeliveryName: "Test Company",
DeliveryPhone: "",
DeliveryMobile: "",
DeliveryAddress1: "26 Ravello Rise",
DeliveryAddress2: "Flat Bush",
DeliveryCity: "Auckland",
ApplicationUserID: "09ad1ff9-a64b-4503-9858-956333e27812",
OrderStatus: "placed",
ItemName: "Test Insert",
ItemDescription: "Test Insert",
Length: 1,
Width: 1,
Depth: 1,
Weight: 1,
Quantity: 10,
LineStatus: "",
OrderDetailsId: 2
});
Set(Online, "Hello");
SaveData(ManifestDetails,"SavedDetails");
ClearCollect(Manifest, GroupBy(ManifestDetails, "Id","PickupDate", "Orders"));
Set(Online, "Hello 2");,
Set(Online, "You are currently offline and cannot refresh this screen")
)
So what have I missed in when calling the flow?
Thanks in advance.
Matt
Solved! Go to Solution.
Hi @Frosty8467
I see the code that calls the flow. Does the Power Automate returns the data using the "Respond to PowerApps or Flow" step like below
Here is a sample flow which called from PowerApps
Call Flow with Param and store the response back to Collection
ClearCollect(ColSQLReturn , CallFromPowerApps.Run("Param1").spresponse)
Data Flow
PowerApps --> Power Automate --> SQL --> Power Automate --> Power Apps
Thanks,
Stalin - Learn To Illuminate
Hi @Frosty8467
I see the code that calls the flow. Does the Power Automate returns the data using the "Respond to PowerApps or Flow" step like below
Here is a sample flow which called from PowerApps
Call Flow with Param and store the response back to Collection
ClearCollect(ColSQLReturn , CallFromPowerApps.Run("Param1").spresponse)
Data Flow
PowerApps --> Power Automate --> SQL --> Power Automate --> Power Apps
Thanks,
Stalin - Learn To Illuminate
Stalin,
thanks for the reply not exactly what I needed but it did get me on the right track.
Thanks again
Matt
Hi,
may i know if you able to solve your problem,
i having similar problem where i expecting result from flow run to be store in collection, but didn't.
Collect(platformspare,DropColumns(AddColumns(Distinct('Main Power Apps Database',field_6),"CountPart", Value(getCountRev1.Run("..",ThisRecord.Result).total_items), "Title",ThisRecord.Result), "CountPart"));
User | Count |
---|---|
159 | |
86 | |
68 | |
63 | |
62 |
User | Count |
---|---|
209 | |
150 | |
93 | |
81 | |
68 |