cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
grandepaci
Regular Visitor

Price from NewForm not saved in Editform

Dear Power Apps Community,

 

i am programming an App for requesting and accepting/rejected Items.

This App is connected to a sharepoint list.

 

This App contains an Editform to edit rejected items.

A Button then submits a flow for the request.

 

I am now looking for the right "OnSelect" propertie for that Button.

For new items i was using this:

 

SubmitForm(EditMenuForm);

Bestellfreigabe_1.Run(Last(Bestellfreigabe).ID)

 

Bestellfreigabe_1 being the flow and Bestellfreigabe the sharepoint list

 

The "Last" command doesnt work for rejected items, as they may be no longer on the bottom of the list.

Do you know, how to adress the current sharepoint item for the code?

 

Thanks in advance

Sincerley

grandepaci

2 ACCEPTED SOLUTIONS

Accepted Solutions
StalinPonnusamy
Super User
Super User

Hi @grandepaci 

 

Get Last Submit ID

SubmitForm(EditMenuForm);
Bestellfreigabe_1.Run(EditMenuForm.LastSubmit.ID)

 

View solution in original post

iAm_ManCat
Super User
Super User

Hi,

 

You should also move your flow run to the OnSuccess part of the form - currently even if the form fails to submit or has an error, your flow will run.

 

OnSelect of Submit button:

SubmitForm(EditMenuForm);

 

OnSuccess of Form:

Bestellfreigabe_1.Run(EditMenuForm.LastSubmit.ID)

 

Cheers,

Sancho

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

3 REPLIES 3
StalinPonnusamy
Super User
Super User

Hi @grandepaci 

 

Get Last Submit ID

SubmitForm(EditMenuForm);
Bestellfreigabe_1.Run(EditMenuForm.LastSubmit.ID)

 

iAm_ManCat
Super User
Super User

Hi,

 

You should also move your flow run to the OnSuccess part of the form - currently even if the form fails to submit or has an error, your flow will run.

 

OnSelect of Submit button:

SubmitForm(EditMenuForm);

 

OnSuccess of Form:

Bestellfreigabe_1.Run(EditMenuForm.LastSubmit.ID)

 

Cheers,

Sancho

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


rampprakash
Super User
Super User

Hi @grandepaci,

 

In Onselect of Button try

 

SubmitForm(EditMenuForm);

 

Then Click on Form and Select OnSuccess write the below code

 

Bestellfreigabe_1.Run(EditMenuForm.LastSubmit.ID)

 

Because if you are running the flow simultaneously then the update can't be available ontime.. so it will be available only on Success of the form, so we can use above functionality to achieve the same.

 

Please Mark as Answer if it's helpful

https://microsoftcrmtechie.blogspot.com

https://youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA

 

 

 

 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,764)