2

I have a SharePoint list with a column that is displayed as a percentage: the minimum value is 0, the maximum is 100:

enter image description here

This is displayed nicely as percentage value, i.e. 11%

enter image description here

However, when I am trying to use PowerApps as an input form, it allows only values between 0 and 1

enter image description here

How to allow users to enter the percentage value instead of a fraction (so 11% instead of 0.11)?

  • Is there existing real time data in your list (or you are just trying this in development environment)? If No, I can suggest you a workaround. – Ganesh Sanap Apr 6 at 7:15
  • @GaneshSanap It is still in development, I've been thinking about changing the list settings to a regular number and informing users that this is in fact a percentage – Yasskier Apr 6 at 9:38
  • Yes. I will suggest you to change it to regular number field (remove show as percentage). Then apply JSON/column formatting in list view to show that number as percentile by appending % (If you want to use this approach I can give you the JSON code to append % in list view). Also, in powerapps you can concatenate % on display form using formulas. – Ganesh Sanap Apr 6 at 9:50
3

You can try the following approach:

enter image description here

Here "Numbers" is the name of my column.

This makes both the display of the value (The Default property) and the function that updates it (Update) stores the value correctly.

| improve this answer | |
  • Could not find Update property on the DataCardValue field. Or am I missing something? – Abhishek Apr 7 at 14:35
  • It is under the Advanced tab - you might have to press "Unlock to change properties" and then "More options" for them to be visible. – Rune Sperre Apr 7 at 14:52
  • 1
    Got it.. I was searching for Update on the "DataCardValue" (text input field), while it is present on the "DataCard". – Abhishek Apr 7 at 14:58
  • Thank you so much @Rune – Abhishek Apr 7 at 15:06
2

Per my test, percentage is acceptable in PowerApps form. Symbol % needs to be typed in manually as well.

Please point it out if I have misunderstood your situation.

enter image description here

| improve this answer | |
2

This is default behavior in PowerApps for number fields which are being shown as percentage in SharePoint because it stores values from 0 to 1 in back-end.

Workaround:

  1. Change your number field to regular number field (by removing show as percentage in column settings).
  2. Use JSON/Column formatting to show this field as percentage in list view.
{
   "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
   "elmType": "div",
   "txtContent": "= @currentField + '%'"
}

Output:

enter image description here

References:

  1. Use column formatting to customize SharePoint.
| improve this answer | |
0

The SharePoint answer is simple - no JSON code is required. A percentage is a decimal value less than 1. If you want your column to read 44%, then you have to enter it at .44. SharePoint will convert it to a % in the column. This will work regardless of how people enter data in your list - default form, quick edit, details pane, etc.

As for getting it to display in Power Apps, I'm working on that myself. I assume it has to do with Format.

| improve this answer | |
  • Hi - the question was about how to make it user friendly: if you know that you are entering percentage value, it is better to enter 55 instead 0.55. You would be surprised how many people don't realize that percentage is indeed a fraction. – Yasskier Jul 27 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.