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 Apps
Unanswered

Collecting Data

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

I am new to Power Apps, but have built an inspection form with several drop-Down boxes for data entry.  I have the data linked to a form on a Sharepoint site and added a button at the bottom of the form that will be selected to enter the data once the form is completed.  The button is not working and I am receiving the error message: "Name isn't valid. Text isn't recognized."  I have deleted the button and tried a new button without luck.  I am using the "Collect" syntax on the button.  Can anyone provide an  answer as to why I can't get the collect button to work?

 

Thank-you!

Categories:
I have the same question (0)
  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Anonymous ,

    Can you add more details with Screenshot and Exact Issue definition with proper steps. that will help us to understand your issue.

    As per my understanding from above.

    It seems like you dont have name column in collect but on Select of button you setting some value to Name.
    So Please check accordingly. also you can add more screenshot and code you are using . for reference purpose.



    Thanks,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello, and thanks for the quick response!  

    I have six drop-down boxes I’m asking for data to be entered in:

    • Associate ID
    • Date
    • Shift
    • Scooter ID
    • Inspection #
    • Status

    I want to save the data to a table, so after that data is entered there is a “Enter” button that would be pushed to save the data.  Hence the problem, I can’t get the button to work.  Would you have any idea why?  The error I am receiving:

    • "Name isn't valid. Text isn't recognized." 
    • Location: EnterData.Onselect. 

    I have the following entered as information for the "Enter" button:

    Collect(Data, {AssocID:TextInput1.Text,Shift:Dropdown5.Text,Date:DatePicker.Text,ScooterID:Dropdown1.Text,Inspection:Dropdown3.Text,Status:Dropdown4.Text})

     

    autoguy57_0-1704295412696.png

     

    Thanks Again!

  • SDinesh04 Profile Picture
    3 on at

    Hello @Anonymous 

    Kindly use the "Dropdown1.Selected.Value" Instead of the Dropdown5.Text  & use Date:DatePicker.SelectedDate instead of Date:DatePicker.Text On select of Enter date button.
    Use the below Code - 
    Collect(Data, {AssocID:TextInput1.Text,Shift:Dropdown5.Selected.Value,Date:DatePicker.SelectedDate,ScooterID:Dropdown1.Selected.Value,Inspection:Dropdown3.Selected.Value,Status:Dropdown4.Selected.Value})

    Thanks.

  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Anonymous ,
    See the correct code , you have to use like below then you Error gone automatically.

    VijayTailor_0-1704297415400.png

    Collect(Data, {AssocID:TextInput1.Text,Shift:Dropdown4.Selected,Date:DatePicker1.SelectedDate,ScooterID:Dropdown4_2.Selected,Inspection:Dropdown4_3.Selected,Status:Dropdown4_4.Selected})

    Note : Use the Proper name and Get the Selected Value if you are using DropDown /DatePicker.
    Thanks,
    if this will help you to resolve your issue then Mark completed.
    Thanks,

     



  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It got worse, now there are 12 errors, here's the code: 

    Collect(Data,{AssocID:TextInput1.Text,Shift:Dropdown1.Selected.Value,Date:DatePicker.SelectedDate,ScooterID:Dropdown1.Text,Inspection:Dropdown3.Text,Status:Dropdown4.Text})

    autoguy57_0-1704298458340.png

    autoguy57_1-1704298494726.png

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I received 16 error messages now.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Still receiving the following error messages:

    autoguy57_2-1704299354406.png

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Actually, to save form entry, the easiest way is to use the SubmitForm() function for OnSelect property of a button.

    Not sure why you use the Collect() function to save data back to a SP list, I don't think it is a good choice, even Patch() is better.

     

    Further more, how to refer to the selected value from dropdown depends on how you set the Items property of the dropdown box and what is the column type of the column you want to save the selected value to.

    If the Items property of the dropdown box returns a text column, well, you just need to refer to Dropdown.Selected.TextColumnName.

     

    Like the Shift column, if it is a Choice column type, and you populate the dropdown box with Choices() function, then you need to refer to 

    {Value:Dropdown5.Selected.Value}

    Please do note that a Choice column is complex column type, it expects a record value, so you need to refer to either {Value:Dropdown5.Selected.Value} or Dropdown5.Selected, so does other Choice column.

    Patch(Data, Defaults(Data),
    {AssocID:TextInput1.Text,Shift:{Value:Dropdown5.Selected.Value},Date:DatePicker.SelectedDate,ScooterID:Dropdown1.Selected.Value,Inspection:Dropdown3.Selected.Value,Status:Dropdown4.Selected.Value})

     

  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Anonymous ,

    Error showing coz you still using Dropdown.Text  that is not the correct way.

    See the Coz you suggested to you and Modify your Code Accordingly and most important thing is give the Proper Name. (".Text") will work with Label and InputText Component but not DropDown/DatePicker.

    Not sure how , Can you Please share your Modified Code , so i can suggest the Way

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    Here is the Code: 
    Collect(ScooterInspectionResults,{ShiftLabel:ShiftBox.Text,AssocA:AssocB.Text,DateA:DateB.Text,ScootA:ScootB.Text,InspectionA:InspectionB.Text,StatusA:StatusC.Text,InspectionA:InspectionB.Text,NotesA:NotesB.Text})
     
    Thanks again for your assistance!

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 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard