cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stapes
Impactful Individual
Impactful Individual

Dealing with Runtime errors in a Canvas App

My canvas app is showing a run time error from a previous run when I open it to edit.

It is showing an error for this statement:

ClearCollect(outstandingOrders,GoodsInToday.Run(WeekNo, SelectedYear, 2))

In the first place, this should not be flagged as an error. No data is NOT an error. It just means no records were found. This is a normal occurrence.

How can these spurious errors be handled / eliminated.

I do not need our users seeing big red errors for no reason.

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @stapes

Do you mean that if your flow returns blank value, the formula will show error?

If so, I suggest you try if statement to avoid this.

Try this formula:

If(!IsBlank(GoodsInToday.Run(WeekNo, SelectedYear, 2))||
   !IsEmpty(GoodsInToday.Run(WeekNo, SelectedYear, 2)),
   ClearCollect(outstandingOrders,GoodsInToday.Run(WeekNo, SelectedYear, 2)
  )

In this way, if the flow returns nothing, the clearcollect action will not perform.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yutliu-msft
Community Support
Community Support

Hi @stapes

Do you mean that if your flow returns blank value, the formula will show error?

If so, I suggest you try if statement to avoid this.

Try this formula:

If(!IsBlank(GoodsInToday.Run(WeekNo, SelectedYear, 2))||
   !IsEmpty(GoodsInToday.Run(WeekNo, SelectedYear, 2)),
   ClearCollect(outstandingOrders,GoodsInToday.Run(WeekNo, SelectedYear, 2)
  )

In this way, if the flow returns nothing, the clearcollect action will not perform.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
stapes
Impactful Individual
Impactful Individual

Using this formula:

If(!IsBlank(GoodsInToday.Run(WeekNo, SelectedYear, 2))||
   !IsEmpty(GoodsInToday.Run(WeekNo, SelectedYear, 2)),
   ClearCollect(outstandingOrders,GoodsInToday.Run(WeekNo, SelectedYear, 2)
  )

Doesn't this involve running the flow 3 times?

Sytze
Frequent Visitor

Twice. Once for the condition and once for either the True or the False part of the conditional stetement.

leoO31
Regular Visitor

Hi,

I'm having an issue with regards to runtime errors. I have already removed this "estimateddatetofinishedrequest" but still manifesting error.

leoO31_0-1659494168453.png

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (4,891)