cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Frequent Visitor

Re: New Form ID is empty

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,753)