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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Trying to replicate an...
Power Apps
Unanswered

Trying to replicate an invoice number generation formula :/

(0) ShareShare
ReportReport
Posted on by 55

Hi Community,

 

still fairly new and yet trying to implement a time tracking and invoicing tool with PowerApps. 

This youtube video is the reference from Minute 19:00 onwards. 

 

PowerApps- Generate Billing Invoices/Auto Generate Invoice Numbers - YouTube

 

The first question for me is why do I need semicolons to get my functions to work and in the video it is only commas for the function attributes? I guess I am missing something here? 

 

This is the formula from the video: 

rockhoundXX_1-1620491834657.png

StundenzettelNR is my field value withe generated invoice Number in this case. 

When I try to use commas for the function attributes it does not work but semicolons work but throw other errors:

rockhoundXX_0-1620491818412.png

Can somebody help me or guide me here? 

I know the formula error help but I tried to change a number of things and it does not work. 

 

Thank you all in advance 🙂 

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

    Change the comma in the last portion of the formula to:

    Text(Right(StundenzettelNR ; 4)+1))})

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

    Consider Checking My Youtube Channel  

     

  • timl Profile Picture
    36,785 Super User 2026 Season 1 on at

    @rockhoundXX 

    It looks like you're using German. The German syntax uses semi-colons as the argument separator symbol in formula, rather than commas.

    This is because unlike English, the German number format uses a comma as the decimal point separator symbol for numbers. If you were to separate function arguments with a comma, there would be no way for you to pass a decimal number.

    In your example, the reason for the error is because this comma should be a semi-colon.

    timl_0-1620497597581.png

     

     

  • rockhoundXX Profile Picture
    55 on at

    Thank you for your responses, thats great to understand that german formatting is different. 

     

    Still after semicolons I get an error here: 

     

    The variable StundenzettelNR is a variable that needs to be displayed in a form field. Therefore I put in a form field. 

    It seems that this variable needs to be defined before hand and this the reason for the formula error? 

     

    Set(StundenzettelNR; First(Filter('Zeiterfassung-Stundenzettel-NR';ID=1).Title);
    UpdateIf('Zeiterfassung-Stundenzettel-NR';ID=1;{Title:Concatenate("DINGER-2021-";Text(Right(StundenzettelNR;4)+1))})

     

    rockhoundXX_0-1620587403147.png

    Any help is appreciated 🙂 Thank you 🙂

     

  • rockhoundXX Profile Picture
    55 on at

    Any other idea left? 🙂 

    I dont know what's the problem with my variable here? 

  • R3dKap Profile Picture
    1,594 on at

    If your StundenzettelNR field is a number, you need to convert it to a string before using the Left() function.

    Try this:

    Set(StundenzettelNR; First(Filter('Zeiterfassung-Stundenzettel-NR';ID=1).Title);
    UpdateIf('Zeiterfassung-Stundenzettel-NR';ID=1;{Title:Concatenate("DINGER-2021-";Right(Text(StundenzettelNR);4)+1)})

     

  • rockhoundXX Profile Picture
    55 on at

    So thanks for the help so far, it turns out that between the two actions in the formula only one semicolon is not sufficient, but rather two so ;; did the trick here (German powerapps localization). 

     

    However the desired button with the formula does not change the last four digits and increments it as desired. 

    When I do paste out the Right function below into a seperate label for testing, it does increment it, but from 1 to 2 and not from 0001 to 0002 as below: 

    rockhoundXX_0-1621196146379.png

     

     

    (Right(StundenzettelNR;4)+1

     

     So in result, the button does unfortunetely nothing as the number stays on 0000

    Could it be a formatting issue here for the desired text?

    Current code looks like this: 

     

     

    Set(StundenzettelNR; First(Filter('Zeiterfassung-Stundenzettel-NR';ID=3)).Title);; 
    UpdateIf('Zeiterfassung-Stundenzettel';ID=3;{Title:Concatenate("Std.Zettel-Nr-";Text(Right(StundenzettelNR;4)+1))})

     

     

  • R3dKap Profile Picture
    1,594 on at

    You're right... Here is the fixed code (I haven't tested it on my side though):

    Set(StundenzettelNR; First(Filter('Zeiterfassung-Stundenzettel-NR';ID=1).Title);;
    UpdateIf('Zeiterfassung-Stundenzettel-NR';ID=1;{Title:Concatenate("DINGER-2021-";Text(Right(StundenzettelNR;4)+1;"0000")})

    Just needed to format the result number into a 4 digit number... 😉

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard