Learn to debug your Power Apps

Published 04-25-2021 08:11 AM 1,175 Views
Senior Member

Head pic for article "Start debugging your Power App"Head pic for article "Start debugging your Power App"

 

Make troubleshooting and understanding single elements easier.

They exist. Those little moments that drive you crazy. Things simply don’t work; they don’t work the way you imagined and you almost despair because it just doesn’t want to go on. Or they break. I swear I didn’t touch anything, yet all of a sudden, my functions are broken. WHAT THE HECK???

I’ve built a few apps by now and I always realize that I have a different view and approach than classic developers. I’m a citizen developer, with no IT knowledge and no technical background, and I’ve learned some useful techniques while building apps that I benefit from with every app. Really, with every app.

I have talked to many people and found that these little tips and tricks can save you a lot of nerves and a lot of frustration. If you haven’t read my blog about 9 things I wish I learned before I build my first Power App, you should check it out, but this one here is the next step. It’s not only about troubleshooting and debugging, but some of those tips will also just keep you sane or teach you good habits that will make your app building experience easier.

So, let’s lift our troubleshoot and debugging experience on the next level

Keep calm and let’s build apps.

 

1. Duplicate your screen

Remember my tip to build your app step by step? If you don’t add all the functionality at once, your app grows over time. At some point your pretty satisfied with your app but you want to try out new things and add others.

If you don’t know how some functions work exactly, always duplicate your screen, before adding new things.

While building your app and adding new functions, you need to add things, you need to delete others to make it work. And you don’t want to mess with the progress you’ve made so far.

A duplicated screen is like an additional save game slot, just to make sure. If you break everything, you can always go back.  

 

Duplicate your screen before trying out new thingsDuplicate your screen before trying out new things

 

2. Use debug label

Label are a life saver in Power Apps. They literally make things visible. Let me show you an example. I have a time app and I control the timer with a variable called Uhr_tickt. If it’s set to true, the clock is ticking, if it’s set to false it isn’t. The “Go!” button sets the variable to true, the stop button sets it to false.  

 

 

While testing your app and adding a new functionality, I tried to make the Reset button work and had a hard time figuring out, why it wasn’t working. Quite often it was because my variable Uhr-tickt wasn’t set the correct way. Is my timer not starting, because the UpdateContext function for my variable wasn’t working or was it something else?

That’s when I added a debug label. It’s a simple label that shows you the status of your variable. This way you can actually see, what’s happening in the background, making debugging and troubleshooting so much easier.

 

Demonstrating how debug label can give you information of the state of a varible

3. Build a button

Build a button to test a function. If it works, include it in your desired function.

I’ve said this a million times before, but it is the most helpful habit, ever. If you want to add a new functionality, don’t put it on top of that main function you have. Insert a button and try the new functionality on that button. If it works, add it to the place where you want to have it.

But if it doesn’t work, you will never wonder where the error is.

 

 

 

4. Snap to align

Okay, this one is a mini tipp: Did you ever try to align some buttons or elements and the snap to align functionality drives you crazy? Often it helps to arrange your elements but sometimes it’s your worst enemy.

Did you know, that you can disable this function by holding the Alt-Key while placing elements? 

 

5. Use more Excel

Whaaaat? More Excel, are you sure? Okay, hear me out. Did you know, that Power FX (the syntax used in Power Apps) is based to Excel functionalities.

I’m pretty sure you’ve seen that If-Statement before, haven’t you? That is because Power FX is designed for people who are familiar with Excel functions.

But how can we make use of it?

I often have a hard time trying to visualize how my data sources work. If I want to write a functional VLOOKUP function, I need to see my tables. That can be difficult with Power Apps because your tables may be anywhere. Somebody gave me the tip to try out difficult functions (AN: like nested if-functions) (another AN: Try to avoid nested if-functions at ALL costs) in Excel. When they work you can replace the fields in your formula with the fields you need in your Power App.

 

6. …but it worked a minute ago

Do you know that: You swear you haven’t touched anything, yet all of sudden nothing works anymore? I’ve been there too, and still am from time to time. It happens. Here’s what you do, first thing:

Check your connections. Are they all working fine? No? Go fix them.

Did you just change anything in your data source? Are you sure? Update them anyway.

Did that help already? Good, I thought so.

Check your connections and data sources every once in a while. If you add another column to that SharePoint list and didn’t update your data source….well. It’s a common pitfall, just remember to check those things.

Something else about data sources. If you use SharePoint or Excel in your OneDrive (and yes, both can be very valid data sources, don’t let any “IT pro” tell you something different), consider that not everyone in your organization has access to those. If you published and shared your app, ask yourself if everyone who wants to use it has access to the data source you used.

 

7. Name the elements you use, as you build them

Develop the habit of re-naming your screens and elements as you build them. That will keep you a lot of frustration and time. Especially if you have multiple screens, apps can become crowdy. So every time you add another function or you want to try something new, unnamed elements can not only cause unnecessary extra work to find the right element you’re looking for. It can also be frustrating, when you keep adding the wrong elements to your function and that causes it to not work. It can be a serious source of errors.

 

a bunch of unnamed labels and elementsa bunch of unnamed labels and elements

 

Which label shows you variable and which is just some explanatory text?

8. Learn what the result view is

I haven’t used it for too long because nobody explained it to me. But this a so important to understand in order to learn what it needs for functions to work properly. If you click on functions you can get two important views. The result view and the data type.

By clicking on Office365User the formular bar shows you the original record with all elements.

 

If it’s not showing at first, click on the little arrow next to the function.If it’s not showing at first, click on the little arrow next to the function.

 

If it’s not showing at first, click on the little arrow next to the function.

 

 

 

This way you can see, what kind of records are stored and what data you can work with.

If you click on the next part of the function DisplayName Power Apps will show you what this function does AND what data type you get.

 

That helps you understanding complex formulars (try it with a filter function to examine what it does) and also how to work with the data. Do you know the error message “This formula expects data of the type value”? If a functions give you data type text, like in the Office365Users example above, you can’t use it in a function that needs a value to work. Here is a comparison between the Now() and the Today() function. The output looks similar, but it’s different data types. DateTime is some else than Date.

 

Difference of functions Now and TodayDifference of functions Now and Today

 

Difference of functions Now and TodayDifference of functions Now and Today

 

The formular bar shows it to you, which might help you debugging your app and functions.

 

9. Dear Diary….

Document what you just learned. Like a learning diary. You will need this knowledge later and you can recycle bits and pieces you’ve once build again and again. Already countless times I was relieved to have written down insights and functions. That way, I can always check back to see how they work. This saves me a lot of time and above all frustration.

Also, the brain processes things differently when you not only think about them but write them down. This additional occupation with learning content consolidates what you just learned.

 

10. The world gains beauty through all its colors

If you want to make your app pretty and professional (I recommend Luise Freese’s latest blog “How to beautify your Power Apps” on that) you want to use more then the set of standard colors. But I can be a lot of work to paste all the color codes in every single element you have in your app.

But it’s very handy to set your colors in labels to make sure you can quickly use the correct colors.

Set up a label for every color you want to use and set the Color value as you like. To not get confused later on, set the Text value to something clear, like BackgroundColor or IconColor and remember to rename the labels in the Tree view as well (see tipp #7).

Now, whenever you want to use that color you don’t need to remember or copy the Hexcode, but just set the value to your color label by using IconColor.Color.

Quick, easy and you will always use the correct color without much effort.

 
Two labels for my most used colors

Fill value of the Rectangle_backgroundFill value of the Rectangle_background

 

Color value of the Icon_heartColor value of the Icon_heart

 

Here you see the Fill and Color values, set by the labels we defined earlier.

 

There we have it. That are 10 tipps on how to start debugging your app.

Do you like them? Do you have more tipps for me? I’m always happy to get new ideas and hints because I am far from being an expert and I’m always learning

%3CLINGO-SUB%20id%3D%22lingo-sub-2288271%22%20slang%3D%22en-US%22%3ELearn%20to%20debug%20your%20Power%20Apps%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2288271%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Debugging_Pic.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275359i4BB2129BA59E8E76%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Debugging_Pic.png%22%20alt%3D%22Head%20pic%20for%20article%20%26quot%3BStart%20debugging%20your%20Power%20App%26quot%3B%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EHead%20pic%20for%20article%20%22Start%20debugging%20your%20Power%20App%22%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EMake%20troubleshooting%20and%20understanding%20single%20elements%20easier.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EThey%20exist.%20Those%20little%20moments%20that%20drive%20you%20crazy.%20Things%20simply%20don%E2%80%99t%20work%3B%20they%20don%E2%80%99t%20work%20the%20way%20you%20imagined%20and%20you%20almost%20despair%20because%20it%20just%20doesn%E2%80%99t%20want%20to%20go%20on.%20Or%20they%20break.%20I%20swear%20I%20didn%E2%80%99t%20touch%20anything%2C%20yet%20all%20of%20a%20sudden%2C%20my%20functions%20are%20broken.%20WHAT%20THE%20HECK%3F%3F%3F%3C%2FP%3E%0A%3CP%3EI%E2%80%99ve%20built%20a%20few%20apps%20by%20now%20and%20I%20always%20realize%20that%20I%20have%20a%20different%20view%20and%20approach%20than%20classic%20developers.%20I%E2%80%99m%20a%20citizen%20developer%2C%20with%20no%20IT%20knowledge%20and%20no%20technical%20background%2C%20and%20I%E2%80%99ve%20learned%20some%20useful%20techniques%20while%20building%20apps%20that%20I%20benefit%20from%20with%20every%20app.%20Really%2C%20with%20every%20app.%3C%2FP%3E%0A%3CP%3EI%20have%20talked%20to%20many%20people%20and%20found%20that%20these%20little%20tips%20and%20tricks%20can%20save%20you%20a%20lot%20of%20nerves%20and%20a%20lot%20of%20frustration.%20If%20you%20haven%E2%80%99t%20read%20my%20blog%20about%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgezeitenbrand.de%2Fwhat-i-as-a-non-dev-learned-as-i-created-my-first-power-app%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E9%20things%20I%20wish%20I%20learned%20before%20I%20build%20my%20first%20Power%20App%3C%2FA%3E%2C%20you%20should%20check%20it%20out%2C%20but%20this%20one%20here%20is%20the%20next%20step.%20It%E2%80%99s%20not%20only%20about%20troubleshooting%20and%20debugging%2C%20but%20some%20of%20those%20tips%20will%20also%20just%20keep%20you%20sane%20or%20teach%20you%20good%20habits%20that%20will%20make%20your%20app%20building%20experience%20easier.%3C%2FP%3E%0A%3CP%3ESo%2C%20let%E2%80%99s%20lift%20our%20troubleshoot%20and%20debugging%20experience%20on%20the%20next%20level%3C%2FP%3E%0A%3CP%3EKeep%20calm%20and%20let%E2%80%99s%20build%20apps.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--492704049%22%20id%3D%22toc-hId--492704916%22%3E1.%20Duplicate%20your%20screen%3C%2FH2%3E%0A%3CP%3ERemember%20my%20tip%20to%20build%20your%20app%20step%20by%20step%3F%20If%20you%20don%E2%80%99t%20add%20all%20the%20functionality%20at%20once%2C%20your%20app%20grows%20over%20time.%20At%20some%20point%20your%20pretty%20satisfied%20with%20your%20app%20but%20you%20want%20to%20try%20out%20new%20things%20and%20add%20others.%3C%2FP%3E%0A%3CP%3EIf%20you%20don%E2%80%99t%20know%20how%20some%20functions%20work%20exactly%2C%20always%20duplicate%20your%20screen%2C%20before%20adding%20new%20things.%3C%2FP%3E%0A%3CP%3EWhile%20building%20your%20app%20and%20adding%20new%20functions%2C%20you%20need%20to%20add%20things%2C%20you%20need%20to%20delete%20others%20to%20make%20it%20work.%20And%20you%20don%E2%80%99t%20want%20to%20mess%20with%20the%20progress%20you%E2%80%99ve%20made%20so%20far.%3C%2FP%3E%0A%3CP%3EA%20duplicated%20screen%20is%20like%20an%20additional%20save%20game%20slot%2C%20just%20to%20make%20sure.%20If%20you%20break%20everything%2C%20you%20can%20always%20go%20back.%20%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20class%3D%22wp-block-image%22%3E%0A%3CFIGURE%20class%3D%22aligncenter%20size-large%22%3E%0A%3CDIV%20id%3D%22tinyMceEditorGezeitenbrand42_13%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture1.png%22%20style%3D%22width%3A%20365px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275360iF45067F3457A6021%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture1.png%22%20alt%3D%22Duplicate%20your%20screen%20before%20trying%20out%20new%20things%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EDuplicate%20your%20screen%20before%20trying%20out%20new%20things%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CFIGCAPTION%3E%3C%2FFIGCAPTION%3E%0A%3C%2FFIGURE%3E%0A%3C%2FDIV%3E%0A%3CH2%20id%3D%22toc-hId-1994808784%22%20id%3D%22toc-hId-1994807917%22%3E2.%20Use%20debug%20label%3C%2FH2%3E%0A%3CP%3ELabel%20are%20a%20life%20saver%20in%20Power%20Apps.%20They%20literally%20make%20things%20visible.%20Let%20me%20show%20you%20an%20example.%20I%20have%20a%20time%20app%20and%20I%20control%20the%20timer%20with%20a%20variable%20called%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3EUhr_tickt%3C%2FCODE%3E.%20If%20it%E2%80%99s%20set%20to%20true%2C%20the%20clock%20is%20ticking%2C%20if%20it%E2%80%99s%20set%20to%20false%20it%20isn%E2%80%99t.%20The%20%E2%80%9CGo!%E2%80%9D%20button%20sets%20the%20variable%20to%20true%2C%20the%20stop%20button%20sets%20it%20to%20false.%20%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20class%3D%22wp-block-image%22%3E%0A%3CFIGURE%20class%3D%22aligncenter%20size-large%22%3E%0A%3CDIV%20id%3D%22tinyMceEditorGezeitenbrand42_14%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CFIGCAPTION%3E%3C%2FFIGCAPTION%3E%0A%3C%2FFIGURE%3E%0A%3C%2FDIV%3E%0A%3CP%3EWhile%20testing%20your%20app%20and%20adding%20a%20new%20functionality%2C%20I%20tried%20to%20make%20the%20Reset%20button%20work%20and%20had%20a%20hard%20time%20figuring%20out%2C%20why%20it%20wasn%E2%80%99t%20working.%20Quite%20often%20it%20was%20because%20my%20variable%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3EUhr-tickt%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ewasn%E2%80%99t%20set%20the%20correct%20way.%20Is%20my%20timer%20not%20starting%2C%20because%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EUpdateContext%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efunction%20for%20my%20variable%20wasn%E2%80%99t%20working%20or%20was%20it%20something%20else%3F%3C%2FP%3E%0A%3CP%3EThat%E2%80%99s%20when%20I%20added%20a%20debug%20label.%20It%E2%80%99s%20a%20simple%20label%20that%20shows%20you%20the%20status%20of%20your%20variable.%20This%20way%20you%20can%20actually%20see%2C%20what%E2%80%99s%20happening%20in%20the%20background%2C%20making%20debugging%20and%20troubleshooting%20so%20much%20easier.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CFIGURE%20class%3D%22wp-block-video%20aligncenter%22%3E%3CVIDEO%20src%3D%22https%3A%2F%2Fgezeitenbrand.de%2Fwp-content%2Fuploads%2FTime-Control-App.mp4%22%20controls%3D%22controls%22%20width%3D%22300%22%20height%3D%22150%22%3E%3C%2FVIDEO%3E%0A%3CFIGCAPTION%3EDemonstrating%20how%20debug%20label%20can%20give%20you%20information%20of%20the%20state%20of%20a%20varible%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FFIGCAPTION%3E%0A%3C%2FFIGURE%3E%0A%3CH2%20id%3D%22toc-hId-187354321%22%20id%3D%22toc-hId-187353454%22%3E3.%20Build%20a%20button%3C%2FH2%3E%0A%3CP%3EBuild%20a%20button%20to%20test%20a%20function.%20If%20it%20works%2C%20include%20it%20in%20your%20desired%20function.%3C%2FP%3E%0A%3CP%3EI%E2%80%99ve%20said%20this%20a%20million%20times%20before%2C%20but%20it%20is%20the%20most%20helpful%20habit%2C%20ever.%20If%20you%20want%20to%20add%20a%20new%20functionality%2C%20don%E2%80%99t%20put%20it%20on%20top%20of%20that%20main%20function%20you%20have.%20Insert%20a%20button%20and%20try%20the%20new%20functionality%20on%20that%20button.%20If%20it%20works%2C%20add%20it%20to%20the%20place%20where%20you%20want%20to%20have%20it.%3C%2FP%3E%0A%3CP%3EBut%20if%20it%20doesn%E2%80%99t%20work%2C%20you%20will%20never%20wonder%20where%20the%20error%20is.%3C%2FP%3E%0A%3CDIV%20class%3D%22wp-block-image%22%3E%0A%3CFIGURE%20class%3D%22aligncenter%20size-large%22%3E%0A%3CDIV%20id%3D%22tinyMceEditorGezeitenbrand42_15%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FFIGURE%3E%0A%3C%2FDIV%3E%0A%3CH2%20id%3D%22toc-hId--1620100142%22%20id%3D%22toc-hId--1620101009%22%3E4.%20Snap%20to%20align%3C%2FH2%3E%0A%3CP%3EOkay%2C%20this%20one%20is%20a%20mini%20tipp%3A%20Did%20you%20ever%20try%20to%20align%20some%20buttons%20or%20elements%20and%20the%20snap%20to%20align%20functionality%20drives%20you%20crazy%3F%20Often%20it%20helps%20to%20arrange%20your%20elements%20but%20sometimes%20it%E2%80%99s%20your%20worst%20enemy.%3C%2FP%3E%0A%3CP%3EDid%20you%20know%2C%20that%20you%20can%20disable%20this%20function%20by%20holding%20the%20Alt-Key%20while%20placing%20elements%3F%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-867412691%22%20id%3D%22toc-hId-867411824%22%3E5.%20Use%20more%20Excel%3C%2FH2%3E%0A%3CP%3EWhaaaat%3F%20More%20Excel%2C%20are%20you%20sure%3F%20Okay%2C%20hear%20me%20out.%20Did%20you%20know%2C%20that%20Power%20FX%20(the%20syntax%20used%20in%20Power%20Apps)%20is%20based%20to%20Excel%20functionalities.%3C%2FP%3E%0A%3CP%3EI%E2%80%99m%20pretty%20sure%20you%E2%80%99ve%20seen%20that%20If-Statement%20before%2C%20haven%E2%80%99t%20you%3F%20That%20is%20because%20Power%20FX%20is%20designed%20for%20people%20who%20are%20familiar%20with%20Excel%20functions.%3C%2FP%3E%0A%3CP%3EBut%20how%20can%20we%20make%20use%20of%20it%3F%3C%2FP%3E%0A%3CP%3EI%20often%20have%20a%20hard%20time%20trying%20to%20visualize%20how%20my%20data%20sources%20work.%20If%20I%20want%20to%20write%20a%20functional%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EVLOOKUP%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSTRONG%3Efunction%2C%20I%20need%20to%20see%20my%20tables.%20That%20can%20be%20difficult%20with%20Power%20Apps%20because%20your%20tables%20may%20be%20anywhere.%20Somebody%20gave%20me%20the%20tip%20to%20try%20out%20difficult%20functions%20(AN%3A%20like%20nested%20if-functions)%20(another%20AN%3A%20Try%20to%20avoid%20nested%20if-functions%20at%20ALL%20costs)%20in%20Excel.%20When%20they%20work%20you%20can%20replace%20the%20fields%20in%20your%20formula%20with%20the%20fields%20you%20need%20in%20your%20Power%20App.%3C%2FP%3E%0A%3CDIV%20class%3D%22wp-block-image%22%3E%0A%3CFIGURE%20class%3D%22aligncenter%20size-large%22%3E%0A%3CDIV%20id%3D%22tinyMceEditorGezeitenbrand42_16%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FFIGURE%3E%0A%3C%2FDIV%3E%0A%3CH2%20id%3D%22toc-hId--940041772%22%20id%3D%22toc-hId--940042639%22%3E6.%20%E2%80%A6but%20it%20worked%20a%20minute%20ago%3C%2FH2%3E%0A%3CP%3EDo%20you%20know%20that%3A%20You%20swear%20you%20haven%E2%80%99t%20touched%20anything%2C%20yet%20all%20of%20sudden%20nothing%20works%20anymore%3F%20I%E2%80%99ve%20been%20there%20too%2C%20and%20still%20am%20from%20time%20to%20time.%20It%20happens.%20Here%E2%80%99s%20what%20you%20do%2C%20first%20thing%3A%3C%2FP%3E%0A%3CP%3ECheck%20your%20connections.%20Are%20they%20all%20working%20fine%3F%20No%3F%20Go%20fix%20them.%3C%2FP%3E%0A%3CP%3EDid%20you%20just%20change%20anything%20in%20your%20data%20source%3F%20Are%20you%20sure%3F%20Update%20them%20anyway.%3C%2FP%3E%0A%3CP%3EDid%20that%20help%20already%3F%20Good%2C%20I%20thought%20so.%3C%2FP%3E%0A%3CP%3ECheck%20your%20connections%20and%20data%20sources%20every%20once%20in%20a%20while.%20If%20you%20add%20another%20column%20to%20that%20SharePoint%20list%20and%20didn%E2%80%99t%20update%20your%20data%20source%E2%80%A6.well.%20It%E2%80%99s%20a%20common%20pitfall%2C%20just%20remember%20to%20check%20those%20things.%3C%2FP%3E%0A%3CP%3ESomething%20else%20about%20data%20sources.%20If%20you%20use%20SharePoint%20or%20Excel%20in%20your%20OneDrive%20(and%20yes%2C%20both%20can%20be%20very%20valid%20data%20sources%2C%20don%E2%80%99t%20let%20any%20%E2%80%9CIT%20pro%E2%80%9D%20tell%20you%20something%20different)%2C%20consider%20that%20not%20everyone%20in%20your%20organization%20has%20access%20to%20those.%20If%20you%20published%20and%20shared%20your%20app%2C%20ask%20yourself%20if%20everyone%20who%20wants%20to%20use%20it%20has%20access%20to%20the%20data%20source%20you%20used.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1547471061%22%20id%3D%22toc-hId-1547470194%22%3E7.%20Name%20the%20elements%20you%20use%2C%20as%20you%20build%20them%3C%2FH2%3E%0A%3CP%3EDevelop%20the%20habit%20of%20re-naming%20your%20screens%20and%20elements%20as%20you%20build%20them.%20That%20will%20keep%20you%20a%20lot%20of%20frustration%20and%20time.%20Especially%20if%20you%20have%20multiple%20screens%2C%20apps%20can%20become%20crowdy.%20So%20every%20time%20you%20add%20another%20function%20or%20you%20want%20to%20try%20something%20new%2C%20unnamed%20elements%20can%20not%20only%20cause%20unnecessary%20extra%20work%20to%20find%20the%20right%20element%20you%E2%80%99re%20looking%20for.%20It%20can%20also%20be%20frustrating%2C%20when%20you%20keep%20adding%20the%20wrong%20elements%20to%20your%20function%20and%20that%20causes%20it%20to%20not%20work.%20It%20can%20be%20a%20serious%20source%20of%20errors.%3C%2FP%3E%0A%3CDIV%20class%3D%22wp-block-image%22%3E%0A%3CFIGURE%20class%3D%22aligncenter%20size-large%22%3E%0A%3CDIV%20id%3D%22tinyMceEditorGezeitenbrand42_17%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture5.png%22%20style%3D%22width%3A%20357px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275365i8A24092F0653DDEB%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture5.png%22%20alt%3D%22a%20bunch%20of%20unnamed%20labels%20and%20elements%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Ea%20bunch%20of%20unnamed%20labels%20and%20elements%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CFIGCAPTION%3EWhich%20label%20shows%20you%20variable%20and%20which%20is%20just%20some%20explanatory%20text%3F%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FFIGCAPTION%3E%0A%3C%2FFIGURE%3E%0A%3C%2FDIV%3E%0A%3CH2%20id%3D%22toc-hId--259983402%22%20id%3D%22toc-hId--259984269%22%3E8.%20Learn%20what%20the%20result%20view%20is%3C%2FH2%3E%0A%3CP%3EI%20haven%E2%80%99t%20used%20it%20for%20too%20long%20because%20nobody%20explained%20it%20to%20me.%20But%20this%20a%20so%20important%20to%20understand%20in%20order%20to%20learn%20what%20it%20needs%20for%20functions%20to%20work%20properly.%20If%20you%20click%20on%20functions%20you%20can%20get%20two%20important%20views.%20The%20result%20view%20and%20the%20data%20type.%3C%2FP%3E%0A%3CP%3EBy%20clicking%20on%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3EOffice365User%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ethe%20formular%20bar%20shows%20you%20the%20original%20record%20with%20all%20elements.%3C%2FP%3E%0A%3CDIV%20class%3D%22wp-block-image%22%3E%0A%3CFIGURE%20class%3D%22aligncenter%20size-large%22%3E%0A%3CDIV%20id%3D%22tinyMceEditorGezeitenbrand42_18%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture6.png%22%20style%3D%22width%3A%20274px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275366iB6A15D561F9DBC7F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture6.png%22%20alt%3D%22If%20it%E2%80%99s%20not%20showing%20at%20first%2C%20click%20on%20the%20little%20arrow%20next%20to%20the%20function.%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EIf%20it%E2%80%99s%20not%20showing%20at%20first%2C%20click%20on%20the%20little%20arrow%20next%20to%20the%20function.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CFIGCAPTION%3EIf%20it%E2%80%99s%20not%20showing%20at%20first%2C%20click%20on%20the%20little%20arrow%20next%20to%20the%20function.%3C%2FFIGCAPTION%3E%0A%3C%2FFIGURE%3E%0A%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20class%3D%22wp-block-image%22%3E%0A%3CFIGURE%20class%3D%22aligncenter%20size-large%22%3E%0A%3CDIV%20id%3D%22tinyMceEditorGezeitenbrand42_19%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FFIGURE%3E%0A%3C%2FDIV%3E%0A%3CP%3EThis%20way%20you%20can%20see%2C%20what%20kind%20of%20records%20are%20stored%20and%20what%20data%20you%20can%20work%20with.%3C%2FP%3E%0A%3CP%3EIf%20you%20click%20on%20the%20next%20part%20of%20the%20function%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3EDisplayName%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EPower%20Apps%20will%20show%20you%20what%20this%20function%20does%20AND%20what%20data%20type%20you%20get.%3C%2FP%3E%0A%3CDIV%20class%3D%22wp-block-image%22%3E%0A%3CFIGURE%20class%3D%22aligncenter%20size-large%22%3E%0A%3CDIV%20id%3D%22tinyMceEditorGezeitenbrand42_20%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CFIGCAPTION%3E%3C%2FFIGCAPTION%3E%0A%3C%2FFIGURE%3E%0A%3C%2FDIV%3E%0A%3CP%3EThat%20helps%20you%20understanding%20complex%20formulars%20(try%20it%20with%20a%20filter%20function%20to%20examine%20what%20it%20does)%20and%20also%20how%20to%20work%20with%20the%20data.%20Do%20you%20know%20the%20error%20message%20%E2%80%9CThis%20formula%20expects%20data%20of%20the%20type%20value%E2%80%9D%3F%20If%20a%20functions%20give%20you%20data%20type%20text%2C%20like%20in%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3EOffice365Users%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eexample%20above%2C%20you%20can%E2%80%99t%20use%20it%20in%20a%20function%20that%20needs%20a%20value%20to%20work.%20Here%20is%20a%20comparison%20between%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3ENow()%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3EToday()%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efunction.%20The%20output%20looks%20similar%2C%20but%20it%E2%80%99s%20different%20data%20types.%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EDateTime%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSTRONG%3Eis%20some%20else%20than%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EDate%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CDIV%20class%3D%22wp-block-image%22%3E%0A%3CFIGURE%20class%3D%22aligncenter%20size-large%22%3E%0A%3CDIV%20id%3D%22tinyMceEditorGezeitenbrand42_21%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture9.png%22%20style%3D%22width%3A%20293px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275369i5544F2AEEE2487E5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture9.png%22%20alt%3D%22Difference%20of%20functions%20Now%20and%20Today%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EDifference%20of%20functions%20Now%20and%20Today%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture10.png%22%20style%3D%22width%3A%20293px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275370iBE35CC9761C182D6%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture10.png%22%20alt%3D%22Difference%20of%20functions%20Now%20and%20Today%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EDifference%20of%20functions%20Now%20and%20Today%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FFIGURE%3E%0A%3C%2FDIV%3E%0A%3CP%3EThe%20formular%20bar%20shows%20it%20to%20you%2C%20which%20might%20help%20you%20debugging%20your%20app%20and%20functions.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--2067437865%22%20id%3D%22toc-hId--2067438732%22%3E9.%20Dear%20Diary%E2%80%A6.%3C%2FH2%3E%0A%3CP%3EDocument%20what%20you%20just%20learned.%20Like%20a%20learning%20diary.%20You%20will%20need%20this%20knowledge%20later%20and%20you%20can%20recycle%20bits%20and%20pieces%20you%E2%80%99ve%20once%20build%20again%20and%20again.%20Already%20countless%20times%20I%20was%20relieved%20to%20have%20written%20down%20insights%20and%20functions.%20That%20way%2C%20I%20can%20always%20check%20back%20to%20see%20how%20they%20work.%20This%20saves%20me%20a%20lot%20of%20time%20and%20above%20all%20frustration.%3C%2FP%3E%0A%3CP%3EAlso%2C%20the%20brain%20processes%20things%20differently%20when%20you%20not%20only%20think%20about%20them%20but%20write%20them%20down.%20This%20additional%20occupation%20with%20learning%20content%20consolidates%20what%20you%20just%20learned.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-420074968%22%20id%3D%22toc-hId-420074101%22%3E10.%20The%20world%20gains%20beauty%20through%20all%20its%20colors%3C%2FH2%3E%0A%3CP%3EIf%20you%20want%20to%20make%20your%20app%20pretty%20and%20professional%20(I%20recommend%20Luise%20Freese%E2%80%99s%20latest%20blog%20%E2%80%9C%3CA%20href%3D%22https%3A%2F%2Fm365princess.com%2Fhow-to-beautify-your-power-apps%2F%22%20target%3D%22_blank%22%20rel%3D%22noreferrer%20noopener%20nofollow%22%20aria-label%3D%22undefined%20(opens%20in%20a%20new%20tab)%22%3EHow%20to%20beautify%20your%20Power%20Apps%3C%2FA%3E%E2%80%9D%20on%20that)%20you%20want%20to%20use%20more%20then%20the%20set%20of%20standard%20colors.%20But%20I%20can%20be%20a%20lot%20of%20work%20to%20paste%20all%20the%20color%20codes%20in%20every%20single%20element%20you%20have%20in%20your%20app.%3C%2FP%3E%0A%3CP%3EBut%20it%E2%80%99s%20very%20handy%20to%20set%20your%20colors%20in%20labels%20to%20make%20sure%20you%20can%20quickly%20use%20the%20correct%20colors.%3C%2FP%3E%0A%3CP%3ESet%20up%20a%20label%20for%20every%20color%20you%20want%20to%20use%20and%20set%20the%20Color%20value%20as%20you%20like.%20To%20not%20get%20confused%20later%20on%2C%20set%20the%20Text%20value%20to%20something%20clear%2C%20like%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%3EBackgroundColor%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eor%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%3EIconColor%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FEM%3Eand%20remember%20to%20rename%20the%20labels%20in%20the%20Tree%20view%20as%20well%20(see%20tipp%20%237).%3C%2FP%3E%0A%3CP%3ENow%2C%20whenever%20you%20want%20to%20use%20that%20color%20you%20don%E2%80%99t%20need%20to%20remember%20or%20copy%20the%20Hexcode%2C%20but%20just%20set%20the%20value%20to%20your%20color%20label%20by%20using%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3EIconColor.Color%3C%2FCODE%3E.%3C%2FP%3E%0A%3CP%3EQuick%2C%20easy%20and%20you%20will%20always%20use%20the%20correct%20color%20without%20much%20effort.%3C%2FP%3E%0A%3CDIV%20class%3D%22wp-block-image%22%3E%0A%3CFIGURE%20class%3D%22aligncenter%20size-large%22%3E%0A%3CDIV%20id%3D%22tinyMceEditorGezeitenbrand42_23%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CFIGCAPTION%3ETwo%20labels%20for%20my%20most%20used%20colors%3C%2FFIGCAPTION%3E%0A%3C%2FFIGURE%3E%0A%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture12.png%22%20style%3D%22width%3A%20416px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275379iC9D6621F8554C554%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture12.png%22%20alt%3D%22Fill%20value%20of%20the%20Rectangle_background%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EFill%20value%20of%20the%20Rectangle_background%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture13.png%22%20style%3D%22width%3A%20416px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275374i363F84D05A3F3466%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture13.png%22%20alt%3D%22Color%20value%20of%20the%20Icon_heart%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EColor%20value%20of%20the%20Icon_heart%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHere%20you%20see%20the%20Fill%20and%20Color%20values%2C%20set%20by%20the%20labels%20we%20defined%20earlier.%3C%2FP%3E%0A%3CDIV%20class%3D%22wp-block-image%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CHR%20%2F%3E%0A%3CP%3EThere%20we%20have%20it.%20That%20are%2010%20tipps%20on%20how%20to%20start%20debugging%20your%20app.%3C%2FP%3E%0A%3CP%3EDo%20you%20like%20them%3F%20Do%20you%20have%20more%20tipps%20for%20me%3F%20I%E2%80%99m%20always%20happy%20to%20get%20new%20ideas%20and%20hints%20because%20I%20am%20far%20from%20being%20an%20expert%20and%20I%E2%80%99m%20always%20learning%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2288271%22%20slang%3D%22en-US%22%3E%3CP%3EKnow%20that%20feeling%20when%20you're%20stuck%3F%20This%20is%20how%20to%20debug%20your%20Power%20Apps.%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Co-Authors
Version history
Last update:
‎Apr 25 2021 08:11 AM
Updated by: