cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

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
Community Support
Community Support

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (44,040)