cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MikeBlairTP
Helper I
Helper I

Collect formula error

This on select formula I am 100% sure that it has always worked but now has the dreaded red underline squiggle

 

Collect(
'Personal Account Dealing',
DataInput

)

 

Personal Account Dealing is the Sharepoint list I am writing to, it still exists and I have access to it.  I've even removed it as a data source and re added it.

 

DataInput is the collection.

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @MikeBlairTP,

Have you solved your problem?

Do you want to collect the 'Personal Account Dealing' into a collection named DataInput?

 

If the 'Personal Account Dealing' is indeed a SP list you write the data to, and the DataInput is indeed the collection you want to save the list data to, then I think your Collect() has something syntax wrong.

 

You should modify as below:

Collect(
 DataInput,//Here should be the collection name
'Personal Account Dealing' //Here should be the data source you want to save as a collection
)
Best Regards,
Qi

View solution in original post

7 REPLIES 7
4th8
Helper I
Helper I

Any chance we can get a screen shot of the formula in question? Might help in figuring out what the issue is. 

MikeBlairTP_0-1654876992592.png

 

4th8
Helper I
Helper I

I agree that looks like it should work. Sometimes that can happen. Save and close then open the editor again. It should just go away.

v-qiaqi-msft
Community Support
Community Support

Hi @MikeBlairTP,

Have you solved your problem?

Do you want to collect the 'Personal Account Dealing' into a collection named DataInput?

 

If the 'Personal Account Dealing' is indeed a SP list you write the data to, and the DataInput is indeed the collection you want to save the list data to, then I think your Collect() has something syntax wrong.

 

You should modify as below:

Collect(
 DataInput,//Here should be the collection name
'Personal Account Dealing' //Here should be the data source you want to save as a collection
)
Best Regards,
Qi

Correct @v-qiaqi-msft 

Collection is called Datainput and the SP list is called Personal Account Dealing.  I have copied your code on a new button and I still get the error

 

MikeBlairTP_0-1655914667348.png

I have noticed some odd columns in my collection that I did not create

MikeBlairTP_1-1655914975224.png

 

Hi @MikeBlairTP

Hover your mouse cursor over the red line to show me the specific error message.

Here is the doc about the Collect() function:

Collect, Clear, and ClearCollect functions in Power Apps - Power Apps | Microsoft Docs

Best Regards,
Qi
MikeBlairTP
Helper I
Helper I

Hi @v-qiaqi-msft 

 

MikeBlairTP_1-1655975966082.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.

Users online (5,018)