cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

save buton

hi,

my apps has 8 edit form and at the end a buton to save it

and when i try to register there a message "unknow error" any idea?

 

my code for the button

 

onSelect:

If(EditForm1_0.Mode=FormMode.Edit;
Patch(Tableau1;BrowseGallery1.Selected;
EditForm1_0.Updates;
EditForm1_1.Updates;
EditForm1_2.Updates;
EditForm1_3.Updates;
EditForm1_4.Updates;
EditForm1_5.Updates;
EditForm1_6.Updates;
EditForm1_7.Updates);
Patch(Tableau1;Defaults(Tableau1);
EditForm1_0.Updates;
EditForm1_1.Updates;
EditForm1_2.Updates;
EditForm1_3.Updates;
EditForm1_4.Updates;
EditForm1_5.Updates;
EditForm1_6.Updates;
EditForm1_7.Updates))
;;
Navigate(BrowseScreen1;ScreenTransition.Fade )

7 REPLIES 7
Anonymous
Not applicable

Re: save buton

ALZamora
Level: Powered On

Re: save buton

@Anonymous  Not sure if this will solve the issue, but I believe you need to change all the semicolons to commas except for the one between your If and Navigate formulas.

 

If(EditForm1_0.Mode=FormMode.Edit,Patch(Tableau1,BrowseGallery1.Selected,EditForm1_0.Updates,EditForm1_1.Updates,EditForm1_2.Updates,EditForm1_3.Updates,EditForm1_4.Updates,EditForm1_5.Updates,EditForm1_6.Updates,EditForm1_7.Updates),Patch(Tableau1,Defaults(Tableau1),EditForm1_0.Updates,EditForm1_1.Updates,EditForm1_2.Updates,EditForm1_4.Updates,EditForm1_5.Updates,EditForm1_6.Updates,EditForm1_7.Updates));Navigate(BrowseScreen1,ScreenTransition.Fade)

Anonymous
Not applicable

Re: save buton

replacing "," with ";" is just a language mark i think, i try but that's not work

Community Support Team
Community Support Team

Re: save buton

Hi @Anonymous ,

Could you show me more details about your settings? like the gallery's , form's,etc.

I've made a similar test and found that you need to make more settings about Mode in this scenario, you could refer this:

Set the gallery's arrow icon's OnSelect:

Set(a,"Edit");Navigate(Screen3,None)

Set the insert icon's OnSelect:

Set(a,"New");Navigate(Screen3,None)

Set the forms' DefaultMode:

If(a="New",FormMode.New,FormMode.Edit)

Set the forms' item:

Gallery1.Selected

Set the submit button's OnSelect:

If(a="Edit",Patch(table,Gallery1.Selected,Form1.Updates,Form2.Updates),
a="New",Patch(table,Defaults(table),Form1.Updates,Form2.Updates)
);
Navigate(Screen2,None)


5106_LI.jpg

 

 

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.
Anonymous
Not applicable

Re: save buton

hi @v-yutliu-msft 

thanks for trying to help me


i have news about my probleme : in fact the error appear just in the browser apps or in the test part, if the app is used on a phone that's works correctly without error but i don't understand why...

 

new imput button :

NewForm(EditForm1_0);;
NewForm(EditForm1_1);;
NewForm(EditForm1_2);;
NewForm(EditForm1_3);;
NewForm(EditForm1_4);;
NewForm(EditForm1_5);;
NewForm(EditForm1_6);;
NewForm(EditForm1_7);;
Navigate(EditScreen1_0; ScreenTransition.None)

perdu1.png

gallery's arrow :

EditForm(EditForm1_0);;
EditForm(EditForm1_2);;
EditForm(EditForm1_3);;
EditForm(EditForm1_4);;
EditForm(EditForm1_5);;
EditForm(EditForm1_6);;
EditForm(EditForm1_7);;
Navigate(EditScreen1_0; ScreenTransition.None)

perdu2.png

I don't change the submit button

 

form's item is good

 

but what is the a your code?

 

thanks a lot

Anonymous
Not applicable

Re: save buton

UP

Anonymous
Not applicable

Re: save buton

up

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

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

Top Kudoed Authors
Users Online
Currently online: 181 members 4,485 guests
Recent signins:
Please welcome our newest community members: