For Power App developers, writing formulas can throw up some unavoidable errors. Troubleshooting can also be time-consuming and at times this can be due to the smallest errors. However, Microsoft has announced formula repair to help combat these issues. We explain more about this feature that is currently in preview.

What is Formula Repair?

When building apps, makers often encounter errors in formulas which can be time consuming for makers of all skill levels to investigate and resolve. Formula repair can pick up formula errors you might have missed. Using Power Apps, it will try to come up with a fix suggestion leveraging the power of AI. Once a fix has been identified, a single click on the apply button will help you to get rid of the error.

How it works

As mentioned above, this feature uses Power Apps AI to save time and suggest fixes to comment mistakes and errors in formulas, allowing makers to be more productive. 

Intelligent formula report is supported by Program Synthesis using Examples (PROSE)—the same technology used in other Microsoft products like Excel—to help automatically suggest a fix for errors found in a formula. Instead of hours or days, makers can fix their formulas and improve business productivity within just a few seconds.

Using formula repair

The formula repair feature is available for canvas apps and custom pages. The type of errors that can be discovered include:  

  • Missing parenthesis and missing quotes. 
  • Typos, similar to the example for the label control shown later in this article. 
  • Misuse of delimiters and missing operators.  

To find out more about how to enable the feature and start using it head to this article with more details.

Limitations of formula repair

It is important to note that with a feature of this nature, there will be limitations. This feature is also in preview, so we are sure that the more feedback Microsoft receives the better this will get. Here are just a few points to be aware of:  

  • Formula repair won’t be able to determine the expected values when you enter a complete incorrect control name. For example, if your control name is MyLabel and you try to enter WrongLabel. In this instance the formula repair feature won’t be able to determine and suggest you use the formula to reference MyLabel instead of WrongLabel. 
  • Formula repair won’t trigger if your formula has only warnings or isn’t showing any errors (even when the formula is incorrect). 

Overall a great addition to Power Apps, one of the tricky things for citizen developers to learn is the formulas and the process of querying these formulas, with formula repair this is made much easier. To find out more about formula repair or to learn how this could benefit your organisation. Contact our team who can help.