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

Problem with operators

Hi guys, 

I am in the process of building an app that connects and adds data to a sharepoint list like so: 

 

Patch(FrokostBestilling_1;Defaults(FrokostBestilling_1);{Titel:"Frokost";Dato:DatePicker1.SelectedDate;Medarbejdernr:TextInput1.Text;Initialer:TextInput2.Text & Navigate(Screen2;ScreenTransition.CoverRight)})

 

Now it works really well, it insert the data to the sharepoint list, and navigates to the next screen, however in the last section befor the navigation the "initialer" it now adds "true" to the end of it(See attached picture), my guess is that it is of course returning "true" because the navigation happens, however is there a way to ensure that it does not add it to the sharepoint list. 

If i remove the "&" operator, it gives me an "error" with the syntax and says that it contains invalid arguments and wrong "symbols", anyone got any suggestions or solutions 🙂 

- Toby 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

You are headed in the right direction, but I think you are using the wrong seperator.  Since I see ';' used where I would normally insert ',' in the rest of your function I assume you are in a locale where the use changes.  Take a look at this paragraph from the documentation.  

 

Formula separators and chaining operator

Some separators and operators will shift based on the decimal separator of the author's language:

Author's language decimal separator PowerApps decimal separator PowerApps list separator PowerApps chaining operator
. (dot or period) . (dot or period) , (comma) ; (semi-colon)
, (comma) , (comma) ; (semi-colon) ;; (double semi-colon)

 

I think the formula you actually need is.

Patch(FrokostBestilling_1;Defaults(FrokostBestilling_1);{Titel:"Frokost";Dato: DatePicker1.SelectedDate;Medarbejdernr:TextInput1.Text;Initialer:TextInput2.Text});;Navigate(Screen2;ScreenTransition.CoverRight)  


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
Highlighted
Dual Super User III
Dual Super User III

Hey @Anonymous 

 

"&" is used to concatenate the strings and the Navigate() function is returning true since the page is navigated properly, hence it is concatenated to the result. Can you try to update the expression as:
 
Patch(FrokostBestilling_1;Defaults(FrokostBestilling_1);{Titel:"Frokost";Dato: DatePicker1.SelectedDate;Medarbejdernr:TextInput1.Text;Initialer:TextInput2.Text});Navigate(Screen2;ScreenTransition.CoverRight)
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
Anonymous
Not applicable

Yeah, this is what i thought as well, however when i update the expression to 

 

Patch(FrokostBestilling_1;Defaults(FrokostBestilling_1);{Titel:"Frokost";Dato: DatePicker1.SelectedDate;Medarbejdernr:TextInput1.Text;Initialer:TextInput2.Text});Navigate(Screen2;ScreenTransition.CoverRight)  

It underlines the semicolon ( ; ) after curlyclose and parenclose at the end, and says that it is an unextected symbol error? 
And i've tried with other symbols just to be on the safe side, but that is the same issue 🙂 

Highlighted
Dual Super User III
Dual Super User III

You are headed in the right direction, but I think you are using the wrong seperator.  Since I see ';' used where I would normally insert ',' in the rest of your function I assume you are in a locale where the use changes.  Take a look at this paragraph from the documentation.  

 

Formula separators and chaining operator

Some separators and operators will shift based on the decimal separator of the author's language:

Author's language decimal separator PowerApps decimal separator PowerApps list separator PowerApps chaining operator
. (dot or period) . (dot or period) , (comma) ; (semi-colon)
, (comma) , (comma) ; (semi-colon) ;; (double semi-colon)

 

I think the formula you actually need is.

Patch(FrokostBestilling_1;Defaults(FrokostBestilling_1);{Titel:"Frokost";Dato: DatePicker1.SelectedDate;Medarbejdernr:TextInput1.Text;Initialer:TextInput2.Text});;Navigate(Screen2;ScreenTransition.CoverRight)  


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Highlighted
Anonymous
Not applicable

Yes of course! Perfect, worked like a charm! thanks very much 🙂 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,119)