cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vffdd
Super User
Super User

format combo box numbers

I have a combo box that is populated by a number field from a dataverse table.  T

 

The format of the numbers  in the table  shows correct for any numbers > 10    so 10.50    14.30 etc..

 

However for any numbers less than ten it drops the first zero.    7.40  etc.. I would like this to show as 07.40 in the combo box

 

The combo box filters a gallery and in the gallery I can format the label correctly but I need the combo box to match..

 

I've tried adjusting at the dataverse end but can't do that either..

 

Any ideas on how to achieve what I need?

 

EDITED TO ADD:  I can switch to a dropdown if it makes any easier I actually don't need any of the other functionality of a combo box

 

TIA

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @vffdd ,

 

This should do the thing.

 

AddColumns(Distinct(Filter('mydataversetable',status<>"Closed"),TestingTimeFormats),"text_val",Text(Result,"00.00"))

 

Also for better performance I would swap to a dropdown instead.

 

Regards

 

 

View solution in original post

4 REPLIES 4
FernandoTC
Resolver III
Resolver III

Hi @vffdd ,

 

In the items property of the ComboBox/DropDown set the property to a table with a new text column based on that number field like this:

 

AddColumns(_myTable,"text_val",Text(val,"00.00"))

 

This works for me.

 

Captura1.PNGCaptura2.PNG

Remember to use the number field for the filter part of the gallery and keep the text field just as a visualization.

 

Hope it helps.

vffdd
Super User
Super User

Thanks @FernandoTC  I feel that would definitely work if I could just replicate it !! 🙂    Here's the current items property of the combobox, I can't quite manipulate it to get what you are showing above..

 

Distinct(Filter('mydataversetable',status<>"Closed"),TestingTimeFormats)

Hi @vffdd ,

 

This should do the thing.

 

AddColumns(Distinct(Filter('mydataversetable',status<>"Closed"),TestingTimeFormats),"text_val",Text(Result,"00.00"))

 

Also for better performance I would swap to a dropdown instead.

 

Regards

 

 

vffdd
Super User
Super User

That's it perfect.. thanks @FernandoTC  

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,500)