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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Is it achievable?

(0) ShareShare
ReportReport
Posted on by 61

Hi,

I am new to Powerapps and before I go and create an app, I would like to run by you what I would like the app to do.

 

I have 2 tables on a SQL Server, Employees and TrainingHistory.

 

The Employees table has the following fields; EmployeeID (Primary Key), Name, Department.

 

The TrainingHistory table has the following fields; TrainingID (Primary Key), EmployeeID, TrainingCode, TrainingDescription, DateCompleted, Trainer, Duration, Signature.

 

What I would like the app to do is display a list of employees in Screen 1 (Gallery I presume). When you tap on an employee’s name it will show Screen 2 (Details I presume) listing all the training items as separate records/data cards. When you tap on a training item, it will show Screen 3 (Edit Details) where it displays the Training Code and Description as labels and Date Completed, Trainer and Duration and Signature as text/pen input fields. The trainer enters the Date Completed, Trainer and Duration and gets the employee to sign as receiving/understanding the training.

 

The trainer then clicks on a ‘Save’ button which will then update the TrainingHistory table with Date Completed, Trainer and Duration and Signature, create another record/row ‘copying and pasting’ the EmployeeID, TrainingCode and TrainingDescription, and return to Screen 1.

 

Also, when a trainer opens Screen 3 for a particular Training Item, it will not display the data card that has already been signed.  

 

Hope this makes sense.

 

My questions are, is this achievable and what is the best way to design the app?

 

Many thanks.

Categories:
I have the same question (0)
  • timl Profile Picture
    36,415 Super User 2025 Season 2 on at

    Hi @mick3911 

    Yes, this is definitely achievable. The high level steps I would carry out are this:

    1. Create a new app. Choose the 'start from data' option and base your app on the Employees table. This will create a basic app with a browse screen for the Employees table that you can customise.
    2. On Screen2, add a Gallery control and configure it to display the training records for the selected employee.
      To do this, I would first create a SQL View on the TrainingHistory table to filter out the records where the Signature field is not blank. I would then set the Items property of the Gallery control to something like this:
      Filter('[dbo].[ViewTrainingHistory]', EmployeeID=Screen1GalleryControl.Selected.EmployeeID)
    3. On Screen 3, I would add an Edit form. Set the 'Data Source' property to the TrainingHistory table, and the Item property to this:

      LookUp(TrainingHistory, TrainingID=Screen2GalleryControl.Selected.TrainingID)

       

    There's plenty more detail I could add, but this will broadly give you what you need. Feel free to ask if you need any further clarification.

    Good luck!

  • v-xida-msft Profile Picture
    on at

    Hi @mick3911 ,

    Based on the needs that you mentioned, I think PowerApps could achieve your needs.

     

    I have made a test on my side, please take a try with the following workaround:

    1. Add a Gallery control (Gallery1) in your first screen, set the Items property to following:

    '[dbo].[Employees]' /* <-- List all your available employees */

    set the OnSelect property of the Gallery1 to following:

    Navigate(Screen2, ScreenTransition.None)

    2. Add a second Gallery (Gallery2) within your second screen, set the Items property to following:

    Filter('[dbo].[TrainingHistory]', EmployeeID = Gallery1.Selected.EmployeeID)

    Set the OnSelect property of the Gallery2 to following:

    Navigate(Screen3, ScreenTransition.None)

    3. Add a Edit form (Form1) within your third screen, connect it to your '[dbo].[TrainingHistory]' SQL Table. Set the Item property of the Edit form to following:

    Gallery2.Selected

    or

    LookUp('[dbo].[TrainingHistory]', TrainingID = Gallery2.Selected.TrainingID)

    Add a "Submit" button, set the OnSelect property to followig:

    SubmitForm(Form1)

    Set the OnSuccess property of the Form1 to following:

    Navigate(Screen1, ScreenTransition.None)

    Set the Visible property of the Form1 to following:

    If(
     IsBlank(Gallery2.Selected.Signature),
    true,
    false )

    Add a Label control within the center of your Screen3, set the Text property to following:

    "This Item You Want To Update Has Been Signed Already"

    set the Visible property of this Label to following:

    If(
     !IsBlank(Gallery2.Selected.Signature),
     true,
     false
    )

    Please consider take a try with above solution (detailed steps), then check if the issue is solved.

     

    Best regards,

  • mick3911 Profile Picture
    61 on at

    Gents,

    Many thanks for your response.

    Due to work commitments I won't be able to try your solutions out for a few weeks yet.

     

  • mick3911 Profile Picture
    61 on at

    Hi v-xida-msft,

    Your solution works great except that on Screen 2 it only shows one record where I am after showing all records relating to the particular Employee ID selected.  

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard