cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Parent.Default doesn't work for decimal numbers in the dropdown list HELP

Hello,

I need your help. I am using PowerApps which fills Excel. I generated PowerApp app automatically from Excel and then I personalised some fields.

I have several dropdown lists, all of them work fine ( I fill it using app, it updates information in Excel, I can also modify it, and it will update the new information again). I'm using the function If(EditForm1.Mode = FormMode.New ;0 ; Parent.Default) to conserve Default value before modifying it. My problem is that this function for default value does not always work. My dropdown list contains Numbers as Items (not text), If I select the whole number like 1 , 2 , 3, In the EditScreen it works fine, but if I choose the decimal number, it will update in Excel but It won't be saved as a default value. 

 

Hope to hear from you soon, 

Thank you and have a great day.

 

2020-02-17_15h37_01.png2020-02-17_15h36_29.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Parent.Default doesn't work for decimal numbers in the dropdown list HELP

Try this on the format property of the textbox:
Text(Value(Parent.Default), "#.00")
Its most likely a formatting issues. Kindly look at this document, go to the number formatting section :
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-text

If you like this post, give a thumbs up. Where it solved your issue, Mark as a solution

View solution in original post

Highlighted
Frequent Visitor

Re: Parent.Default doesn't work for decimal numbers in the dropdown list HELP

Thank you again, I just deleted all my SharePoint data connections, and then added them again, I don't know why but It worked, It was probably the formatting issue as you mentioned. 

Have a nice day!

View solution in original post

5 REPLIES 5
Highlighted
Community Champion
Community Champion

Re: Parent.Default doesn't work for decimal numbers in the dropdown list HELP

A little clarification. You saying when you pick the decimal, it shows correctly on your form. But when you save, the decimal portion doesn't appear in Excel.
Highlighted
Frequent Visitor

Re: Parent.Default doesn't work for decimal numbers in the dropdown list HELP

Thank you for your response, When I pick the decimal, it shows correctly on my form and in Excel too. But when I want to modify it in the app, if my selected value is a whole number, my default value will be the whole number which I entered previously; but if my previously Selected value is a decimal number, then in the Mode Modify, my default value is lost (it will show the default value of the FormMode. New  while I want it to show the default value of the EditForm. Mode). Ex: I entered 2, I Submitted form, I decided to modify it, in the EditScreen 2 ; will be displayed and I can modify it. I entered 2.25, I Submitted form, I decided to modify it, in the EditScreen 0; will be displayed  (instead of 2.25) and I can modify it.  I have no problem with Excel, If I cancel my Modification, In Excel 2.25 will be displayed as expected.
Highlighted
Community Champion
Community Champion

Re: Parent.Default doesn't work for decimal numbers in the dropdown list HELP

Try this on the format property of the textbox:
Text(Value(Parent.Default), "#.00")
Its most likely a formatting issues. Kindly look at this document, go to the number formatting section :
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-text

If you like this post, give a thumbs up. Where it solved your issue, Mark as a solution

View solution in original post

Highlighted
Frequent Visitor

Re: Parent.Default doesn't work for decimal numbers in the dropdown list HELP

Thank you again, I just deleted all my SharePoint data connections, and then added them again, I don't know why but It worked, It was probably the formatting issue as you mentioned. 

Have a nice day!

View solution in original post

Highlighted
Community Champion
Community Champion

Re: Parent.Default doesn't work for decimal numbers in the dropdown list HELP

You can close it by making as a solution so other users can find it.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (5,887)