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 / IfError is not doing w...
Power Apps
Unanswered

IfError is not doing what I expect it to do

(3) ShareShare
ReportReport
Posted on by 894
IfError(
 ClearCollect(
 UnpostedCounts,
 UnpostedStockCountsUnits.Run(glCurrentStCode)
 ),
 Clear(UnpostedCounts)
);

In the code line above, I expect it to clear the UnpostedCounts collection if there is nothing returned from UnpostedStockCountsUnits.Run.

Instead, I get an error displayed on the top line of my App:

UnpostedStockCountsUnits.Run failed: The data returned in the response is invalid.

The whole reason I wrapped this is IfError was to get rid of this unwanted error message.

It doesn't do that.

How DO I get rid of the unwanted error message? No records in the dataset is NOT an invalid response.

Categories:

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 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard