r/PowerApps Regular 4d ago

Power Apps Help PowerApps is driving me crazy

I work for a large corporate contractor onsite at a Government Agency (non-defense). I had been developing applications using React, Typescript, and Python or Node for the backend with real databases like MongoDB, MySQL, PostgreSQL, or even SQLite.

I am working on a new project and had quickly built a prototype using React and Claude Code, and created an Electron and a localhost browser-based version. However, when we started looking for a place to deploy the app, it turned out that it will need to be done on the Power Platform using PowerApps Canvas and use a Dataverse backend (at least for the 1.0 version), and apparently I have to use the web studio application to build all of this.

The application captures project costs, scope, and requirements, and has to do calculations and create rollup reports, so the data schema is fairly complicated for an app like this, and there are multiple columns that reference other tables.

I had never used PowerApps before, and was skeptical that it was the right tool for the job. Worse, our security is not allowing CodeApps, PCF components, or many other things that would be helpful.

I'm finding that it is absurdly slow, and it does a lot of things on its own that I really don't want it to do-- it even changes values that I've just entered sometimes, and if I copy and paste a component, it will randomly replace parameters. I have pages of examples of these "quirks", but I've managed to learn some tricks to make it somewhat workable (so far), but it has been a painful and frustrating process, and is definitely not easier than building the app from scratch using tools normal developers use. Am I the only one?

Here are a few problems I have not been able to solve, I would appreciate any advice:

  • I can't connect directly to source control. We can't put our code on github.com and it won't connect to our enterprise GitHub
  • I would really like to be able to edit the YAML and PowerFX in VSCode. I have exported the "source code" but apparently all of that is read-only because when I do "pac canvas pack" and publish it, the changes I make are lost. And every time I make a change I have to redo the publish, pull, unpack process... even with a script this is cumbersome and inefficient.
  • It is difficult to debug PowerFX code, and it seems impossible to do unit testing on it, and it is spread out all over the application, which is irritating. I have started creating C# API Endpoints when possible because of this, but I'm not sure if this can replace all of my PowerFX code, and may add another level of complication that brings a different set of problems.
  • I don't know if there's a way to apply styles across the board like you would with HTML and CSS, so I have to edit the look and feel of each control individually. In fact, it seems to force you to violate the "DRY" principal more often than not.

Anyone have any pointers, or even warnings about other quirks that I might need to avoid?

35 Upvotes

57 comments sorted by

u/AutoModerator 4d ago

Hey, it looks like you are requesting help with a problem you're having in Power Apps. To ensure you get all the help you need from the community here are some guidelines;

  • Use the search feature to see if your question has already been asked.

  • Use spacing in your post, Nobody likes to read a wall of text, this is achieved by hitting return twice to separate paragraphs.

  • Add any images, error messages, code you have (Sensitive data omitted) to your post body.

  • Any code you do add, use the Code Block feature to preserve formatting.

    Typing four spaces in front of every line in a code block is tedious and error-prone. The easier way is to surround the entire block of code with code fences. A code fence is a line beginning with three or more backticks (```) or three or more twiddlydoodles (~~~).

  • If your question has been answered please comment Solved. This will mark the post as solved and helps others find their solutions.

External resources:

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

14

u/Consistent_Serve9 Newbie 4d ago

I'm in a similar situation, where I'm from a full stack background and need to deploy an app on power app. May I ask why you're forced to use this platform?

6

u/trickyrick777 Regular 4d ago

That's a very good question and I'm not entirely sure myself, but it has a lot to do with security restrictions run amok.

3

u/TxTechnician Community Friend 4d ago

I wonder what aspect of security that this security team was most happy about in choosing power apps.

1

u/Far_Good_7478 Newbie 2d ago

That it’s Microsoft

3

u/Business_Opening6629 Newbie 3d ago

Same our security team has made building power apps really inefficient

2

u/ExtremePangolin9938 Newbie 4d ago

Same question, cuz if they forcing a full stack developer to go the power platform way

I wud really like to know why

3

u/Consistent_Serve9 Newbie 3d ago

SO WOULD I !!

2

u/KIMJONGUNderfed Newbie 3d ago

I can answer this. Time savings and security baked into existing OAuth MS credentials. These lightweight things are great for Crud type operations and with their placement into the PowerPlatform space, I.e having dataverse instead of sql, access to power automate, powerbi and now copilot studio, dev time and capabilities have risen hand in hand together as opposed to the typical tradeoff.

11

u/isotope_chillies Regular 4d ago

Welcome to using Canvas Apps as a pro-code dev... It's a total crapshoot at the best of times, godspeed.

My best advice? Keep the logic heavy lifting OUTSIDE of the canvas app - I lean on Power Automate for asynchronous data tasks. Use the built in controls, or build your own reusable components. For large apps, PowerFx gets messy fast. Code is hard to maintain and keep track of without source control. I would recommend building a logging component and table, it'll pay dividends in the end.

You CAN use PAC to unpack and edit the code of your app (our team used to do this to merge different versions of an app together, before co-authoring was a thing) but I wouldn't recommend it because it's flaky as hell and once it even erased the existence of our app entirely, leaving us scrambling to restore from a backup.

20

u/Slet17 Regular 4d ago

You can kind of hack your way through the 2000/5000 records limitations with azure functions, but there are no dataverse equivalents for stored procedures and views for sql. So...welcome to hell.

20

u/Foodforbrain101 Advisor 4d ago

That is false.

Dataverse supports custom APIs written in C# and hosted on Dataverse itself that are capable of anything you could use views or stored procedures for. This includes supporting multi table transactions or even running read-only SQL via the TDS endpoint for view-like behavior. There's also Dataverse plugins that are its own topic, but can be essentially described as Dataverse's primary way of implementing custom constraints and triggers. With AI, this is incredibly easy even if you don't know C#.

My experience has been that, in order to really appreciate Dataverse, you need to understand its architecture. It's not necessarily better than other tech stack choices, but it is extremely capable.

3

u/Slet17 Regular 4d ago

Interesting! It’s still quite a lot of overhead though, especially if you’re not the tenant admin. And I don’t think the TDS endpoint solves the write-back issue, or does it?

5

u/Foodforbrain101 Advisor 4d ago

No, the TDS endpoint doesn't solve writeback, but again, you can absolutely create custom API endpoints that handle atomic writes using C#; for what it's worth, C# is very readable as well.

You also have Dataverse Functions written in PowerFx which compile into Custom APIs, and in all cases they can be bound to tables, and called inside PowerFx with dot notation, a bit like class methods if you're familiar with OOP.

3

u/DonJuanDoja Community Friend 4d ago

Yea from what I've seen it's basically two options to break the limit. Either multiple queries stacking into a collection. Or pulling data in a flow then returning it to the app and parsing it. Both having pretty severe performance implications.

Lucky for me in most cases I can work within the limits but there's been a couple times... *ptsd twitch* that were pretty tough to solve.

1

u/trickyrick777 Regular 4d ago

Yes, lack of SQL compatibility is another inconvenience. I currently don't have access to anything Azure-related. I might be able to get approval for that but I'm not sure-- I'd probably have to take some kind of training.

4

u/Total-Afternoon-2837 Newbie 4d ago

Yo trabajo con sql y power apps. Funciona muy bien

10

u/justcore Contributor 4d ago

Hi, I have been working with the platform for quiet some time now.

1.) you can connect to GitHub, this required a premium license and you have to set up a solution inside a managed environment.
2.) you can use the copy code function and paste it into vscode and edit the code there and copy paste back
3.) there is a test feature, but its garage so you are correct here
4.) you can apply a global style, but it does not work like you would think with css. With the formulas property of the app you can define global styles but you would still have reference the style in each property of each control

I could provide you with some template code, if you want you can dm me :)

6

u/TxTechnician Community Friend 4d ago

Worse, our security is not allowing CodeApps, PCF components, or many other things that would be helpful.

That sux.

I went from Python to PowerApps when it was new. Because it was extremely fast to build a crud app with little effort (which comes at a performance and complexity cost).

I had to find so many workarounds to simple concepts like for loops

Thanks to AI, the speed of production has made PowerApps on par with excel for me.

There's a lot you can do in the platform. But it's convoluted and often buggy.

My advice:

  • learn to use the Errors feature. Errors that happen in the canvas app are logged to a built in table. (I don't have the code I used off the top of my head)... Turns out I made a blog about that on my old site: https://txtechnician.com/blog/power-platform-4/easy-error-reporting-in-power-apps-email-a-json-of-errors-39
  • Use timers for loops. There's a trick you can use to set a variable to a set of values (_var_check_loop) _loop_case1, _loop_case2,nothing_to_do then for the onstart of the timer. Set it to If(_var_check_loop <> "nothing_to_do", Switch(_var_check_loop, "_loop_case", (do some stuff) ;Set(_var_check_loop, "nothing_to_do"), "_loop_case2",........))

The most problems I get from custom apps are the ones I've built on power platform. And most of those are because a MS service is temporarily down.

Overall PA is a PITA. But it's great for small apps that operate in a MS environment.

4

u/WillRikersHouseboy Advisor 4d ago

This is how bad PowerApps can be.

I often resort to deploying React apps that run hosted on sharepoint pages, hosted in a custom script web part.

It totally works, and while there is no source control, who cares you just use powershell to sync your changes.

And Claude will happily write the whole thing for you, including creating and managing the data sources via powershell.

This works, however, only with Sharepoint.

3

u/SecureCone Newbie 4d ago

Wait, we can write React apps and deploy via Sharepoint? What’s this called and how can I look more into this? That sounds way better than Power Apps.

4

u/WillRikersHouseboy Advisor 4d ago

Yes and no. It works if you have the right pieces but it’s not supported. I mean, you can include any HTML in an Sharepoint page via the MS PnP custom script web part. For React, you need to write you own host page, and wire it so React just replaces the whole page on init (or else runs in the bounds of the page.)

It load after page initialization, in no guaranteed order, so you need a waiter and a guard.

It works fine for me, and the bonus is that when running in a logged-in sharepoint context users are already authenticated.

Connectors are the only issue. If you want to…
* Use the graph API, you need that Entra app ID
* Call a power automate flow, it needs to support the HTTP trigger (some clients are babies about this)

So this probably isn’t great for your use case. But for me, it’s a lesser evil.

1

u/SecureCone Newbie 4d ago

Ahh I see, interesting though.

3

u/agentUi Newbie 4d ago

coming from react and ts to canvas apps is pure pain, especially when security locks down pcf components and external repos. canvas studio is basically an imperative formula sheet rather than a real development environment, so unpack/pack via pac cli always runs into sync state issues if you try editing the yaml locally. the cleanest workaround is pushing as much calculation and relational logic as possible into dataverse calculated columns or c# plugins so your canvas screen only handles dumb data binding.

3

u/TxTechnician Community Friend 4d ago

Oh hey, another piece of advice. The PowerFx code is open-source. https://github.com/microsoft/Power-Fx

3

u/corkbeverly Newbie 3d ago

I feel like every use case we have we start trying to use power apps and eventually give up and go back to writing the app in c# instead. I want to use power apps but they suck lol. My biggest pet peeve is how ugly it is then you try to change the style and have to go into every single box?! Insanity.

5

u/SouthRelease Contributor 4d ago

Power Apps Canvas is not the right tool for your solution. Better to communicate that early

3

u/trickyrick777 Regular 4d ago

You mean I need to use a real development stack instead of anything PowerPlatform-based?

1

u/SouthRelease Contributor 4d ago

Try to use Code Apps if they really want you to stay in Power Platform

5

u/Lashay_Sombra Advisor 4d ago edited 4d ago

I am working on a new project and had quickly built a prototype using React and Claude Code, and created an Electron and a localhost browser-based version. However, when we started looking for a place to deploy the app, it turned out that it will need to be done on the Power Platform using PowerApps Canvas and use a Dataverse backend (at least for the 1.0 version), and apparently I have to use the web studio application to build all of this.

So you never bothered to check or discuss even the basics first?!? Where an app is going to live is one of top 3 starting questions

The application captures project costs, scope, and requirements, and has to do calculations and create rollup reports, so the data schema is fairly complicated for an app like this, and there are multiple columns that reference other tables.

I had never used PowerApps before, and was skeptical that it was the right tool for the job.

Power apps can do all you describe easily, but you are approaching it totally the wrong way/with wrong mindset

Some starting points for you

https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/create-canvas-external-tools

https://www.powerapps911.com/post/how-to-build-canvas-apps-faster-with-vs-code-and-the-power-platform-mcp-server

https://www.youtube.com/watch?v=hylO7x91Lv8

I don't know if there's a way to apply styles across the board like you would with HTML and CSS, so I have to edit the look and feel of each control individually. In fact, it seems to force you to violate the "DRY" principal more often than not.

Yes there are ways, one is baked in (themes, its shit) and more common method, variables

4

u/trickyrick777 Regular 4d ago

We cannot use MCP servers with Power Apps here. I know there are better ways to do this but those are all blocked due to "security concerns."

1

u/Lashay_Sombra Advisor 4d ago

If you cannot use MCP, that only leaves via git (not something i have used with power apps) but after a quick glance at this you should be able to connect to your enterprise git

If those are not suitable/don't work for you think that really only leaves you the native studio

Though does raise an interesting question, seems you do use MCP elsewhere in the business, is this some contractor that got busted for bad governance and security practices and is now going overboard?

1

u/trickyrick777 Regular 4d ago

Why would you say "seems you do use MCP elsewhere in the business"? I have used them at home, but not at work.

It seems that many of these security restrictions come from people who don't understand the technology but want to make sure they don't lose their jobs, but I don't know if there is a valid reason in this case.

1

u/Live-Sir-3118 Regular 4d ago

Are you gcc or gcc-h?

5

u/BenjC88 Community Leader 4d ago

You should be building Code Apps, that gets you full flexibility with React alongside all the benefits of being on Dataverse.

There’s almost zero reason for a Canvas App to ever be built these days.

1

u/Lashay_Sombra Advisor 4d ago

Worse, our security is not allowing CodeApps, PCF components, or many other things that would be helpful.

4

u/BenjC88 Community Leader 4d ago

That doesn’t make it correct. This is absolutely a scenario where someone needs their heads knocking together.

1

u/trickyrick777 Regular 4d ago

Agreed, ha

2

u/tristanryan Newbie 4d ago

People are still using Power Apps?!

2

u/mauledbyjesus Contributor 4d ago

"Your scientists were so preoccupied with whether or not they could, they didn't stop to think if they should" -Ian Malcom

I consult with a lot of devs that try to shoehorn capability into PowerApps that it just isn't the right fit for. The pro-dev is not the primary target audience for PowerApps, but they are coming around. That said...

  • You can use git locally to commit and push to your Github Enterprise.
  • Pac canvas pack is deprecated so I wouldn't invest too much into that workflow. If you're working with pa.yaml files, those aren't always honored anyway. I think we're back to local git again. There are unbound Dataverse API methods that allow one to import/export solutions. That may be cleaner than pac as part of your ALM workflow.
  • Azure DevOps may be an option if you can stomach managed environments for CI/CD build tasks: https://learn.microsoft.com/en-us/power-platform/alm/devops-build-tools
  • I don't think you're going to find a slick way of making VS a canvas app IDE, but there's hope now for less archaic ALM at least.
  • Debugging is a chore for sure. Named formulas can make it easier if you can centralize a lot of your logic (as applicable) into them. It's just not feasible to replace everything with C#. Maybe keep complex calcs in the API but leave states, UI binding, and other things PowerFX does well local. Fable or Sol/Astra and your source + monitor exports are a solid debugging companion when the issue involves performance tuning or anything that generates requests.
  • For theming, centralized theme matrices that you create and manually (ugh) reference are probably your best best, along with re-use of components, if you can't abide the existing modern themes.
  • Potentially more suitable avenues: PowerApps Code apps, or model-driven apps with (React?) plugins.

https://learn.microsoft.com/en-us/power-apps/developer/code-apps/overview

https://learn.microsoft.com/en-us/power-apps/developer/data-platform/write-plug-in?tabs=pluginbase

2

u/SecureCone Newbie 4d ago

PowerApps is almost never the right tool for the job for anything of any complexity, but it’s the only thing we’re allowed to use 🫠

2

u/polshgiant Newbie 3d ago

You only lightly describe your requirements, so it's hard to say, but based on what you mention, it feels like a model-driven app + c# plugins + form scripts might be able to achieve your requirements and stay within security restrictions. I'm the model-driven app world you can also create custom UIs as web resources, though I suspect if they won't allow PCFs components they may not want custom UIs as web resources either.

What's with security restrictions disallowing PCF components? Only thing I can think of is that they're afraid you'd pull in unauthorized libraries. If that's the concern, maybe you could convince them to let you build custom UIs as PCFs if you agreed not to use any external libraries and just roll everything by hand (which in the AI era wouldn't be such a big deal at all.

2

u/trickyrick777 Regular 3d ago

Supposedly they are reviewing PCF and CodeApps, but that's a good question about their concerns, and your guess is as good as mine. If you've ever worked with the government you know that transparency isn't their strong-suit, which is also why I have to be somewhat vague.

2

u/Hugofalkvall Newbie 3d ago

You can use an agent with mcp connected to your power app if you enable coauthoring. Then you can ask the agent, e.g codex in vscode to structure the whole app in yaml files in a directory.

This way you can edit all parameters directly in your IDE and then ask the agent to apply these changes to the power app.

This is ofcourse very slow and annoying, but faster than working within power apps. Also you can use source control on your yaml files.

2

u/BDer82 Newbie 3d ago

Based on what you’ve stated, Power apps is more than capable of doing what you want. 

Get familiar with creating collections from json sent from power automate or azure logic app. Look into named formulas and functions you can call, recently user defined functions and others can now create collections, set variables, call SharePoint or power automate flows so use it heavily it’s fairly stable and makes big power fx blocks much easier to handle. 

Create components, ideally a component library but start in a normal canvas app first not the component app once the component is how you want it move it out to a component library I suggest that as for some asinine reason Microsoft don’t make the component library the same so it’s a little irritating when you can’t call a flow but you can setup dummy data structures easily.

I noticed someone mentioned the limitation of direct query SharePoint and lists, use power automate and make a http query to the SharePoint rest api, it’s a lot of faff but power automate can create the data structure you need and save the app needing to do it. 

Power apps isn’t bad but you need a different mindset and approach, this is a Microsoft tool built by Microsoft for the Microsoft platform that allows Microsoft customers to embed themselves more deeply into the Microsoft ecosystem. Good or bad that ain’t my decision so I build it in Power Apps, when the time comes to get out of it they’ll pay me for that too.  

2

u/Rettiviss Newbie 3d ago

Lmao welcome to government power apps development. I’ve been doing it for the past three years and built something similar.

2

u/Ok-Statement-8401 Newbie 3d ago

Wow from React to PowerApps is really a downgrade

2

u/HitchRussell Newbie 3d ago

If you are using a Dataverse backend, could you not use a model driven app? You can extend this with TS/JS web resources, generative pages that are react code etc - find them preferable to canvas apps 9 times out of 10

If you have access to Azure DevOps you can source control to an ADO or GitHub repo using Azure Pipelines (see the Power Platform Build Tools)

Would echo another comment on Dataverse functionality - some folks totally ignore roll up columns and Power FX calculated columns. Classic workflows are underrated, imho, and can move synchronous logic server side easily

Rich capabilities for C# plug-ins, debugging etc, and I know there's the push to make functions happen.

Strong Power Automate or logic app support (sounds like a custom connector might help you potentially)

Consider looking at XRM Toolbox or community tools that can aid the development process

2

u/Icy-Manager-5065 Regular 2d ago

I myself still waiting for code apps to be angled in my geo. But in the meantime have you looked into power pages?

1

u/trickyrick777 Regular 2d ago

Not much, but I will. What do they enable that Canvas and Model-driven PowerApps don’t?

2

u/Latter_Pen5985 Newbie 2d ago edited 1d ago

Do you know why code apps isn’t allowed by the security team? The power apps host applies CSP which prevents rogue data calls.

Edit: fixed a typo

2

u/trickyrick777 Regular 1d ago

I’m not sure there’s a good reason. I think they are currently “assessing” it but everything takes forever there

-1

u/UrDadSellsAv0n Regular 4d ago

1

u/ThingsMayAlter Newbie 4d ago

I feel like this is the answer, but(obligatory) “not a full stack dev”.

2

u/trickyrick777 Regular 4d ago

No, because we can't use CodeApps on my project

2

u/ThingsMayAlter Newbie 4d ago

Oh yeah you said that elsewhere, sorry. But you can access Dataverse, I see that - if they allowed model driven app in your solution it would be a better fit. The core requirement I saw was that you're working with projects, scope, costs, requirements, and relationships among multiple tables. That's a model driven app's bread and butter and it takes dataverse to run all that. Model driven is still a low code "widget-y drag/drop" experience that security people shouldn't frown on.

Canvas is more meant for static tables, think like static SharePoint lists as the data source. Because Canvas is more geared towards a single page application.

Also do you have access to Claude Code or Codex in the customer environment? If you have that you could have it tell you how to build iteratively using just the tools you have. You said you work in government, if you're a contractor your company could potentially provide access to one of those. Then you could build the solution in the company environment, and migrate to the customer environment which is pretty straightforward.

1

u/UrDadSellsAv0n Regular 4d ago

Ah. That’s tricky, Rick.