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

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";DatoSmiley Very HappyatePicker1.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 Smiley Happy 

- Toby 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Problem with operators

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
Super User
Super User

Re: Problem with operators

Hey @TCH 

 

"&" 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!
TCH
Level: Powered On

Re: Problem with operators

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 Smiley Happy 

Super User
Super User

Re: Problem with operators

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

TCH
Level: Powered On

Re: Problem with operators

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

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

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: 362 members 4,683 guests
Please welcome our newest community members: