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 / Get Student's Grades f...
Power Apps
Answered

Get Student's Grades from a Different Sharepoint List - ForAll Function

(0) ShareShare
ReportReport
Posted on by 33

I have a Sharepoint list(Grade List) that holds the different marks and grades to be used to rank student's results as shown below Grades.PNG

I have another list (Results List) that holds the results details of the students. I am using a Gallery of repeated tables to capture these results as shown below:

Results.PNG

I need a way to automatically grade a student once i type a mark on the Mid(%) and/or End(%) columns. E.g if i type 80 on Mid(%) column, the Grade column should automatically populate as D1. 

After spending hours trying to figure out how to pick the grades from the Grade List, i decided trying to load the Grade list as a gallery(GradesGallery) on the same Screen and making it's visible property = false. I then used a ForAll function to loop through the gallery items and assign marks if a match is found. This is what i have as a Default value for my Grade TextInput, assuming we are only grading the Mid(%) whose textbox name is MidResults: 

 

ForAll(
 GradesGallery.AllItems,
 If(
 Value(MidResults.Text) <= ThisRecord.UpperRangeMarks && Value(MidResults.Text) >= ThisRecord.LowerRangeMarks,
 ThisRecord.Grade, " "
 )
)

 

 However, I get "Expected Text Value" error. At this point I am not even sure if my approach is viable or not. If it is viable, how do I get rid of that error. If it's not viable, what's the best way to get the grades?

Categories:
  • Verified answer
    nduati Profile Picture
    33 on at

    I was able to come up with solution using LookUp function. I guess I was too tired, I forgot a simple LookUp would do 😊

     

    LookUp(
     'Grade List',
     Value(MidResults.Text) <= UpperRangeMarks && Value(MidResults.Text) >= LowerRangeMarks,
     Grade
    )

     

     

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

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard