cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Show fractions in inches dropdown

Hey there,

I have in my app an input for the whole numbers and a dropdown for the fractions of the inches.

Side to that, I have a label that show the max and min.

1. I want the inches to shown as fractions.

2. If I write 4 3/8 it will recognized it as 4+3/8, as for now it is not.

thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions
mdevaney
Super User
Super User

@Anonymous 
The key here is to ensure the fractions are stored as text instead instead of numbers.

 

Suppose you have a Text Input that will receive the inches value and is initially blank.  Put this code in the Format property of the dropdown to ensure only numbers can be input.

Format.Number

 

Then your fractions dropdown has these values in the Items property

["1/4","3/8","1/2","5/8","3/4","7/8"]

 

Finally, put this code in the Text property of the label to display the fractional number

TextInput_Inches.Text&"-"&Dropdown_Fraction.Selected.Value

 

Now the number will display like this

4-3/8

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

@Anonymous 
Click on the dropdown for fractions.  Then, look up at the formula bar in PowerApps Studio.  You can change the current property to the left of the formula bar.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
mdevaney
Super User
Super User

@Anonymous 
The key here is to ensure the fractions are stored as text instead instead of numbers.

 

Suppose you have a Text Input that will receive the inches value and is initially blank.  Put this code in the Format property of the dropdown to ensure only numbers can be input.

Format.Number

 

Then your fractions dropdown has these values in the Items property

["1/4","3/8","1/2","5/8","3/4","7/8"]

 

Finally, put this code in the Text property of the label to display the fractional number

TextInput_Inches.Text&"-"&Dropdown_Fraction.Selected.Value

 

Now the number will display like this

4-3/8

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Anonymous
Not applicable

Any chance for PrtScn for each step you wrote?

Couldn't find the "items"?

Thanks

@Anonymous 
Click on the dropdown for fractions.  Then, look up at the formula bar in PowerApps Studio.  You can change the current property to the left of the formula bar.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

@ mdevaney thanks for sharing

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (5,762)