Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Combobox defaultselected error and update error

(0) ShareShare
ReportReport
Posted on by 125

I have a complex issue that it seems.... My app is connected to multiple SP lists. The app has datacards that pull in the server name and the support team. Server name is a combobox that pulls from a different list (application SP list) and the support team is a combobox that pulls from the server SP list. Both the server name and support team are single lines of text in a different SP list (App tool) which is where the data is being stored. Those work like they should, however the next datacard is a build location. The build location was 2 different comboboxes inside the datacard, both pull data from the server list and stores it in the app tool list. The reason for this is because the datacard is going to switch between conditions and store whichever is set. I had build location set to a choice column on the App tool list, and at that point I didn't receive any error messages, however it didn't store to the App tool list. The update for this datacard was this:

If (DataCardValue2.Selected.Value = "New", ComboBox20.Selected,
DataCardValue45.Selected)

^ Now I just tried adding the value name at the end of selected, and got the error message that it expects a table.

 

I then tried changing the field to a multiple line of text on the app tool list, and the datacard broke. The one combobox inside the datacard, the defaultselecteditems expect a table value and this is what I have: 

If (DataCardValue2.Selected.Value = "Replace" ||DataCardValue2.Selected.Value = "Upgrade" || DataCardValue2.Selected.Value = "Add", Filter(serverlist, FriendlyName = ComboBox8_1.Selected.Value).Location, Parent.Default)

 

Categories:
  • Verified answer
    dixonbridgeta Profile Picture
    125 on at
    Re: Combobox defaultselected error and update error

    So I figured out a way around this finally!! I added a label in the datacard along with the 2 comboboxes. I set the text label to an if statement that switched between the combobox based on if it is blank or not. Then I used that label in the update property of the datacard and that finally work!! Don't know why I didn't think of this sooner... ugh

  • dixonbridgeta Profile Picture
    125 on at
    Re: Combobox defaultselected error and update error

    I wrote my last response slightly wrong...  I have an if statement for my update property and depending on the selection of another field in the form, it will pick between 2 different comboboxes for update. It kept expecting a table value, so I changed it to the following which doesn't cause any errors but it still will not save to my SP list...

    Update:

    If (DataCardValue2.Selected.Value = "New",

    Table(
    {
    Value: ComboBox20.Selected.Value
    },
    {
    Location: DataCardValue45.Selected.Location
    }))

     

     

    Default:

    Table({Value: ThisItem.'Build Location(s)'})

  • v-jefferni Profile Picture
    on at
    Re: Combobox defaultselected error and update error

    Hi @dixonbridgeta ,

     

    You need to take values from 2 Combo boxes and put them together in the Update of this column. You can use below formula to concatenate selected values from the two controls:

    Concatenate(Concat(ComboBox1.SelectedItems, Value, ","), ",", Concat(ComboBox2.SelectedItems, Value, ","))

     

    Best regards,

  • dixonbridgeta Profile Picture
    125 on at
    Re: Combobox defaultselected error and update error

    Did all that. It just doesn't like that for my Build Location datacard (which build location is multiple lines of text column) I am trying to pull from 2 different comboboxes in the update property which expects table values and the column for it is text. 

  • Verified answer
    v-jefferni Profile Picture
    on at
    Re: Combobox defaultselected error and update error

    Hi @dixonbridgeta ,

     

    The best way to solve the issue permanently, you need to ensure that the data source (that is, the list) is fully prepared and will not change. Then create the form in PowerApps from scratch. You can have two forms on the screen first, copy and paste Controls as well as formulas of them conveniently, and in the end delete the old Form.

     

    Best regards,

  • dixonbridgeta Profile Picture
    125 on at
    Re: Combobox defaultselected error and update error

    Hi @v-jefferni ,

     I did do all of that from the start and I am still experiencing this issue...

  • v-jefferni Profile Picture
    on at
    Re: Combobox defaultselected error and update error

    Hi @dixonbridgeta ,

     

    Based on the error message expect a table value, the Location column in App tool list was set as a Choices column that allows multiple selections. After you change it to single line text, you need to refresh the connection on Data Source pane, then add the Data Card again. If you only need single selection in the Location Choices columns, you'd better modify the column first, and then adjust the Edit form from beginning.

     

    Best regards,

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

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,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard