web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Submitting a New Form ...
Power Apps
Answered

Submitting a New Form doesn't show newly created data, but previous record

(0) ShareShare
ReportReport
Posted on by 716

Hello Power Apps Community,

I hope you can help please, as I'm going around in circles. This post is long, sorry. But wanted to give some context.


In short, when create a new record via a form, how can I make it show the newly created record, and not the record I was previously viewing?

I've created a canvas app in Dataverse for Teams.

I have 2 tables "Employee" and "Transaction". It's a one to many relationship, so 1 Employee can have many Transactions.

 
The process is that on a gallery of Employee records I select one record and pass this information into a gallery of Transactions on another screen. So I see all Transactions for the Employee in the second gallery.
 
In the second gallery that is showing all Transactions, I then want to select a single Transaction record and navigate to a form to show more information about the Transaction. The OnSelect property for the selected records in the Transaction gallery has the below formula.
 
galTransaction.Selected;
Navigate(
          ScreenDetailTransaction,
          ScreenTransition.None
)
 
So I land on the ScreenDetailsTransaction
It has a form called frmDetailTransaction
Its Item property is galTransaction.Selected
 
ScreenDetailTransaction.png
 
If I click the pencil icon to edit the form frmDetailTransaction
Its OnSelect property is below:

Navigate(
          ScreenEditTransaction,
          ScreenTransition.None
)
 
This takes me to another screen called ScreenEditTransaction
This screen has another form on it called frmEditTransaction

Its Item is galTransaction.Selected this might be where I'm having a problem, but who knows...?

Here I make my change to the Transaction record and save.

Its OnSelect property is SubmitForm(frmEditTransaction)

Its OnSuccess property is below

Navigate(
       ScreenDetailTransaction,
       ScreenTransition.None
)

This then submits the changes to the database and takes me back to the screen ScreenDetailTransaction so that I can view the record.
 
This is working perfectly... Now, after all that... The problem I am experiencing is, if you look at the screenshot above, there is a + icon. This is to create a new Transaction record.
Its OnSelect property has the below formula:

NewForm(frmEditTransaction);
Navigate(
      ScreenEditTransaction,
      ScreenTransition.None
)
 
So this takes me to the ScreenEditTransaction
With the form frmEditTransaction
Which I've already stated its properties above.
 
But what happens is when I submit the changes of the new record I'm creating and I navigate back to the ScreenDetailTransaction my newly created Transaction record is not showing, instead the form shows the last Transaction record I clicked on before creating a new record.
 
How can I make the newly created transaction record show in the frmDetailTransaction form once it's been created and not the last transaction I viewed on that form?
 
Any help would be greatly appreciated. I'm sure I'm doing something wrong. It can't be this difficult. Thanks very much. 
 
Garry
Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @GarryPope 

    This IS a good place for a variable!

    In the OnSelect of the Transaction gallery set the formula to the following:

    Set(glbSelectedTransaction, ThisItem);
    Navigate(ScreenDetailTransaction, ScreenTransition.None)

    Set the Item property of the frmDetailTransaction AND the frmEditTransaction forms to the following:

    glbSelectedTransaction

     In the OnSuccess action of the frmEditTransaction form, set the formula to the following:

    Set(glbSelectedTransaction, frmEditTransaction.LastSubmit);
    Navigate(ScreenDetailTransaction, ScreenTransition.None)

     

    This should resolve the issue you are having as your DetailForm was based on the Gallery selected Item and not the new form information (which the OnSuccess formula above will correct).

     

    I hope this is helpful for you.

  • CU01081947-0 Profile Picture
    716 on at

    Hello @RandyHayes,

    I spent the entire day yesterday, almost every hour of that day, trying different things. Thanks so much for your help. You have no idea how pleased I am to have got this last bit solved. I would have never of done it without your help. Also, I see on YouTube you have the PowerApps Form Plus video. I'll be watching that this morning.

     

    Thanks again!

    Garry 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @GarryPope 

    So happy to help out!  I am glad you got past that.  I hope you enjoy that video as well - it is a long one, but packed full of good stuff.

  • CU01081947-0 Profile Picture
    716 on at

    Hello @RandyHayes,

    Your YouTube video was the best! I learnt more in 2 hours than I have in weeks/months wrestling with forms. You're a brilliant trainer.

    Just take a look at my demo form. It's not going to win any beauty contests, but it's super functional. This is going to be my reference app for forms, so when I build a new form I'll come back to it.

     

    Ugly Form.png

     

    Once again, thanks so much for making this.

    Garry

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @GarryPope 

    Beauty is in the eye of the beholder!!  

    I am glad the video was helpful for you.  It's a lot of stuff, but once you get Forms in your mind, it's hard to avoid them.

    I will say personally that when I started PowerApps years ago, I avoided the EditForm like the plague.  It seems clunky and there were too many moving parts and I thought I would just build it all myself - better!  That's a developer thinking for ya.  I took off the dev hat and dug in to explore after a while and realized that the form did pretty much everything already that I was spending days trying to make work. 

    I will say now that I use the form just about everywhere.  Oddly enough I rarely use the actual form as the interface for users, that I like to design on my own, but I use the form as a base for all the real work (kind of like I did in the video with the W4 form).

     

    Keep up the good work!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 385

#2
Vish WR Profile Picture

Vish WR 367

#3
timl Profile Picture

timl 340 Super User 2026 Season 1

Last 30 days Overall leaderboard