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 / Can't Create Submit Bu...
Power Apps
Answered

Can't Create Submit Button for Form

(0) ShareShare
ReportReport
Posted on by 47

In my app, I add a form, I connect it to my Sharepoint library with the metadata (columns) that I want, and then add each field that I want to be fill-able. I add a clear button with ResetForm(Form1);NewForm(Form1) in OnSelect. For my Submit button, in OnSelect, I add Submit(Form1);NewForm(Form1). But for the Submit button, I get the error Invocation of unknown or unsupported function. I don't understand what this means, or how to fix it. I want to create a fill-able form app where it will fill in a word doc template and trigger Power Automate to make a pdf and other things. But I'm having a hard time finding step-by-step instructions on how to do this.

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @sarahpoulin 

     

    Please change your FormNew's to NewForm

     

    That should solve your issue.

     

    I hope this is helpful.

     

    EDIT: SORRY - My eyes are going crooked today!  Don't know why I read your post that way....

     

    What I meant to say was to change your Submit to SubmitForm

  • sarahpoulin Profile Picture
    47 on at

    I don't understand... I don't have anything that says "FormNew." They say "NewForm"?

  • sarahpoulin Profile Picture
    47 on at

    Thank you. I see your edit now. I made the change (SubmitForm), and that sort of worked. But now I get an error pop up at the top (red banner) stating: The requested operation is invalid. Server Response: MyForm failed: To add an item to a document library, use SPFileCollection.Add() clientRequestId: (a bunch of numbers and letters) serviceRequestId: (a bunch of numbers and letters).

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @sarahpoulin 

    Do you have any required columns or any particular complex column types in your list definition?

  • sarahpoulin Profile Picture
    47 on at

    I don't have any required columns, but how do I know if I have complex column types? All I did in my Sharepoint library was add new "Single line of text" columns, make sure the default ones (such as Title, modified, etc) were not required, and then hid them (except for Title). Then in PowerApps, I clicked on "Edit fields" then "+ Add field," then added the 3 fields I created.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @sarahpoulin 

    So, Title is usually the only required column.  The rest, it sounds like, you created as text columns.  So that is all good nothing complex there.

     

    Have you refreshed your data source in PowerApps (click on the data source menu and choose refresh)?  It sounds like you might be altering the SharePoint list and PowerApps at the same time.  If you are, then you need to make sure you refresh the data source.

    Also, if you have changed requirements on columns in SharePoint after you had created your Form, then sometimes the Form is stuck with bad information about your datasource.  You can try to cut the Form (Ctrl-X) from your screen and then put it back with Ctrl-C or Z.  This will cause the Form to refresh itself also.

     

     

  • sarahpoulin Profile Picture
    47 on at

    I have tried refreshing, and I have tried deleting everything in my app and adding the Sharepoint data and fields all over again. Still exact same problem.

  • sarahpoulin Profile Picture
    47 on at

    If it helps any, I had "No item to display" when I tried to view my app, so I went to "Item" for Form1, and added Defaults('MyForm'). And it worked and I could see my fields in the app preview, but I am not sure if that screwed something up for submission. I also tried saving everything, exiting, and going back in.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @sarahpoulin 

    Would you be able to put some screenshots of what you have for:  1) your SharePoint list column definitions 2) Your form 3) any formulas (other than the ones you mentioned before) that you might have put in.

     

    So, you also mention "I could see my fields in the app preview" can you expand on what you mean by that?  Normally, you have a New form and enter values, hit submit.  There is no preview.

  • sarahpoulin Profile Picture
    47 on at

    I deleted everything (my site, Sharepoint library, the app, etc), and started from scratch again, and took screenshots of each step.

     

    Here are my columns/metadata in my Sharepoint library (not list):

    metadata.png

     

    After I add my data source, I have to edit the Item and write Defaults(MyForm), because if I don't...

    Item.png

     

    Then I get "No item to display" even if I have fields already in the form. It's just blank. No fields to write anything into.

    NoItemToDisplay.png

     

    I also fill in the Data Source:

    DataSource.png

     

    I add the fields:

    AddFields.png

     

    Fields.png

     

    I add my Clear button:

    Clear.png

     

    I add my Submit button:

    Submit.png

     

    I run a test by clicking on the little preview play button, filling in text in the field, and clicking submit:

    Test.png

     

    Here is another screenshot of the error:

    Error.png

     

    I've watched numerous videos and tried following tutorials and stuff, but nobody really explains what exactly I'm submitting TO. Like, where is the data in the text field supposed to go? What I really want is for it to insert content control in a doc template as shown in this tutorial: https://masteroffice365.com/booking-form-leveraging-powerapps-microsoft-word/ but the tutorial does not show how to make the app or the Sharepoint library. I am having a hard time finding info on this.

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 739 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 268

Last 30 days Overall leaderboard