cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

SubmitForm function can only work on a form. Wrong kind of control input is given...

All of a sudden, the Submit button stops working, producing this error:

 

paerror.png

 

It was working fine and I changed NOTHING in my EditForm.

 

This is a custom button. The original tick in the upper right corner with exactly the same formula/settings works just fine.

 

Any idea?

55 REPLIES 55
Highlighted
Advocate I
Advocate I

Re: SubmitForm function can only work on a form. Wrong kind of control input is given...

I got a similar issue when PowerApps release changed to 3.19062.18 from 3.19061.14 yesterday. NewForm and SubmitForm function stopped working, just by opening it in the studio and saving as a new version, what was working before stopped working. 

Highlighted
Anonymous
Not applicable

Re: SubmitForm function can only work on a form. Wrong kind of control input is given...

Same here. But only in one of my three environments. 

Highlighted
Community Support
Community Support

Re: SubmitForm function can only work on a form. Wrong kind of control input is given...

Hi @GrischkePro ,

I've made similar test but not met the same problem like your description.

My PowerApps version is 3.19061.14.

I suggest you try to recreate your app.

If the problem still exists, please ask for help here:

https://powerapps.microsoft.com/en-us/support/

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Advocate III
Advocate III

Re: SubmitForm function can only work on a form. Wrong kind of control input is given...

What do you mean by recreate this app? Build a new app from scratch? I don’t think so...

Can this be fixed urgently?
Highlighted
Anonymous
Not applicable

Re: SubmitForm function can only work on a form. Wrong kind of control input is given...

Hello,

 

Agreed. There seems to many posts about SUBMITFORM having issues. I did all variants of rebuilding. Recreated the sql connector. Re-imported from the TEST environment and so on. Actually, this app works fine in the TEST and DEV environments. I did figure out a work around though. I changed the SUBMITFORM to PATCH. 

 

This was a time consuming process as there are 43 datacards in the form. The underlying data is Azure sql and requires a history (shadow) table. PowerApps does not allow database triggers for Azure sql and the Flow triggers have been inconsistent. So I had developed a stored procedure which manages the create/update/delete history. This stored procedure relies on the identity field id_num. Below is an abbreivated version of the code in the app's On Select submit button. I didn't think you would want to see all 43 datacards. I did rename the datacard values with the syntax: dcvSqlColumnName. This allowed me to easily build the Patch command with sql.

 

UpdateContext({DisplayPopup: false, LastIdNum: Blank()});
If(frmContributions.Mode = New, UpdateContext({ Action: "INSERT"}), UpdateContext({Action: "UPDATE"}));
If(
    frmContributions.Mode = FormMode.New,
    ClearCollect(
        NewContributions,
        Patch(
            '[Exodus].[Contributions]',
            Defaults('[Exodus].[Contributions]'),
            {
                EmployerNumber: ddEmployerNumber.Selected.Result,
                ContribsDate: dcvContribsDate.SelectedDate,
                ProvinceResidence: dcvProvinceResidence.Text,
                EEID: Value(dcvEEID.Text),
                MembershipID: Value(dcvMembershipID.Text),
                PensionEECont: Value(dcvPensionEECont.Text),
                PensionableEarnings: Value(dcvPensionableEarnings.Text),
                PensionERCont: Value(dcvPensionERCont.Text)
            }
        )
    );
    UpdateContext({LastIdNum: Last(NewContributions).id_num}),
    Patch(
        '[Exodus].[Contributions]',
        glyEEIDSearch.Selected,
        {
            EmployerNumber: dcvEmployerNumber.Text,
            ContribsDate: dcvContribsDate.SelectedDate,
            ProvinceResidence: dcvProvinceResidence.Text,
            EEID: Value(dcvEEID.Text),
            MembershipID: Value(dcvMembershipID.Text),
            PensionEECont: Value(dcvPensionEECont.Text),
            PensionableEarnings: Value(dcvPensionableEarnings.Text),
            PensionERCont: Value(dcvPensionERCont.Text)
        }
    )
);
Trigger.Run(Action, Coalesce( LastIdNum, Value(dcvid_num.Text)), "Contributions", globalUser);

Highlighted
Advocate III
Advocate III

Re: SubmitForm function can only work on a form. Wrong kind of control input is given...

Hmm I will have to try it, thanks.

 

For now, I restored my app to the previous PowerApps version ending .14 and it's working now, but I made changes in the app since then and I'm really not happy about this.

 

First, iOS app introduced a new bug with date format over the weekend, now this?!

Highlighted
Anonymous
Not applicable

Re: SubmitForm function can only work on a form. Wrong kind of control input is given...


@GrischkePro wrote:
What do you mean by recreate this app? Build a new app from scratch? I don’t think so...

LOL!

Highlighted
Anonymous
Not applicable

Re: SubmitForm function can only work on a form. Wrong kind of control input is given...

Changing all SubmitForm to Patch is no good. That would take me an eternity.

 

Restoring my app to a previous version is no good either, as aside from the lost work, PowerApps would just automatically update the version again, right?

 

Unless you can change the PowerApps version, without reverting your app?

 

People are using this software in their businesses, it is CRITICAL. Smiley Mad

Highlighted
Advocate III
Advocate III

Re: SubmitForm function can only work on a form. Wrong kind of control input is given...

I restored my app to when PowerApps was .14 and it works. I haven’t made that many changes. I’m in meetings today so needed to get it working.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,858)