0
votes

I currently have a PowerApps app that is connected to a SQL Server database with information about books. I am trying to make a hybrid screen that displays a gallery of books. I cannot figure out how to make the price and book id display when one of the book records is selected.

Here is the book overview screen. enter image description here

2

2 Answers

0
votes

Really, we need more information about the Data source to give an accurate answer. Here is a guess and I can update if you supply more details of the SQL table and it's columns:

When a user clicks on a line in your gallery, you can set a variable of the selected record to be used in another UI element. So, click on the list row, override the OnSelect attribute to Set() a value of ThisItem (The selected Book) to a variable varBook (or whatever you want to call it):

enter image description here

Now, in your other text fields on the UI element you want to display details of the selected book, set the Text value to be the attributes of the record: varBook.ID and varBook.price in this case.

0
votes

Unless I'm understanding it wrong, you should just do Select(Parent) on OnSelect property of the gallery item. Display BookID and Price as BookGallery.Selected.BookID and BookGallery.Selected.Price.