cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Laurent2
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

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

Laurent2
Frequent Visitor

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
eka24
Super User III
Super User III

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.
Laurent2
Frequent Visitor

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.

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

Laurent2
Frequent Visitor

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

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,569)