cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shaneOZ
Level 8

Shortcut to change all selected code in code box?

Hi,

 

When i copy and paste some galleries or buttons over etc, the code that appears multiple times is highlighted wherever in the box am i able to somehow just change one piece of the code and all the same code changes ie. 

 

If i select ServBrakCHK and change it too IDUNNOCHK it would change all instances of this>?

If(
    CurrentServBrakCHK = ThisItem.ServBrakCHK || CurrentServBrakCHK = Blank(),
    Set(CurrentServBrakCHK, ThisItem.ServBrakCHK);Patch(ServiceBrakeList, ThisItem, {IsClicked: !ThisItem.IsClicked}),
    Set(CurrentServBrakCHK, ThisItem.ServBrakCHK);UpdateIf(ServiceBrakeList, true, {IsClicked:false});Patch(ServiceBrakeList, ThisItem, {IsClicked: !ThisItem.IsClicked})
)

It would save some time

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Shortcut to change all selected code in code box?

@shaneOZ 

Something else you might like is the Variables screen.  From there you can view all the variables in your app and where they are used.  When trying to rename a variable this will help you make sure the name was changed in every instance.

 

img11.png

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Shortcut to change all selected code in code box?

I just copy + paste the code into notepad and use the replace feature there. It would be nice if PowerApps had all the same features a good text editor does. You could always submit that as an Idea.

—-
Please Accept as Solution if this post answered your question so others can find it faster. If you found this post helpful consider giving it a Thumbs Up.
Super User
Super User

Re: Shortcut to change all selected code in code box?

@shaneOZ 

Something else you might like is the Variables screen.  From there you can view all the variables in your app and where they are used.  When trying to rename a variable this will help you make sure the name was changed in every instance.

 

img11.png

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

shaneOZ
Level 8

Re: Shortcut to change all selected code in code box?

Yeah i did always wonder what that section was for. Cheers, i think by the look of it. Im just going to have to type them in as each one only has three or four instances in this particular app.

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (5,824)