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
Community Champion
Community Champion

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

Anonymous
Not applicable

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

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,141)