web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / MatchAll function is r...
Power Apps
Answered

MatchAll function is returning a blank value?

(0) ShareShare
ReportReport
Posted on by 71

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:

_ru_0-1703265622990.png
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:

_ru_1-1703266145154.png

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>&nbsp;&nbsp;&nbsp;" & "<i>Enrolled</i><b>: " & 
 First(
 Filter(
 _values,
 Title = "Enrolled"
 )
 ).Data& "</b>&nbsp;&nbsp;&nbsp;" & "<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!

Categories:
  • Verified answer
    _ru Profile Picture
    71 on at

    no replies, but in the off chance some internet stranger comes across this problem and comes across this thread, i was able to solve it. apparently it won't match anything if there's null values. not empty strings, but actual "null" written without the double quotes in the json. for some reason my json was patching null instead of just "". i added a 'if isblank, write "" instead' statement and it works now. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard