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)