I need to set a combobox in my Teams Powerapp with distinct values from a Dataverse table text column. I have been unsuccessful so far. I thought maybe the solution would be to use a view and have the view only show a list of distinct items, but don't know how I would accomplish this.
I do have a view to use for this. None of the different combinations I have tried actually result in the combobox showing any items. The TeamName column is the first in the list of field in the combobox property dialog.
I don't have any errors, however there is nothing showing in the combobox. I could use a dropdown but it doesn't give me access to any of the other columns if I do that.
Distinct(Filter(OnCallSchedules, 'OnCallSchedules (Views)'.Teams), TeamName).Result
Distinct(Filter(OnCallSchedules, 'OnCallSchedules (Views)'.Teams), TeamName)
Distinct(OnCallSchedules, TeamName)
Distinct(OnCallSchedules, TeamName).Result
I thought I had it resolved. I needed to add the Result field to the list of fields and move it to be the first field in the list. But I don't have any access now to the other data.
Sort(Distinct(OnCallSchedules, TeamName).Result, Result, SortOrder.Ascending)
Try below formula,
Filter(Distinct('Test 1S',Name), 'Test 1S (Views)'.'Active Test 1S')
If it answers your question, kindly give kudo and accept it as solution.
Regards,
Prakash
@JR-BejeweledOne try this ...
Distinct(Filter(OnCallSchedules, Teams),TeamName).Result
Distinct(Filter(OnCallSchedules, 'OnCallSchedules (Views)'.Teams), TeamName).Result
Essentially it would look like: Distinct(Filter(Table,View),Column).Result
Distinct( Table, Formula )
1.Insert a button control, and set its OnSelect property to this formula.
2.Select the button while holding down the Alt key.
The formula is evaluatd and the collection is created which you can show by selecting in the formula bar.
3.Insert a data table control, and set its Items property to this formula.
4.Use the Edit fields link in the data table's properties pane to add the Result column
5.First( Sort( Distinct( , ), Result ) ).Result
This formula sorts the results from Distinct with the sort function, takes the first record from the resulting table with the ffunction, and first extracts the Result field to obtain just the country name.
snehal_dhane
Thank You
That works except I don't have access to the other data in the table, which I need. It's not a huge thing, I am just trying to make the app a little better, but this isn't going to work the way I want it to.
Hello,
1.add button control, and set its OnSelect property to this formula.
2.add a data table control, and set its Items property to this formula.
3.Use the Edit fields link in the data table's properties pane to add the Result column.
4.Distinct(Filter(Table, View),Column).Result.
User | Count |
---|---|
19 | |
15 | |
14 | |
10 | |
8 |
User | Count |
---|---|
39 | |
30 | |
22 | |
22 | |
16 |