cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HFG
Advocate II
Advocate II

Default value combobox with Yes/No column in Dataverse

Hello, 

 

I have a table "Individu" in Dataverse for Teams which has a Yes/No column (not a choice column) called "IsActive". My gallery is set to show the list of people from the Individu table and I have a details pane where their details can be edited. For the "IsActive" information I use a combobox. I am able to set the options of the combo box using Choices(Individu.IsActive), but I am unable to get the default value to show the data from the table. I have tried Gal_Individu.Selected and I don't get an error, but the Yes/No doesn't show in the combo box either. 

 

Could you tell me how it should be done? 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @HFG ,

 

Now ,I got your question.

 

Please try this formula on DefaultSelectedItems property of combo box control:

{Value: Gal_Individu.Selected.IsActive}

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

14 REPLIES 14
v-xiaochen-msft
Community Support
Community Support

Hi @HFG ,

 

Please use DefaultSelectedItems  property instead of Default property of combo box control.

Please use this formula on DefaultSelectedItems property of combo box control:

[Gal_Individu.Selected.IsActive]

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

Hi @v-xiaochen-msft 

 

Thanks for your reply. I confirm that I am using the DefaultSelectedItems property.

When I try Gal_Individu.Selected.IsActive I get an error that the control expects a table value. 

Is my items property correct? I have tried the below formulas which don't give an error, but give varying results:

Choices(Individu.IsActive): gives Yes/No in the combobox
Individu.IsActive: gives a line per item in my table, but all are blank 
Distinct(Individus.IsActive,IsActive): gives two options, but both are blank 

My choices of field for the combo box in all the cases are Value or Result, but whether I use one or the other it doesn't change anything. 

I've never worked with a Yes/No column before so I'm trying to understand their behaviour. 

 

Thanks

v-xiaochen-msft
Community Support
Community Support

Hi @HFG ,

 

Please use Choices(Individu.IsActive) on Items property.

Please use [Gal_Individu.Selected.IsActive] instead of Gal_Individu.Selected.IsActive.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

Hi @v-xiaochen-msft 

That is no longer throwing an error, but also not showing any value in the combobox. It seems to have found one line (please see attached), but does not display it. 

Thanks

v-xiaochen-msft
Community Support
Community Support

Hi @HFG ,

 

So does the IsActive column of this record have a value?

In my environment, it shows the correct value.

Could you provide a picture of the record? (in your dataverse)

 

Best Regards,

Wearsky

 

HFG
Advocate II
Advocate II

Hi @v-xiaochen-msft 

 

Yes, all records have a value. Please see attached. 

I just tried using the technical names of the column to test, but sadly no difference. 

Thanks

v-xiaochen-msft
Community Support
Community Support

Hi @HFG ,

 

v-xiaochen-msft_0-1616663843885.png

As shown in the figure, although it cannot display the correct result when previewing, it can display the correct result in the combo box control.

v-xiaochen-msft_1-1616663921066.png

v-xiaochen-msft_2-1616663935955.png

v-xiaochen-msft_3-1616663964413.png

v-xiaochen-msft_4-1616663981729.png

v-xiaochen-msft_5-1616664097594.png

v-xiaochen-msft_6-1616664115523.png

v-xiaochen-msft_7-1616664251054.png

 

 

AAA.gif

Please check the picture above to see if there are any steps that are different from yours.

And please try to refresh your data source.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

 

HFG
Advocate II
Advocate II

Hi @v-xiaochen-msft 

I am not using a form so my control is different. I have tested using a form and it works fine. I tried copying the code over from the form control for example, Items was set to Choices('IsActive (Individus)'), but still no luck. I've attached a screenshot of my combo box properties. I also added a label to my gallery to show that the value is coming through in the app. 

Thanks

v-xiaochen-msft
Community Support
Community Support

Hi @HFG ,

 

Now ,I got your question.

 

Please try this formula on DefaultSelectedItems property of combo box control:

{Value: Gal_Individu.Selected.IsActive}

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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