cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stapes
Post Prodigy
Post Prodigy

IfError is not doing what I expect it to do

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.

0 REPLIES 0

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,539)