I would like to fecth column names from dataverse and use in a gallery. I have fetched column names of a dataverse entity correctly. Please check the following code.
ClearCollect(
DetailQuestions,
Distinct(
Ungroup(
MatchAll(
JSON(
First(Details),
JSONFormat.IgnoreBinaryData & JSONFormat.IgnoreUnsupportedTypes
),
"([^""]+?)""\s*:"
).SubMatches,
"SubMatches"
), Value)
)
It works well on development mode.

But it doesn't work in published application. The gallery has no item.
I have put a timer and wait for 15 seconds. It still shows nothing.