web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Number is rounded up a...
Power Apps
Answered

Number is rounded up and down by Power Apps

(0) ShareShare
ReportReport
Posted on by 38

Hi, in my code an ID from Power Apps is automatically rounded down. For example,

from

093220000000010136923922010111

to

93220000000010140000000000000

It's not due to the Excel formatting.

Below is the code to write the ID into an Excel table. Can someone help me identify where I made a mistake?

Patch(
Tabelle2;
Defaults(Tabelle2);
{
'ID': Text(Value(First(Split(Eingabe.Text; "|")).Value));

 

Categories:
I have the same question (0)
  • Verified answer
    MaximusDecimus Profile Picture
    281 on at

    Hey @Peter1991 ,

     

    I believe that your Value() function is the cause for this issue - tried the same input on my end and I was able to replicate the issue. Value() is converting your text into int which removes your leading 0 and rounds the value.

     

    Hopefully you can amend the first line of your patch to the below and that should resolve your issue.

    'ID': Text(First(Split(Eingabe.Text; "|")).Value);

     

  • Peter1991 Profile Picture
    38 on at

    Perfect, that has already helped me, the number is now being transferred correctly.

    However, I am still seeing the notification "Fehler bei Übertragung".

    The "if" function is supposed to check whether the record was transferred correctly to Table 2, but it is not recognizing it.

    Do you happen to know the solution?

  • Verified answer
    MaximusDecimus Profile Picture
    281 on at

    I think you could replace most of the if() by first having your patch statement in a Set(), so something like this:

     

    Set(varNewRecord;
    Patch(
    Tabelle2;
    Defaults(Tabelle2);
    {
    'ID': Text(Value(First(Split(Eingabe.Text; "|")).Value));
    Anrede: Last(FirstN(Split(Eingabe.Text; "|"); 2)).Value;
    Titel: Last(FirstN(Split(Eingabe.Text; "|"); 3)).Value;
    Firma: Last(FirstN(Split(Eingabe.Text; "|"); 4)).Value;
    Vorname: Last(FirstN(Split(Eingabe.Text; "|"); 5)).Value;
    Nachname: Last(FirstN(Split(Eingabe.Text; "|"); 6)).Value;
    Name_zusatz: Last(FirstN(Split(Eingabe.Text; "|"); 7)).Value;
    STR_: Last(FirstN(Split(Eingabe.Text; "|"); 8)).Value;
    HNR: Last(FirstN(Split(Eingabe.Text; "|"); 9)).Value;
    PLZ: Last(FirstN(Split(Eingabe.Text; "|"); 10)).Value;
    Ort: Last(FirstN(Split(Eingabe.Text; "|"); 11)).Value;
    'Redress-Bemerkung': Dropdown1.Selected.Value
    }
    ));;

     

    then replace

    CountRows(Filter(Tabelle2; 'Sendungs-ID' = """" & Value(First(Split(Eingabe.Text; "|")).Value))) > 0;

    with

    !IsBlank(varNewRecord.ID);

    making sure to set varNewRecord to blank after the if statement:

    Set(varNewRecord, Blank());

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard