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
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 41 members 4,086 guests
Recent signins:
Please welcome our newest community members: