cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Issues with "Default" in Combobox

Hi there,

 

As the title suggests, I'm having trouble with the default in Combobox. 

So I have 3 frames: a browse, a detail (view) form and an edit / add form.

When people want to edit a field, I want the comboboxes, dropdowns and datumpicker to show the old data. I've got it working for the dropdowns and datumpicker, but the comboboxes doesn't seem to work. Everytime it displays: "Search items" instead of (for example) a customer.

 

 

I tried Parent.Default, but that doesn't work. It gives a red circle with a cross inside it which says something about that it expects the type of Record, but this rule produces incompatible value from the type Number. 

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Hey,

 

We can use the below formula in the defaultSelectedItems , the catch is it accepts a record value and not a single data value in the control -->

Filter('Table', Id = Gallery.Selected.Id).ColumnBoundToCombobox

View solution in original post

15 REPLIES 15
v-micsh-msft
Community Support
Community Support

Which property you are working with the ComBo Box control?

The Default property, or the InputTextPlaceholder property?

 

The Search Item is defined under the InputTextPlaceholder property, so if you would like to have it to be displayed as the default user name, then you may take a try to set the 

 

InputTextPlaceholder property with

Gallery.Selected.Customerfield.DisplayName

and the Default property set to:

Gallery.Selected.Customerfield

More information, see:

Combo Box in PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Michael (@, thanks for your answer. 

 

I think I explained it wrongly. I will add some more information below with properties from the Datacard and Combobox.

 

I have a Datacard (DataCardClient).

Default:

Empty

 

Update

LookUp('[dbo].[tbl_Clients]'; Name = ComboBox2.Selected.Name; ID)

 

AllowedValues

DataSourceInfo('[dbo].[tbl_Voyages]';DataSourceInfo.AllowedValues; "Clients_ID")

 

And next the properties of the ComboBox (ComboBoxClient):

DisplayFields

["Name"]

 

SearchFields

["Name"]

 

Items

'[dbo].[tbl_Clients]'

 

Default

Empty

 

DefaultSelectedItems

Empty

 

------------------------------------

So when I choose the client, it saves and it's viewable in de view form (and in the SQL database) but when I want to edit that later, the combobox is emtpy and shows the text from InputTextPlaceholder, which is not what I want. I want it to show the value which I chose before.

I hope this explained my problem better.

 

EDIT: If I put DataCardClientValue88 in the InputTextPlaceholder, it shows the right one, it shows the chosen Client, which is good, but not exactly what I want. If people edit that form and save, it saves a blank for Client, since nothing is filled in (because there is no working default). 

Hi Michael (@v-micsh-msft),

 

Thank your for your response. 

I'm talking about the Default property, not the InputTextPlaceholder.

 

Here is some more information, since your solution didn't work for me.

In the edit screen, these are the most imporant properties for the datacard and combobox:

 

ComboboxClient:

DisplayFields: ["Name"]

SearchFields: ["Name"]

Items: Sort('[dbo].[tbl_Clients]';Name)

Default: Empty

InputTextPlaceholder: DataCardValue80 (This is the Client Value in the Detail / View screen. This is just a temporarily solution so people know which Client they picked).

 

DatacardClient:

DataField: "Client_ID"

DisplayName: "Client"

Default: Empty

Update: LookUp('[dbo].[tbl_Clients]'; Name = ComboBoxClient.Selected.Name; ID)

AllowedValues: Empty

 

 

---------------------------------

I forgot to tell that DatacardClient had a connection to a DropDown first, but I replaced it with a Combobox because I want the users to be able to search for Client in the list itself.

 

So the problem one more time:

I can upload the chosen Client to the database (I can see it in SQL and in the detail/view screen in Powerapps). When editing a voyage, the combobox doesnt display the picked Client anymore and has to be picked again. That's because the Default is empty ofcourse, but I don't know what to fill in there. 

The Default property should depend on the form property.

So when the Form is submitting new record, you can just leave it as empty, when form control switches to Edit Mode, change the value of the Default property as below:

So the whole formula should be:

 

If(EditForm1.Mode=New,
"",
Lookup('[dbo].[tbl_Clients]'; ID = Gallery.Selected.ID; Name))

See if doing it in this way would make it work as expected.

 

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

So, it didn't give me any errors with this formula (I replaced Client with Charterers by the way):

 

If(Gallery_Voyage_Edit.Mode = New; "";LookUp('[dbo].[tbl_Charterers]'; ID = Gallery_Voyages_Browse.Selected.ID; Name))

 

When I put that in the Default from the DatacardCharterer, it didn't give me an error like mentioned before, but it doesn't display the right Charterer in the Combobox either. 

 

When I put it in the Default from ComboboxCharterer, it gives me the following error: 

 

The property expects record values but this rule produces incompatible text values.

 

I don't know how to solve that. 

Again, thanks for your help Michael @v-micsh-msft

 

Anonymous
Not applicable

I think you need to set DefaultSelectedItem instead of Default.

 

 

 

 

Hi @Anonymous,

 

I tried to set the DefaultSelectedItems to:

 

If(Gallery_Voyage_Edit.Mode = New; "";LookUp('[dbo].[tbl_Charterers]'; ID = Gallery_Voyages_Browse.Selected.ID; Name))

 

Sadly, that didn't work either. It gives me the following error:

 

The property expects record Table values, but this rule produces incompatible Text values. Or something like that.

MK1
Helper IV
Helper IV

Hi,

I'm also having same kind of issue.

In my scenario, 

I have a combo box which will be filtered based on values we choose from a Dropdown

DropDown= A, B,C

when a user selects A,C then there will be only 1 value in the combo box,

But when they choose B there will be multiple options on Combobox they need to select.

What my issue is: When a user selects A,C from dropdown a textbox should be populated with Combobox value automatically, but when user selects B they should be able to select options from combobox values.

How can i set the properties.

 texbox needs to be populated conditionally. like when they select A,C from dropdown then the textbox value should be the only value from combobox.

When they select B from the dropdown, they should be able to select 3 values from combobox and populate into the textbox.

textBox= Concat(combobox.SelectedItems,Result&",")

This is the formual i used on textbox.So what ever user selects on combobox will bepopulated into textbox

But textbox should be set to default combobox option when they select A,C from dropdown

I am having the same issues with setting the Default values for a Combo Box - did anyone solve this since the last post?

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!   This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions in the Forums to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersNumber of SolutionsSuper UsersNumber of Solutions @anandm08  23 @WarrenBelz  31 @DBO_DV  10 @Amik  19 AmínAA 6 @mmbr1606  12 @rzuber  4 @happyume  7 @Giraldoj  3@ANB 6 (tie)   @SpongYe  6 (tie)     Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersSolutionsSuper UsersSolutions @anandm08  10@WarrenBelz 25 @DBO_DV  6@mmbr1606 14 @AmínAA 4 @Amik  12 @royg  3 @ANB  10 @AllanDeCastro  2 @SunilPashikanti  5 @Michaelfp  2 @FLMike  5 @eduardo_izzo  2   Meekou 2   @rzuber  2   @Velegandla  2     @PowerPlatform-P  2   @Micaiah  2     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 3:Community MembersSolutionsSuper UsersSolutionsPower Apps anandm0861WarrenBelz86DBO_DV25Amik66Michaelfp13mmbr160647Giraldoj13FLMike31AmínAA13SpongYe27     Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Week 4:Community MembersSolutionsSuper UsersSolutionsPower Apps DBO-DV21WarranBelz26Giraldoj7mmbr160618Muzammmil_0695067Amik14samfawzi_acml6FLMike12tzuber6ANB8   SunilPashikanti8

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (1,751)