cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Faro
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)

Picture1.png

 

Picture2.png

 

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.

Picture3.png

 

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,
    "EI"&Right(Text(Year(Today())),2)&"-"&
    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)))),
    Parent.Default)

 

 

 

 

 

2 REPLIES 2
Faro
Advocate I
Advocate I

Up.

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

Faro
Advocate I
Advocate I

Please help ...

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,367)