cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Oskarkuus
Level: Powered On

Dont understand why i cant save decimals to sharepoint list from Powerapps, need help!!

Hey

I have this setup in a form:

screenshot 1: http://prntscr.com/q0gso9

first textinput is where i type in my starting time

second textinput is where i type in my endtime

third textinput is wher hours are calculated based on the timeinput.

 

everything works. I type in and i get a result that i like.

the caluclation code looks like this:

START TIME INPUT:

If(IsMatch(timefrom1_7.Text;":";Contains);Set(varTimeFormat1_5;timefrom1_7.Text);Set(varTimeFormat1_5;Text(Value(timefrom1_7.Text);"[$-sv-SE]##:##")));;
Reset(timefrom1_7)
&
Set(varTest1_5;DateDiff(DateTimeValue(varTimeFormat1_5;"sv-SE");DateTimeValue(varTimeFormatTo1_5;"sv-SE");Minutes)/60) & If(varTest1_5>=5;Set(varTest1_5;varTest1_5-0,5);varTest1_5)

END TIME INPUT:

If(IsMatch(timeto1_7.Text;":";Contains);Set(varTimeFormatTo1_5;timeto1_7.Text);Set(varTimeFormatTo1_5;Text(Value(timeto1_7.Text);"[$-en-US]##:##")));;Reset(timeto1_7)
&
Set(varTest1_5;DateDiff(DateTimeValue(varTimeFormat1_5;"sv-SE");DateTimeValue(varTimeFormatTo1_5;"sv-SE");Minutes)/60) & If(varTest1_5>=5;Set(varTest1_5;varTest1_5-0,5);varTest1_5)

 

Both above codes are put in the ONCHANGE function.

 

Both start time input and end time input have in the Default function this:
Starttime textinput: varTimeFormatTo1_5
Endtime textinput: varTimeFormat1_5

 

The result of the caluclation is the presented in the third textinput with the variable varTest1_5 in the default function of that textinput.

 

It works to type a time and calculation runs.

i type 12:00 to 13:30 and get 1.5 hours. perfect.

But when i submit the form 1.5 becomes 15 in the sharepoint list that is my datasource.

 

WHY is the dot/comma removed?!

im getting crazy over this!!

 

 

 

 

1 REPLY 1
v-siky-msft
Level 10

Re: Dont understand why i cant save decimals to sharepoint list from Powerapps, need help!!

Hi @Oskarkuus ,

 

Some essential information is needed:  

Do you mean the three textinput boxes are in the Form DataCard?

Which column do they correspond to? And what is the type of that column?

What is the Update property of Data Card ?

 

I have followed your steps and made a test, the decimals number can be saved to SP list successfully.

Annotation 2019-11-25 111407.png

 

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,226)