web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Combo Box dynamic defa...
Power Apps
Unanswered

Combo Box dynamic default content

(0) ShareShare
ReportReport
Posted on by 98

Hey there, I'm having some issues getting the default of some combo boxes to populate.  The user of the app might have to submit multiple forms, with some of the information staying consistent between submissions. 

 

To help speed up the process, I was hoping to store some of the information in variables when they hit the submit button and then automatically be selected again after the form refreshes.  I'm able to verify the variables are holding the correct info, and I can get the information to pop up in the combo box, but the actual value of the combo box is blank because, on submission, the database is receiving blank values.  

 

What can I do to fix this?  Thanks for the help!

Categories:
I have the same question (0)
  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi,
    Could you please share the current formulas that you are using 

  • JMerk Profile Picture
    98 on at

    This is the OnSelect property on the submit button.

    UpdateContext({farmCombo: DataCardValue45.Selected.Result});

    Set(
    fieldCombo,
    DataCardValue46.Selected.Field
    );
    If(
    Value(DataCardValue1.Text) in HarvestTickets.HVTTicketNumber,
    Notify(
    "Duplicate Ticket Number Detected, Please Double Check!",
    Error
    ),
    Set(
    varDuplicate,
    true
    ) && SubmitForm(Form3) && NewForm(Form3)
    );

     The reason I have two methods of setting a variable was just an effort to try different things.

     

    The DefaultSelectedItems Property of the first ComboBox is: 

    [farmCombo]

     And for the other one,

    [fieldCombo]

     

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at
    UpdateContext({farmCombo: DataCardValue45.Selected.Result});

    Set(
    fieldCombo,
    DataCardValue46.Selected.Field
    );
    If(
    Value(DataCardValue1.Text) in HarvestTickets.HVTTicketNumber,
    Notify(
    "Duplicate Ticket Number Detected, Please Double Check!",
    Error
    );
    Set(
    varDuplicate,
    true
    ) , SubmitForm(Form3) ; NewForm(Form3)
    );
  • JMerk Profile Picture
    98 on at

    It's still doing the same thing, in the ComboBox, it looks like the correct item is selected as it's showing up in the box.  However, the Data Card Value is still blank.

  • JMerk Profile Picture
    98 on at

    Alright, I got one of the combo boxes to be updated, the DefaultSelectedItems property looks like so: 

    LookUp(HVTCropDetails, Field = fieldCombo)

    The items inside of the second combo box is reliant on whatever the user selects in the first box, selected like so:  

    Sort(Filter(HVTCropDetails, FarmName = ComboBox2.Selected.Result), Field)

     The first ComboBox is still not using the variable information for the DefaultSelectedItems property.  If I filter the items using

    [TableName].[ColumnName]

     it works just fine.  However, there are a lot of duplicate values in this selection which is why I would like to use the Distinct function.  However, when I use it, it won't utilize the DefaultSelectedItems property and insert the variable's data.  

     

    To reiterate, the problem arises when I use the Distinct functionality.  Is there another way of filtering unique items?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard