cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nick2020
Level: Powered On

New Form ID is empty

Hello all,

 

I am trying to check if an user is submitting a new form. If it is a new form (not Edit), On Submit Button, I want to set RequestDate to today. This should only happen to first time submit. 

 

Following code is not setting the RequestDate to today's date as it seems LastSubmit.ID is coming as blank.

 

Please help. I quick response is greatly appreciated. 

 

Thanks, Nick

Spoiler
If(SharePointForm1.Mode = New, Patch(List_Request, {ID: SharePointForm1.LastSubmit.ID},
       {   
            RequestDate:Today()
        }));  
SubmitForm(SharePointForm1)
1 REPLY 1
Highlighted
Nick2020
Level: Powered On

Re: New Form ID is empty

If(SharePointForm1.Mode = New, Patch(List_Request,{ID: SharePointForm1.LastSubmit.ID},
       {   
            RequestDate: Today()
        })); SubmitForm(SharePointForm1)
        

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (4,772)