I've been wrestling with a few programming limitations, and I hope it's just my lack of knowledge that's the issue.
My organization is beginning to look into PowerApps for SharePoint data display because we don't have any teams large enough to warrant custom code solutions; I'm essentially the only programmer right now. I'm hitting a few walls with the functions natively provided, and most solutions from various Excel boards tell me to use macros and write custom Visual Basic, but I see no such functionality in PowerApps to write custom code.
I'm attempting to make a really interactive UI where many OnSelect clicks in many locations will each fire off dozens of events to change lots of control properties and global variables. It seems that the only solution I have right now is to copy and paste these dozens of formulas into dozens of OnSelect functions, and I don't want to think about the maintenance of this app in the long-term if that's what needs to be done.
Here are a few basic questions to help narrow down my options.
1. Can I fire off multiple events from a single IF statement? (I want to write function blocks but I don't know how.) For example:
IF(condition, (statement; statement; statement; statement), default)
2. Can I edit control properties directly? For example, the first method works, but I can't make 400+ global variables, so I want to use the second method but it doesn't work:
Method 1:
set the OnStart property to
Set(globalVariableXPos, 40)
set the X property of Rectangle1 to
globalVariableXPos
set the OnSelect property of a button to
Set(globalVariableXPos, globalVariableXPos + 40)
Method 2:
set the OnSelect property of a button to
Set(Rectangle1.X, Rectangle1.X + 40)
3. Is there a native way to write custom code in PowerApps, regardless of the language? I keep telling everyone that I can build these solutions from scratch in various languages, but they want quick-and-easy solutions (which continually have bugs and limitations which end up get released with tons of quirks all the time). If I could access the backend of PowerApps to add a bit of functionality and data validation, I can give them quick PowerApps solutions which limit the amount of programming I have to do, but it will still be robust and up-to-spec as I get the time to program these features over time.
Edit: I found the following resource, but I don't want to have to query a server dozens of times to implement basic UI commands and perform general calculations. Is there another way?
https://powerapps.microsoft.com/en-us/blog/using-azure-functions-in-powerapps/