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

Tabbed form using gallery buttons

Hello PowerApps Community,

 

I have a form from a SharePoint list that I customized using PowerApp. I have a gallery with buttons that I use for tabbed navigation as you can see from my screen shots below. Thanks Reza Dorrani for the tutorial. 

asmedic85_0-1638227572967.png

 asmedic85_1-1638227572970.png asmedic85_2-1638227572976.png

What I want to do is basically disable the buttons (tab) until all the fields are completed on that tab. 

 

Any suggestions, recommendations or help?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @asmedic85 ,

 

Could you please share more details about your scenario? Do you have Edit Forms visible based on the tabs? If so, when one Form is completed, which of the following is what you want:

1. Only make the next tab available to the user.

2. Make all the tables available to the user.

 

But actually, regardless of which case you want is, due to the tabs are in the Gallery, you will need to interact the data source of the Gallery every time a single field is completed so that you will be able to "save" the verification results of all forms.

 

So, I assume you will want the case 1 from above scenarios, please try the approach below:

1. Create a collection OnVisible of the Screen, use the collection as the Items of the Gallery:

ClearCollect(colGal,Table({ID: 1, Label: "Position", Valid: false},{ID: 2, Label: "HR", Valid: false},{...},...))

By the way, it will be better to copy your formulas and paste as text in the forum so that others will be more easier to edit.

 

2. Set Required property of all the Data Cards of all those Forms to be true.

 

3. Set OnChange property of all the field controls of all those Forms (or similar property OnCheck if it is a Checkbox) to:

If(ThisFormName.Vaild = true, Patch(colGal, LookUp(colGal, ID = varTabSelected), {Valid: true}))
//ThisFormName represents the name of the form where the field control is located.

This step is for getting the validation result of current form. When a field has been edit, it will verify the form's validation property, if is true, modify the collection Valid column to true for the use of the next step.

 

4. For the next tab, set DisplayMode to:

If(LookUp(colGal, ID = (ThisItem.ID -1)).Valid , DisplayMode.Edit, DisplayMode.Disabled)

So if the Form of previous tab is valid, this tab is available, otherwise disabled.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

1 REPLY 1
v-jefferni
Community Support
Community Support

Hi @asmedic85 ,

 

Could you please share more details about your scenario? Do you have Edit Forms visible based on the tabs? If so, when one Form is completed, which of the following is what you want:

1. Only make the next tab available to the user.

2. Make all the tables available to the user.

 

But actually, regardless of which case you want is, due to the tabs are in the Gallery, you will need to interact the data source of the Gallery every time a single field is completed so that you will be able to "save" the verification results of all forms.

 

So, I assume you will want the case 1 from above scenarios, please try the approach below:

1. Create a collection OnVisible of the Screen, use the collection as the Items of the Gallery:

ClearCollect(colGal,Table({ID: 1, Label: "Position", Valid: false},{ID: 2, Label: "HR", Valid: false},{...},...))

By the way, it will be better to copy your formulas and paste as text in the forum so that others will be more easier to edit.

 

2. Set Required property of all the Data Cards of all those Forms to be true.

 

3. Set OnChange property of all the field controls of all those Forms (or similar property OnCheck if it is a Checkbox) to:

If(ThisFormName.Vaild = true, Patch(colGal, LookUp(colGal, ID = varTabSelected), {Valid: true}))
//ThisFormName represents the name of the form where the field control is located.

This step is for getting the validation result of current form. When a field has been edit, it will verify the form's validation property, if is true, modify the collection Valid column to true for the use of the next step.

 

4. For the next tab, set DisplayMode to:

If(LookUp(colGal, ID = (ThisItem.ID -1)).Valid , DisplayMode.Edit, DisplayMode.Disabled)

So if the Form of previous tab is valid, this tab is available, otherwise disabled.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,089)