Hi,
I am using Power Automate (formerly Flow) to query Cosmos DB and format the response for PowerApps.
(I have used the same method in other flows and it works)
In this one instance however, ClearCollect is refusing the response, thinking it is not a record.
If I Set() the response to a variable however, it is recognized as a record.
If I try:
ClearCollect(asd_col,Upsert.Run("{""pkey"":""test""}"))
The code is underlined red, with the message
The function ClearCollect has some invalid arguments.
Cannot use a non-record value in this context.
I cannot execute the code, it stays with a red underline.
If I try Set, however:
Set(asd_var,Upsert.Run("{""pkey"":""test""}"))
It works just fine - asd_var is defined as a record just fine.
My Power Automate response to PowerApps uses a schema auto-generated from a sample response, it is well-formed and the data returned conforms to it.