cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Patron
Post Patron

ClearCollect. Formerly working code now marked as invalid. Cannot use a non-record value in this context.

I have this formula on the OnVisible action of my screen:

 

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

 

Earlier, this worked fine. I made changes in my Stored Procedure. Added some extra columns. I have updated the Flow & tested that. It works fine. When I want to add the new columns to the Data table, they are not shown. So I thought I would delete the data table & try again.

 

Now,  the above ClearCollect statement is flagged as an error:

ClearCollect has some invalid arguments.

Cannot use a non-record value in the context.

 

I have tried various things.

 

GoodsInToday.Run(WeekNo,SelectedYear, 2)

 

This statement is fine, & does not get flagged as an error. Obviously, I need the collection. I tried giving the collection a new name. That didn't help.

 

 

3 REPLIES 3
Highlighted
Dual Super User III
Dual Super User III

Re: ClearCollect. Formerly working code now marked as invalid. Cannot use a non-record value in this context.

Hi @stapes 

 

As you have made a few changes in the flow, can you try to remove the flow from the canvas app and register it again? The expression used by you looks fine to me.

Please make sure that you are passing the correct variables in the flow as per the specified format. If this doesn't help, please share more details around this.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Frequent Visitor

Re: ClearCollect. Formerly working code now marked as invalid. Cannot use a non-record value in this context.

Have you found a solution to this. Been driving me crazy for hours.

Highlighted
Helper III
Helper III

Re: ClearCollect. Formerly working code now marked as invalid. Cannot use a non-record value in this context.

Hi @stapes ,

Have you found the solution for this problem?

 

I have been stuck with a similar issue.

Helpful resources

Announcements
Check this Out

Announcing

Class of 2020- Season 2

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,091)