Hide Pesky Default Messages in Single Page Power Apps

I like single page apps. One with a little gallery and a little form, a button, a title and voila, it’s good to go. Unfortunately, Microsoft has added some not so useful text in the form. You’ve probably been exasperated by it before. The dreaded No Item to Display -or worse- Getting Your Data seems to pop up at the worst time.

Now, these words aren’t so bad by themselves but on a form in the hands of a user new to the form or a new Power Apps developer, panic and desperation can ensue. There’s several requests to allow developers to change or remove that text in the tech community.

No Item to Display and Getting Your Data

Just so we’re all on the same page, both messages mean the same thing but No Item to Display is shown to developers, while editing the app, when the app is in preview. Getting Your Data is displayed to end users when the app is in use in production.

Unfortunately, Microsoft has not allowed us the option of changing the text or deleting it but until that happens we can always hide it.

See my examples below.

The form appears with this text in my examples because there is nothing to display until an item is selected in the gallery above the form. I would prefer to show nothing instead of confusing words.

I can make this happen by adding a little code to my app.

  1. First, in my app’s Onstart property, I set a variable like this:

    Set(varShowForm, false)
  2. Next, I select my form in the Tree view and change the Visible property from true to my variable like this:

  3. Last, I select my gallery’s selection icon. It’s the icon that users click on in the gallery for something else to happen. By default it looks like a right pointing arrow. In my example the icon is pencil. I add some additional code to what is already there like this:

    NewForm(Form1); Set(varShowForm,true)

    NewForm(Form1) was the code already present. I simply end that statement with a semi-colon and add my new code.

That’s it! Now when I run my app in preview and in production I don’t see any pesky text.

After selecting an item I see this: