cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Why does this formula not update the SP list with the LastSubmitted Information?

No errors appear for the following formula, and the SP list updates perfectly EXCEPT for the sections referring to LastSubmit data (in bold). What am i missing?

 

ForAll(RiskCollection, If(!IsBlank(HazLine),Patch('Change Management Risk Assessessment', Defaults('Change Management Risk Assessessment'),{'Hazard Description':HazLine, Risk:RiskLine, 'Current Controls':CurrentControls, Con1:Consequence, L1:Likelihood, 'Risk Ranking':RR, Planned:Planned, Con2:Con2, Lik2:Like2, FinalRR:FinalRR, CMMasterID: DetailsForm.LastSubmit.ID, 'Change Title':DetailsForm.LastSubmit.'Change Title'})));

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Why does this formula not update the SP list with the LastSubmitted Information?

Hi @Cym :

Could you tell me:

  • What is DetailsForm's data source?Is it SharePoint List?

As mentioned by @KrishnaV ,whether DetailsForm.LastSubmit.ID has a value depends on whether the user has submitted DetailsForm in the current user's session.

I assume the DetailsForm's data source is a SharePoint List('Your DataSource').

If you only need to get the ID and ‘Change Title’ of the last modified record.I suggest you can get the last modified record directly through the "modifyed" field.

For example:

 

Set(Var1,Last(Sort('Your DataSource',Modified,Ascending)).ID);
Set(Var2,Last(Sort('Your DataSource',Modified,Ascending)).'Change Title');
ForAll(RiskCollection, If(!IsBlank(HazLine),Patch('Change Management Risk Assessessment', Defaults('Change Management Risk Assessessment'),{'Hazard Description':HazLine, Risk:RiskLine, 'Current Controls':CurrentControls, Con1:Consequence, L1:Likelihood, 'Risk Ranking':RR, Planned:Planned, Con2:Con2, Lik2:Like2, FinalRR:FinalRR, CMMasterID: Var1, 'Change Title':Var2})));

 

 Best Regards,

Bof

View solution in original post

3 REPLIES 3
Highlighted
Community Champion
Community Champion

Re: Why does this formula not update the SP list with the LastSubmitted Information?

Hi @Cym ,

 

DetailsForm.LastSubmit.ID work with the user's current session, this will always be blank while the user submits for the first time. However, if the user submit 2 time it will get the DetailsForm.LastSubmit.ID values.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

Highlighted
Microsoft
Microsoft

Re: Why does this formula not update the SP list with the LastSubmitted Information?

Hi @Cym :

Could you tell me:

  • What is DetailsForm's data source?Is it SharePoint List?

As mentioned by @KrishnaV ,whether DetailsForm.LastSubmit.ID has a value depends on whether the user has submitted DetailsForm in the current user's session.

I assume the DetailsForm's data source is a SharePoint List('Your DataSource').

If you only need to get the ID and ‘Change Title’ of the last modified record.I suggest you can get the last modified record directly through the "modifyed" field.

For example:

 

Set(Var1,Last(Sort('Your DataSource',Modified,Ascending)).ID);
Set(Var2,Last(Sort('Your DataSource',Modified,Ascending)).'Change Title');
ForAll(RiskCollection, If(!IsBlank(HazLine),Patch('Change Management Risk Assessessment', Defaults('Change Management Risk Assessessment'),{'Hazard Description':HazLine, Risk:RiskLine, 'Current Controls':CurrentControls, Con1:Consequence, L1:Likelihood, 'Risk Ranking':RR, Planned:Planned, Con2:Con2, Lik2:Like2, FinalRR:FinalRR, CMMasterID: Var1, 'Change Title':Var2})));

 

 Best Regards,

Bof

View solution in original post

Highlighted
Resolver I
Resolver I

Re: Why does this formula not update the SP list with the LastSubmitted Information?

OMG Bof! you are a LEGEND!! Thanks so much!! 😍

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,705)