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 / Submit, Last Submit
Power Apps
Unanswered

Submit, Last Submit

(0) ShareShare
ReportReport
Posted on by 84

Hi PowerApps Friends

Can you help with this?

This is the scenario.......

a) I have a gallery which shows a list of customer locations - i.e. a customer may have more than one shipping location. Because of space the Gallery only shows 4 fields so that the user can see which location is which. 

b) I have added a 'Plus' icon so that the user can click this to add a new location against the customer that they have selected.

c) So far I have managed the following which only works up to a point - i.e. the new record is saved and the fields I require to be patched through are patched through. 

QUESTION: How do I Navigate to the record that has just been created so that the user can input further data, rather than one of the locations that have already been created. I am trying to achieve a seamless user experience so I'm trying to do it on one click.

Thank you

 Set(
varRecord,
ThisItem
);
Patch(
CCLBPLocs,
Defaults(CCLBPLocs),
{'Loc BPRef': varRecord. 'Loc BPRef', 'Loc BPName': varRecord. 'Loc BPName'}
);
Navigate('New BP Location Form');
EditForm('New BP Location Form');

Categories:
  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @Lilywhite63 

    The patch function returns the newly created record. Therefore, you can save this to the variable (eg varNewRecord).

     

    Set(
     varRecord,
     ThisItem
    );
    Set(
     varNewRecord,
     Patch(
     CCLBPLocs,
     Defaults(CCLBPLocs),
     {'Loc BPRef': varRecord. 'Loc BPRef', 'Loc BPName': varRecord. 'Loc BPName'}
     )
    );
    Navigate('SCREEN for Edit Form');
    EditForm('New BP Location Form');
    
    

     

    You can then navigate to a screen that contains your edit form. The Item property of the edit form would be set to varNewRecord. This should hopefully give you the seamless experience that you're looking for.

     

     

     

  • Lilywhite63 Profile Picture
    84 on at

    Hey Timl

    that worked perfectly - however, I did forget to add something in my last email. I think it's best to show you a screen shot of my screen.

    Many apologies for the scribble

    Lilywhite63_0-1643903908235.png

    1 = a Gallery list which shows a list of all customers. When the user selects a customer, their details appear in a separate form on the same screen highlighted = 2

    At the same time - and from a different table but with a link (in the case shown [BP-1003] - the locations assocated with that customer are shown in a different Gallery = 3.

    I have created a New Screen call New BP Locations which I want to use whether a current location is being Edited or whether a New Location is being created.

    On the Edit Icon = 4, I have OnSelect=ResetForm('New BP Location Form'); Navigate('New BP Location Form'); EditForm('New BP Location Form'). This worked perfectly before I started working on the Add Icon

    On the Add Icon = 5, I have the following: ResetForm('New BP Location Form'); Navigate('New BP Location Form'); EditForm('New BP Location Form')   

    On the new screen on the Item=varNewRecord

    However, now the original edit does not work as the Item property is looking for varNewRecord. This is totally my fault as I didn't give you all the information in the first instance. I am very new to PowerApps so appreciate any and every piece of help you can give me.

    thank you - I hope this is understandable! Julia

     

  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @Lilywhite63 

    To work around this, you can set varNewRecord to the record that you want to edit when you click the edit icon. Note that you might consider renaming varNewRecord to something like varCurrentRecord if that makes more sense.

    Assuming that the locations part of your screen is a gallery control and that you've placed the edit icon in the template of the gallery, this should hopefully work.

    Set(varNewRecord, ThisItem);
    ResetForm('New BP Location Form'); 
    Navigate('New BP Location Form'); 
    EditForm('New BP Location Form')
  • Lilywhite63 Profile Picture
    84 on at

    Hi Timl 

    After further investigations, what is happening is that.

    When I click the edit icon, the correct address appears for editing however when I click the add icon an actual record is added in the table and the Ref and Name (from the patch) are coming through. What is not happening is that the New BP Location Form is a) not picking up this data to enable the user to complete it but b) is showing the information from the selected record in the original gallery.

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard