web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Error with Collect Fun...
Power Apps
Answered

Error with Collect Function Data Type

(0) ShareShare
ReportReport
Posted on by 57

Building my first power app and I have ran into an obstacle.  I get the following error when add this to my button which should submit my data and send it to my excel sheet.

The "Filter Change" column in the data source you're updated expects a "Text" type and you're using an "Error" type

 

I am using the following for my OnSelect for a submit button on my app.

Collect(MSThree,{Filter:MS3Filter.Text,Hepa:MS3Hepa.Text,Pulse:MS3Pulse.Text,'Number of Bags Changed':MSTThreeBagChange.Text,'Filter Change':MS3FC.Text});ResetForm(Form1_2); Navigate('Dust Collector Selection')

 

The error is related to the Filter Change.  If I delete that part then the error goes away. The filter change on my page is a drop down list with "NA,Yes,No" as the three available selections.  All I want it to is make it easier for our guys to just select an option. Power App Snip.PNG

Categories:
I have the same question (0)
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @Cmastmaint,

     

    Since it is a dropdown, the 'Text' property is not available. Could you try and swap 'Filter Change':MS3FC.Text with 'Filter Change':MS3FC.Selected

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • LaurensM Profile Picture
    12,516 Moderator on at

    @Cmastmaint,

     

    As a follow-up to my previous comment, is there a specific reason why you patch the data values manually via a Collect instead of using a SubmitForm(Form1_2) function? This will patch all data within the form to your datasource (depending on the Form DefaultMode) it will either update or create a new record.

     

    I hope this helps!

  • Cmastmaint Profile Picture
    57 on at

    LaurensM,

    Thank you for your reply!  I tried to change it to .Selected and for some reason that did not work.  On your second post I have no reason of doing a collect versus using a submitform because I honestly don't know what I am doing.  I was assigned this task and I have no prior knowledge of creating an app let alone programming anything other than simple ladder logic.  I am just taking any tutorial I can watch or read and trying to make it work.  Basically all the apps purpose is to record data on these machines and populate an excel file for viewing of it.  I am trying my best but obviously struggling.  Any suggestions you have will go a long way and I already appreciate your time for responding!!

    With your second comment are you suggesting I replace collect with SubmitForm(Form1_2) ?  

  • Cmastmaint Profile Picture
    57 on at

    Follow up to my above question about SubmitForm.  If I use SubmitForm how do i direct towards the excel file?

  • Cmastmaint Profile Picture
    57 on at

    Sorry to bombard with questions!  However, I have updated the app using the submitform function and it works great with one caveat.  As soon as I submit the form while testing it out the form goes blank and does not allow you to enter information again.  The form will show "No information to display".  How do I repair that?

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @Cmastmaint,

     

    No worries, we are here to help. 😊

     

    If I understand it correctly, this form's information will be saved to an Excel table?

     

    Would it be possible to try the following adjustment to your code ('Filter Change':MS3FC.Selected.Value) :

     

     

    Collect(
     MSThree,
     {
     Filter:MS3Filter.Text,
     Hepa:MS3Hepa.Text,
     Pulse:MS3Pulse.Text,
     'Number of Bags Changed':MSTThreeBagChange.Text,
     'Filter Change':MS3FC.Selected.Value
     }
    );
    NewForm(Form1_2); 
    Navigate('Dust Collector Selection')

     

     

     I expect MS3FC to be refering to the dropdown control itself.

     

    Since you are new to Power Apps, I can recommend the following learning material - should you be interested:

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • LaurensM Profile Picture
    12,516 Moderator on at

    @Cmastmaint,

     

    If SubmitForm() works like a charm, ignore my last comment's code 😉

    You will have to swap ResetForm(Form1_2); for NewForm(Form1_2);

  • Cmastmaint Profile Picture
    57 on at

    LaurensM,

    Thank you so much for your time and help!!  I really greatly appreciate it!  😀

  • LaurensM Profile Picture
    12,516 Moderator on at

    @Cmastmaint glad I could be of help. 😄

  • Cmastmaint Profile Picture
    57 on at

    One more quick question please??  Is there a way that I can have excel capture the date and time on SubmitForm so that when the data is sent to excel it records time and date?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard