cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GrischkePro
Advocate IV
Advocate IV

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
Advocate I
Advocate I

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. 

Anonymous
Not applicable

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

v-yutliu-msft
Community Support
Community Support

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.

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

Can this be fixed urgently?
Anonymous
Not applicable

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

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

Anonymous
Not applicable


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

LOL!

Anonymous
Not applicable

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

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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,873)