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
ALZamora
Helper II
Helper II

@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

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

v-yutliu-msft
Community Support
Community Support

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

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

UP

Anonymous
Not applicable

up

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,329)