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 / ICON prefill and navig...
Power Apps
Answered

ICON prefill and navigate to account screen not working

(0) ShareShare
ReportReport
Posted on by 1,512

I have several screens and they will all have this icon in the gallery

Dorinda_0-1642523436903.png

I have this code on the ICON

Set(glbSelectedRecordID, ThisItem.ID);

Select(Parent);
FormMode.View;
Navigate('Substation Screen')

When you click on this icon from any of the galleries it navigates to the account screen using the id of the record selected.

Dorinda_1-1642523683003.png

I have this code on ITEM in the form

LookUp(Substations, ID=glbSelectedRecordID)

The issue is that it is not working consistently, additionally I need to have the list in the gallery beside the account information also select that location as well, it has the same code on the arrow.

How can I make this work no matter what page or from the accounts page fill in the form?

Categories:
  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    Hi @Dorinda ,

    The Lookup on the ID Variable should work (I use the same syntax on almost every form I have), however I noticed two things

    Set(glbSelectedRecordID, ThisItem.ID);
    Select(Parent);
    ViewForm(YourFormName);
    Navigate('Substation Screen')

    You have used Select(Parent) which is the gallery - do you have any code on the OnSelect of the gallery? You have not stated the Form Name that you want to put into the mode.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

     

     

     

     

  • Dorinda Profile Picture
    1,512 on at

    @WarrenBelz 

     

    Ok this is now on the icon

    Set(glbSelectedRecordID, ThisItem.ID);
    Select(Parent);
    Form1.Mode = FormMode.View;FormMode.View;
    Navigate('Substation Screen')

     

    Which gallery the one that the Icon lives in or the one in the account screen?  It has the same code as above

     

    Nothing is still flowing through though to the Form on the Account Screen

     

  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    Hi @Dorinda ,

    Sorry brain fade on part of this - it should be

    Set(glbSelectedRecordID, ThisItem.ID);
    Select(Parent);
    ViewForm(Form1);
    Navigate('Substation Screen')

    but that is not your issue - you are using on the Gallery OnSelect

    Set(glbSelectedRecordID, ThisItem.ID);

    which sets the Variable to the current selected ID
    The Item of the Form is

    LookUp(Substations, ID=glbSelectedRecordID)

    and should work. What are the Items of the gallery ?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Dorinda Profile Picture
    1,512 on at

    @WarrenBelz 

     

    This is what is on the Items property of Gallery4: SortByColumns( Filter( '3 Phase Regulators', IsBlank(ComboBox1.Selected.Title) || (Station in ComboBox1.SelectedItems.Title) ), "Station", Ascending ) 

     

    This is what is on the Items Property of Gallery2 in the accounts screen: Substations and the icon has the code you provided above.

     

    The items property on Form 1 has this.  LookUp(Substations, ID=glbSelectedRecordID) 

    I am not sure how to get it to work when I click the icon from either of the galleries to always prefill the form.

  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    Hi @Dorinda ,

    So that I completely understand what you want to do here, you have two galleries, Gallery2 is based on the List Substations and Gallery4 on '3 phase Regulators'. You have a form that is currently displaying the record selected in Substations and is working correctly. Are you trying to get the form to display the record selected in Gallery4?

  • Dorinda Profile Picture
    1,512 on at

    @WarrenBelz  yes, regardless of how they get there either from the icon or the arrow i want it to prepopulate the form.

  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    Hi @Dorinda ,

    You can only display records from one list on the form - it is currently Substations. You will need another Form based on '3 phase Regulators' unless you have a unique identifier from Substations in the '3 phase Regulators' List.

  • Dorinda Profile Picture
    1,512 on at

    @WarrenBelz 

     

    Not exactly what I am requesting.  

     

    What I am looking to have happen is two points to get to the same form.  Meaning if I click the icon it prefills the Form with the record of the item selected.  3 Phase Regulators is just one of those clicks, same thing applies if I click the button on the Stations screen it will prefill the same set of information.

     

    So we are not trying to get the 3 Phase Regulators as much as navigate to the screen and have the form pre fill.  I have additional information below the form that fills once that form is filled.

     

    Hope that helps get us to a solution.

     

    Dorinda

  • WarrenBelz Profile Picture
    156,566 Most Valuable Professional on at

    Hi @Dorinda ,

    Sorry I am a little lost here. You have a Form based a record in Substations. In your last post you said this

    regardless of how they get there either from the icon or the arrow i want it to prepopulate the form.

    Do you want the form to populate from Substations when you click on a '3 Phase Regulators' record ? As I asked before, are they related with a common field?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • Dorinda Profile Picture
    1,512 on at

    @WarrenBelz 

     

    So the concept is that they have a navigation panel which has a various amount of list, when they go into the any of those screens there will be an icon beside each of those records.  When they click on that icon we want to prefill the form with the STATION information, this intern will populate other data on the screen.

     

    The primary key is the Station. 

     

    Additionally the STATION screen has a gallery that has an arrow icon on it that should also when clicked will prefill the form with that station information.

     

    So both icons should go to the same location when clicked, either from gallery 4 or gallery 2 will navigate them back to the Station Screen.

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 383 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 356

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard