cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NB1908
Frequent Visitor

Is there a way to disable a screen/button until all data loads on the screen

I have a form in which the item property is dependent on the selection of two combo boxes to load the data.

 

Users are clicking on save, before the entire data is loaded in the form, which leads to blank values being updated in the database. Is there a way to disable a screen/button until all data loads in a form?

 

 

Update: 

 

Issue: Users are clicking on the 'edit' button making a few changes and then hitting on save at a very fast pace (not waiting for the entire form/data to load which takes about 5 seconds to load. As a result, the data is getting corrupted.

 

We have more than 80 controls (fields from the DB) on the PowerApps screen (divided into multiple forms). These controls are a mix of text inputs & combo boxes (having logic in the default selected items, which fetches values from the AD as well as the database).

 

Is there a way to know if the form is completely loaded. It seems that Power Apps has limited functionalities as we could not find a similar inbuilt functionality (tried using the 'LoadingSpinner' property of PowerApps as well). Please correct me and let me know if there is a workaround. Baseline is, we want to know when the page/form is completely loaded

5 REPLIES 5
Moreshwar
Resolver II
Resolver II

You can use a variable to set DisplayMode property of button. You can set this variable to false until your data is loaded and set it to true after data gets load. Use this variable to set DisplayMode property then.

Nogueira1306
Super User
Super User

You can set the visibility of the button to something like this

If( isBlank(TextBox1.Text) = true; false; true)

So, this means, if this the text box does not have text, it will be invisible. It it has text, it will be visible

 

v-qiaqi-msft
Community Support
Community Support

Hi @NB1908,

Do you want to disable the save button before all the data is load in the form?

I think the best method is to check if each control within the form has data included.

Not sure what kind of controls do you have in your form, I just give a sample of Combo Box and TextInput.

Set the DisplayMode property of the save button as below:

If(IsBlank(TextInput1.Text) || *//Just check if the TextInput has data or not
   (IsBlank(ComboBox1.Selected.Value) || IsEmpty(ComboBox1.Selected.Value)), *//Check ComboBox
    Disabled,
    Edit
  )

Note that use the || operator to combine all the conditions.

Best Regards,
Qi

We have more than 80 controls (fields from the DB) on the PowerApps screen (divided into multiple forms). These controls are a mix of text inputs & combo boxes (having logic in the default selected items, which fetches values from the AD as well as the database).

 

Issue: Users are clicking on the 'edit' button making a few changes and then hitting on save at a very fast pace (not waiting for the entire form/data to load which takes about 5 seconds to load. As a result, the data is getting corrupted.

 

If we use the above approach, it would not let us save if even one of the fields have a blank value in the database. 

 

Is there a way to know if the form is completely loaded. It seems that Power Apps has limited functionalities as we could not find a similar inbuilt functionality (tried using the 'LoadingSpinner' property of PowerApps as well). Please correct me and let me know if there is a workaround. Baseline is, we want to know when the page/form is completely loaded

Hi @NB1908,

I know that directly check whether the entire form is completely filled is the most direct way, but there is no way to achieve this currently in Power Apps.

This could be a huge work to set this validation for each controls, but this is indeed a feasible way at present。

As an alternative solution, you could set the Required property of each data card to true, then the form could not be saved until all the fields are filled.

Best Regards,
Qi

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,393)