Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

PowerApps issue with Form Mode

Hello all,


I have a problem when running Customized form with PowerApps.

My form will automatically count up and assign a Tracking number when we create new item (FormMode = New) and will keep that number when the item is modified (FormMode = Edit).

The logic was basically like this:

If(FormMode = New, Count up and assign new number, Parent.Default)





It works perfectly except for 1 scenario when I access to the the list page and immediate click to open an item.

In that case, it suppose to be in View or Edit mode. But instead of keeping the Parent.Default number, it count up and assign a new Tracking number, it seems to recognize the stage of Form Mode is New in that very moment.

After that I tried to click another items and it works as normal.

I finally found that if I load the list page and wait for about 2 seconds before open any item, this issue won't be exist. I've informed my team to wait around 5 seconds to ensure there is no issue with the information.



Is it the issue of SharePoint or PowerApps?

Any recommend to resolve this issue? Really appreciate your help !


My code in the tracking number field:



If(SharePointForm1.Mode = FormMode.New,
    If((Value(Last(Split(First(Sort(Export_Inquiry.Title,Title,Descending)).Title,"-")).Result) + 1) < 10,
        "000"&(Value(Last(Split(First(Sort(Export_Inquiry.Title,Title,Descending)).Title,"-")).Result) + 1),
        If((Value(Last(Split(First(Sort(Export_Inquiry.Title,Title,Descending)).Title,"-")).Result) + 1) < 100,
            "00"&(Value(Last(Split(First(Sort(Export_Inquiry.Title,Title,Descending)).Title,"-")).Result) + 1),
            If((Value(Last(Split(First(Sort(Export_Inquiry.Title,Title,Descending)).Title,"-")).Result) + 1)<1000,
                "0"&(Value(Last(Split(First(Sort(Export_Inquiry.Title,Title,Descending)).Title,"-")).Result) + 1),
                (Value(Last(Split(First(Sort(Export_Inquiry.Title,Title,Descending)).Title,"-")).Result) + 1)))),






Advocate I
Advocate I


(just got unmarked from spamming .....)

Advocate I
Advocate I

Please help ...

Helpful resources

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,915)