I have seen, in many videos, that recently PowerApps can use stored procedures to populate galleries without need to use flows.
Just like this:
ClearCollect(myCollection, mySQLConnection.MyStoredProcedure({.. storedprocedure parameters...}).ResultSets.Table1)
It works great... until i get into '.Table1'. The intellisense recognizes ResultSets, but no way to recognize Table1.
The returned JSON object, in fact, has the right format. You can see Table1 as a member of ResultSets. But the parser says it is an UntypedObject, and can't use it... this way,
I have made a 'workaround', but involves lot of 'manual' processing
Set(varStoredProcedureReturn, myConnection.sp_miStoredProcedure({searchParameter:"foo"}));
ClearCollect(
myCollectionData,
ForAll(
varStoredProcedureReturn.ResultSets.Table1,
{
Field1: ThisRecord.Field1,
Field2: ThisRecord.Field2
}
)
)
I had to 'manually' map all my fields
Does anyone why this is happening?
Thanks!
UPDATE: I'm working with the spanish version, that, for any reason, decided to use ';' instead of ',' (I suppose it's due to the decimal separator, where we use comma instead of dot). This is what I get:
As you can see, the 'Table1' element is not recognized. The 'context' is a 'OnSelect' of an icon (a 'search icon'). I don't know if it's a problem of the spanish localization.
Thanks