cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GrischkePro
Level: Powered On

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
BluRonnie
Level: Powered On

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. 

emh
Level 8

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. 

Community Support Team
Community Support Team

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.
GrischkePro
Level: Powered On

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?
emh
Level 8

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);

GrischkePro
Level: Powered On

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?!

DE1
Level: Powered On

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
DE1
Level: Powered On

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

GrischkePro
Level: Powered On

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
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 48 members 4,244 guests
Please welcome our newest community members: