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 / Problems creating a bl...
Power Apps
Unanswered

Problems creating a blank collection with Values?:

(0) ShareShare
ReportReport
Posted on by 10

I'm creating a powerapp which has a button on the front page.
When that button is pressed, it's supposed to do a clearcollect on a gallery, which sets up all the columns including some columns that are text, some integers, and some date. Then, navigates to the next page for people to input new data, that goes into a collection, then subsequently 2 sharepoint lists. 

I seem to be running into type errors with the value columns. 

In the clearcollect I started off with fieldx : "", which looked fine in clearcollect but was getting an error that it was expecting a different type, when I tried to patch the collection results to the sharepoint list(from the collection).  In the sharepoint list, the type in number. 

CheysPowerApps9_0-1688004679252.png

 


I then read to switch the integer columns to fieldx : Value("") but this gives me an immediate "The function clearcollect has some invalid arguments".

Thoughts?

Categories:
I have the same question (0)
  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @CheysPowerApps9 ,

     

    Have you tried saving the value in the collection as => Value(Text) ?

     

    Hope this helps

  • chelynne Profile Picture
    8 on at

    Yes 🙂 when each line saves to the collection, it is value (field.text), the problem is happening when I'm trying to patch the collection value to the sp list. 

  • chelynne Profile Picture
    8 on at

    Bump

  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Bump received 😅 @chelynne 

     

    Any error you get while patching?

     

    Key things to note:

    1. You SP datatype and passing datatype should match.

    2. When you are converting to number -> make sure text format is in the format to be converted as number.

    3. Do you have any restrictions on the SP Column to accept certain range of numbers?

     

    Lemme know

  • CheysPowerApps9 Profile Picture
    10 on at
    Yes, the photo in the original post is the error I get while trying to patch from the collection to the SP list. The formula that's getting the error is : ForAll(AskCollection, Patch('Business Planning - Fund Ask', Defaults('Business Planning - Fund Ask'), {Fund:FundCol, FY_24_25: FY_24_25Col, FY_25_26:FY_25_26Col, FY_26_27:FY_26_27Col, Recurring_Past_26_27:Recurring, Go_NoGo_Date:Go_NoGo, Description:DescriptionCol, 'New Ask ID': Demand_Form.LastSubmit.ID}) The input that's sitting in the collection is from this patch, where I take the text value and convert it to a number : Patch(AskCollection, ThisItem, {DescriptionCol:Description_input.Text, FundCol: Fund_Dropdown.Selected.Value, FY_24_25Col:Value(Fy24_25_Input.Text), FY_25_26Col:Value(Fy25_26_input.Text), FY_26_27Col:Value(Fy26_27_input.Text), Recurring:Value(Recurring_input.Text), Go_NoGo:DatePicker1.SelectedDate}); Collect(AskCollection, {NewAskItem:"", FundItem:"", DescriptionCol:"", FundCol:"", FY_24_25Col:"", FY_25_26Col:"", FY_26_27Col:"", Recurring:"", Go_NoGo:""}) In SP, the column is number, with no restrictions.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard