cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Can't separate functions or variables with " ; "

What is the convention for ending lines? I'm following a course where ; is the correct way but it throws an error whenever I attempt it.

 

The way I separated two OnStart Set() functions was

 

Set(someVar1, value1)

+

Set(someVar2, value2)

 

Is this correct?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Consider this:

Set(someVar1, value1);Set(someVar2, value2)

If you want to add the variables:

someVar1+someVar2

 

if the addition is also a variable:

Set(Added,someVar1+someVar2)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

3 REPLIES 3
Super User III
Super User III

Consider this:

Set(someVar1, value1);Set(someVar2, value2)

If you want to add the variables:

someVar1+someVar2

 

if the addition is also a variable:

Set(Added,someVar1+someVar2)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Regular Visitor

Thanks, seems to work. Strange that I can't declare them on separate lines 

it could be on separate lines:

Set(someVar1, value1);
Set(someVar2, value2)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.Set(someVar2, value2)

Helpful resources

Announcements
News & Announcements

Community Blog

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

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (5,440)