Hello!
I am having an issue where the MatchAll function is returning blank values for each item in an array/JSON except one, weirdly.
I have a SharePoint list with a column called Results that contains JSON data shown below:
Full JSON sample for better viewing:
[{"ColumnType":"Text","Data":"John","Required":"Yes","Title":"Name"},{"ColumnType":"Number","Data":"29","Required":"No","Title":"Age"},{"ColumnType":"Yes/No","Data":"true","Required":"No","Title":"Enrolled"},{"ColumnType":"Date","Data":"6/26/1994","Required":"Yes","Title":"Enrolled Date"},{"Choices":"North;South;East;West","ColumnType":"Choice","Data":"South","Required":"Yes","Title":"Region"},{"ColumnType":"Text","Data":"","Required":"No","Title":"Email"}]In my Power App, I have a Gallery that I'm using to display some of that data, and when they select the item in the gallery, it will add all of the data in the selected item into a collection. I am using an HTML label with the MatchAll function to display some of the data, and the same MatchAll function to add to the collection. Neither of them work however, except for the "Region" field as shown below:
The HTML label that I have in the gallery is set to:
With(
{
_values: MatchAll(
ThisItem.Result,
"\{""Choices"":""(?<Choices>[^""]*)"",""ColumnType"":""(?<ColumnType>[^""]*)"",""Data"":""(?<Data>[^""]*)"",""Required"":""(?<Required>[^""]*)"",""Title"":""(?<Title>[^""]*)""\}"
)
},
"<i>Age</i>:<b> " &
First(
Filter(
_values,
Title = "Age"
)
).Data & "</b> " & "<i>Enrolled</i><b>: " &
First(
Filter(
_values,
Title = "Enrolled"
)
).Data& "</b> " & "<i>Region</i><b>: " &
First(
Filter(
_values,
Title = "Region"
)
).Data & "</b>"
)Similarly, the select button in the gallery is set to:
ClearCollect(
colData,
ShowColumns(
MatchAll(
ThisItem.Result,
"\{""Choices"":""(?<Choices>[^""]*)"",""ColumnType"":""(?<ColumnType>[^""]*)"",""Data"":""(?<Data>[^""]*)"",""Required"":""(?<Required>[^""]*)"",""Title"":""(?<Title>[^""]*)""\}"
),"Title","Required","ColumnType","Choices","Data")
);
Set(
varFormMode,
"Edit"
);
Set(
varItem,
ThisItem
);
Navigate(Screen2)
But again, only the Region displays in the HTML text label, and when you select the Select button in the gallery, only the Region data is added to the collection 'colData'
It's as if the MatchAll function can't find any of the Title strings except for Region for some reason. I tried
Any and all help would be much much appreciated!

Report
All responses (
Answers (