cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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
v-bofeng-msft
Community Support
Community Support

Hi @Anonymous :

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
KrishnaV
Super User
Super User

Hi @Anonymous ,

 

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.


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,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
v-bofeng-msft
Community Support
Community Support

Hi @Anonymous :

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

Anonymous
Not applicable

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,267)