Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Tab List and Combo Box Validation

(1) ShareShare
ReportReport
Posted on by 14

Hello,

I have a Power App I built for tracking certain tasks within my company. The main entry/edit form utilizes modern Tab Lists and Modern Combo boxes as part of a modern form. Depending on the tab selected, different combo boxes are visible, some of which are required. I have the combo boxes set to use entries from a different SharePoint list and use the DefaultSelectedItems function using the value {Title:ThisItem.ColumnName'}. The Update formula are set to cboxValue.Selected.ColumnName. The problem I am running into is I have a "Submit" button that uses an if statement OnSelect: 

 

If(Form1.ValidSubmitForm(Form1),Notify("Required field(s) empty. Please review form to ensure all *required fields have data.",NotificationType.Error))

 

If the user does not click and view every tab, the Valid function does not recognize the form as valid and triggers the error notification. If you click through all the tabs allowing the combo boxes to become visible and appear to load the value, then it submits correctly. Any ideas? 

  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: Tab List and Combo Box Validation

    @sk00lie884  explanation: 

     

    Typically, we create a Single Line Text Column in SharePoint, and then insert that Single Line Text Column into an EditForm control. We then remove the Text Input control, and replace it with a different control (in your scenario, a Combo Box control). We also set the Update property to point at the selected value from that Combo Box.

     

    However, if we add either of the following into the DefaultSelectedItems property, we will see the following error:

     

    Amik_0-1720734639993.jpeg

     

    Amik_1-1720735070994.jpeg

     

    The ComboBox is expecting a Table. As a workaround, we can force a Value into the DefaultSelectedItems property using the { } operator to "display" a value into that ComboBox.

     

    {Value: Parent.Default}

     

    With SharePoint (does not apply to Dataverse), this is perfectly valid because we are only interested in ensuring that the correct value is displayed. We also know if the user selects a different value in that ComboBox, the ComboBox will accept the selected item as a record and this selection will successfully save to SharePoint.

     

    However, this approach will break the Unsaved and Valid property of the EditForm. These properties will return true if the Update and the Default property of the DataCards share the same result (a Record and a Value are not the same).

     

    To accommodate for this, we can ensure a record is passed into the ComboBox by using the LookUp function. This function is useful because it can also return an entire record, rather than a specific column value of a record.

     

    Further reading on Records vs Values:

     

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/working-with-tables 

  • sk00lie884 Profile Picture
    14 on at
    Re: Tab List and Combo Box Validation

    Thanks! This appears to have fixed my issue! These forums have been incredibly helpful for me. I went from a never using Power Apps and Power Automate to having a series of Apps built and running 🙂

  • Verified answer
    Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: Tab List and Combo Box Validation

    @sk00lie884 - consider replacing the DefaultSelectedItems property with:

     

    LookUp(
     ListName,
     ColumnName = Parent.Default
    )
  • sk00lie884 Profile Picture
    14 on at
    Re: Tab List and Combo Box Validation

    The combo box item is either a another SharePoint list name or a filtered SharePoint list name based on the value selected for a related combo box: 

    Filter(ListName, ColumnName= cboxName.Selected.Column)
  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: Tab List and Combo Box Validation

    @sk00lie884 - the likely cause is because although the " {} " operator will populate the DefaultSelectedItems property with a Value, the Valid property of each DataCard property is expecting a Record. 

     

    Could you provide an example of the formula you have in the Items property for one of those ComboBoxes?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard