-
Have a Copilot Studio project utilizing the connector to Azure CLU which returns its result as a record object. I just need to the key values out of that record so I can pass it to a Power Automate Flow which only takes text as an input but I can't seem to figure out how to get those key field(s) into a text string. JSON/PARSEJSON don't work on Record/Table objects and TEXT doesn't either. When trying to use CONCAT I can get so far but since the structure of that record is below, how do I get to the key values since referencing them with record.prediction.entities[0].extraInformation[0].key throws an error saying it doesn't like the [0] notation. What am I missing here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I'll need to confirm which Power-Fx version Copilot Studio is running. A recent change introduced support for the
Currently
|
Beta Was this translation helpful? Give feedback.
I've tried Concat with ForAll I can't tell you how many iterations and it always comes back to either the field (key) is unknown or Value is seen as a Table and it doesn't like that. After trying everything I could find, I finally got it to work using the following: But there has got to be a better way of simply accessing fields in a table/record object as strings than this...
With(
{
keys: ForAll(
Global.ConversationResult.prediction.entities As en,
Concat(
ForAll(
en.extraInformation As ex,
If(
ex.extraInformationKind = "ListKey",
ex.key,
Blank()
)
),
Value,
", "
)
)
},
Concat(
Split(keys, ", "),
Result,
", "
)
)