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 / How to Identify table ...
Power Apps
Unanswered

How to Identify table in next screen on the basis of button selected in previous screen?

(0) ShareShare
ReportReport
Posted on by 14

Please help.

I have multiple tables with all these names indicated on the screen. These are all individual buttons. If I press a button, I want to be navigated to the next screen and I want to open a form in Edit View for adding values to that particular table in the next screen.

 

for example. I have a Sharepoint list "Cement". If I press the "Cement" button, I want a form to be opened for Cement table. Similarly, I have tables Tile, WhiteCement, Admixture, Paint, etc. I do not want to create a different screen for each table separately. I want to identify the table in the next screen and then open that relevant form.

 

More Makes.PNG

Categories:
  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    hi @anujkhator ,

    Set the OnSelect Property of Each Button:

    • For each button, set the OnSelect property to navigate to the next screen and pass the table name as a parameter. Here’s how you can do it:

     

    Navigate(EditScreen, ScreenTransition.None, {selectedTable: "Cement"})

     

    Replace "Cement" with the respective table name for each button.

     

     

    • Create the Edit Screen:

      • Create a single edit screen (e.g., EditScreen) where you will display the form.
    • Add a Form Control to the Edit Screen:

      • Add a form control (e.g., EditForm1) to the EditScreen.
    • Set the DataSource and Item Properties of the Form:

      • Set the DataSource property of the form to dynamically use the table name passed from the previous screen.

     

    Switch(
     selectedTable,
     "Cement", CementList,
     "Tile", TileList,
     "WhiteCement", WhiteCementList,
     "Admixture", AdmixtureList,
     "Paint", PaintList,
     DefaultList
    )

     

     

    • Replace CementList, TileList, etc., with the actual names of your SharePoint lists or data sources.

    • Set the Item property of the form to a blank item or a default new item. For example:

     

    • Add Form Fields:

      • Add the necessary fields to the form based on the data sources. The form fields will automatically update based on the selected data source.
    • Save Changes:

      • Finally, add a submit button to save changes. Set the OnSelect property of the submit button to:

     

    SubmitForm(EditForm1);
    If(
     Form1.Error,
     Notify("Error saving data", NotificationType.Error),
     Notify("Data saved successfully", NotificationType.Success)
    )

     

     

     


    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.

  • anujkhator Profile Picture
    14 on at

    @anandm08 

     

    Thanks a Lot. Almost all of it works. However, in the next screen a new form is supposed to show up for me to make entries in the form. That's not happening. In the form section of the screen it shows "Getting Your Data"

     

    I have kept the item as blank. Not sure what was to be written there. Everything else is as per your response. Please tell me what can be done.

  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    @anujkhator  just call NewForm(formName) along with navigate function this will solve your problem

  • anujkhator Profile Picture
    14 on at

    @anandm08The form doesn't show. There are no fields being displayed.

  • anujkhator Profile Picture
    14 on at

    Hi @anandm08 The form's not showing. Please find below the screenshot. On preview it shows as blank once the button is pressed and we navigate to the next screen

     

    anujkhator_0-1719072352646.png

     

  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    @anujkhator  when you are navigating from one screen to another for the edit option use EditForm(formName) and in your case try to add the fields from clicking on the Edit option present on the right side panel.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard