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 / Storing numbers and us...
Power Apps
Answered

Storing numbers and users in sharpoint list using Collect

(0) ShareShare
ReportReport
Posted on by 16

I am pretty new at PowerApps. I am trying to store a number of items in a corresponding SP list. The text type fields are filled, however the numeric field (NrParticipants) and the person/group field (requestor) are not. What am I doing wrong?

   Collect(
        Teams;
        {
            TeamID: teamIDUnique;
            requestor: User();
            teamName: teamName;
            NrParticipants: numberOfTeamMembers;
            surveyID: "Collaboration Survey";
            requestDateTime: Now()
        }

Categories:
  • Verified answer
    mdevaney Profile Picture
    29,993 Moderator on at

    @Stevenb12 

    NumberOfPeople is likely stored as text but should be converted to a value instead.  Requestor is a people field and inserting requires some special code.  See below for my edits.

     

    Collect(
     Teams;
     {
     TeamID: teamIDUnique;
     requestor:
     {
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims:"i:0#.f|membership|" & User().Email,
     Department:"",
     DisplayName:User().FullName,
     Email:User().Email,
     JobTitle:"",
     Picture:""
     };
     teamName: teamName;
     NrParticipants: Value(numberOfTeamMembers);
     surveyID: "Collaboration Survey";
     requestDateTime: Now()
     }
    )
    
    

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

     

  • Verified answer
    Stevenb12 Profile Picture
    16 on at

    @mdevaney

    Thanks for the help.

    The person is now stored correctly. So that is Solved! (Pity that the output from User() does not match with person in SharePoint). Learned a valuable lesson here. 

    Storing a number is not yet solved. The numberOfTeamMembers is a global variable and is of type number 

    The SP column NrParticipants is of the type Getal (sorry for the Dutch) with automatic number of decimals. Could it be that the English language of PowerApps and Dutch from SP is the issue here?

     
     
  • WarrenBelz Profile Picture
    156,738 Most Valuable Professional on at

    HI @Stevenb12 ,

    Just assisting my colleague @mdevaney here - he has got you 95% of the way so please accept his solution.

    You don't need Value() around numberOfTeamMembers  if it is already a number.

    I translated the Dutch (getal = number) and with auto decimals, it certainly should Collect to the the list. If not try

    Patch(
     Teams;
     Defaults(Teams);
     {
     TeamID: teamIDUnique;
     requestor:
     {
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims:"i:0#.f|membership|" & User().Email,
     Department:"",
     DisplayName:User().FullName,
     Email:User().Email,
     JobTitle:"",
     Picture:""
     };
     teamName: teamName;
     NrParticipants: numberOfTeamMembers;
     surveyID: "Collaboration Survey";
     requestDateTime: Now()
     }
    )

     

     

  • mdevaney Profile Picture
    29,993 Moderator on at
    @Stevenb12
    Agreed with @WarrenBelz here that the number does not need to be converted using VALUE if it’s already a number. Thanks for chiming in Warren. I must have list track of this question.
  • Stevenb12 Profile Picture
    16 on at

    @mdevaneySorry for the delay. Covid-19 messed up my work schedule. I am back in business now and thx for the support.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard