cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Aleksandra1
Helper V
Helper V

Return last submitted record

Hello, I want to return last submitted record without creating a new screen, that is the point. I have a screen "Form for CS department" and form "Form_Control_CS_Department", and for example "Contract #" (primary key) is 19065341:

axampleOflast.png

After user click "Submit" button, he will be moved to "Success screen". On "Success screen" user has a possibility to click button "Check  data". This button move user to the record in View Mode, which has just been submitted (for this case I have created a new screen and form, where Items = Form_Control_CS_Department.LastSubmitted). In this View mode user have button "Edit":

lastsubmitted.png

You can see a variable varEditCS on start of app I have a line Set(varEditCS, false). So when user click this button he will be moved to a form, which was in the first picture:

lastsubmittedcode.png

You can see my code, where I am saying if variable is true (in case when button "Edit" was clicked), than return Last Submitted record, else return what was choosen in a gallery.

But it does not return me last record I don't know why.

1 ACCEPTED SOLUTION

Accepted Solutions
SebS
Memorable Member
Memorable Member

@Aleksandra1 

 

You need to use on Edit button 

 

 

 

Set(varEditCS,true)

 

 

but you have varEditCS =true what is not how variable is created or change

 


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

View solution in original post

2 REPLIES 2
SebS
Memorable Member
Memorable Member

@Aleksandra1 

 

You need to use on Edit button 

 

 

 

Set(varEditCS,true)

 

 

but you have varEditCS =true what is not how variable is created or change

 


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.
Aleksandra1
Helper V
Helper V

Thank you, that works🙂

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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