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

decimal number disappears after open EditForm in canvas app

Hi,

 

I have queastion about EditForm in canvas app based on excel file (onedrive).

For DataCardValue I set format as Number and when I put whole number into it is ok but decimals disappears when I'm opening EditForm once more time.

 

Is it possible to fix?

From my site necessary is to allow users only to put decimal numbers into field but these numbers should stay there when user try to change other value.

 

Many thanks for any help 😉

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@pagaczpagacz
A few steps here:

1. Change the Text Input format back to text
2. Put this code in the Default property of the text input

Text(ThisItem.your_field_name,”0.00”)

3. Put this code in the Update property of the Card

Value(TextInput1.Text)

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

View solution in original post

11 REPLIES 11
Super User III
Super User III

@pagaczpagacz
A few steps here:

1. Change the Text Input format back to text
2. Put this code in the Default property of the text input

Text(ThisItem.your_field_name,”0.00”)

3. Put this code in the Update property of the Card

Value(TextInput1.Text)

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

View solution in original post

@mdevaney 

Thanks for quick reply.

It looks very good but i need comma as separator so it is good only for one time.

When I'm opening EditForm second time PowerApps rewrite commas into dots.

So next time (afrer rewrite) I try to edit sth decimal value still dissapear.

If Power Apps force me to use dot as separator i can handle it in Power Querry later then but I have to handle dissapearing first.

These number are necessary for excel calculations (get data from this excel connected with powerapps).

@pagaczpagacz
Are you saying you need this format instead?

Text(ThisItem.your_field_name,”#.##0,00”)

I am from Canada and we use the comma and dot separators in the opposite way 😉

@mdevaney 

Text(ThisItem.'my_field_name';"[$-pl-PL]0,00") (this bold sth I can not delete)

I'm from Poland 😉 so we use only comma to separate decimals and dots only for separate 1000 in financial (not applicapble) 😅

So yes - I need to force user to put value eg. 76,8 instead of 76.8

It is not necessary to show this value in DetailForm as 76,8 but this value can not dissapears.

Ah - you are using , to separate parameters. In PL version both O365 and PowerPlatform we are using ; and " it is not italic.

When I used your ""  it was not working 🤔

@pagaczpagacz 

From reading your response: I believe I am trying to solve a different problem than the one you wanted to be solved.  To ensure I understand correctly: is your problem simply that the value will not save to Excel once it is changed in your form?

 

To the save the changes to Excel you would need to have a button the user can click to submit the form.  Make a new button and put this code in the OnSelect property

 

SubmitForm(your_form_name)

 

 

While troubleshooting its nice to know if any errors are occurring.  To check if the form is successfully submitting data to Excel you can put this code into the Text property of a label.

 

your_form_name.Error

 

 

---
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." 

It is not necessary - it is properly stored into Excel - I can see it in Excel table, but when I try to edit another value from app - last value(s) disappears.

@pagaczpagacz 

You are from Poland?  Right now I am watching the Witcher on Netflix.  I understand this is originally a Polish story. I am not yet done the season but I am enjoying it very much 🙂

 

Yes, there are some silly notes differences between countries in PowerApps.  This makes it harder to troubleshoot with others on the forum sometimes.

  • Comma becomes semi-colon (to separate arguments in a function)
  • Semi-colon becomes double semi-colon (to terminate a line of code)

 

The double-quotes are a separate problem altogether.  I like to make forum posts on my iPhone.  The iPhone makes weird double-quotes that do not work at all.  It can be frustrating.

@pagaczpagacz 

Perhaps a screenshot or two to show me the problem would be perfect here.  For some reason I am not understanding what problem you want to solve.  A screenshot or two often helps.

@mdevaney 

Yes, I'm form Poland, and yes Witcher is also from Poland 😉  Mr. Sapkowski wrote this story.

 

I tried in different places and:

via make.powerapps - it is working properly

via Teams connector to PowerApps - it is not working (still disappearing)

via web browser as connector in Teams - it is working properly

via web browser - it is not working

😅

Sreenshots attached.

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (9,676)