A few issues I'm running into with Training curriculum/review Power App.
Parent List: Training Curriculum
Child List: Training Ratings
Training Ratings has a ParentID column that looks up to ID column in Training Curriculum
User can lookup course(s) then go to the Reviews screen to submit a review, which patches to Training Ratings list.
Home Screen is where course lookup happens
galHome displays the records using this Items property that includes Search box, dropdown and combo box and sorts by 'field_2':
SortByColumns(Filter(
'Training Curriculum',
txtSearchGalHome.Text in 'Training name',
ddnTrainingType.Selected.Result = TrainingType.Value,
cmbExpLevel.Selected in ExperienceLevel
),"field_2")
In galHome, I have OnSelect property that sets varRecord to:
Set(
varRecord,
ThisItem
)
Issue 1: I'm certain varRecord is being set correctly here, but sometimes the colReviews table doesn't get set when the "Learn More" button is clicked. See error on scrLearnMore "the function Average cannot be used with an empty table"
In galHome Learn More button OnSelect property creates collection 'colReviews' to capture all the ratings and reviews for that course:
Select(Parent);
ClearCollect(
colReviews,
Filter(
TrainingRatings,
ParentID = varRecord.ID
)
);
Navigate(
scrLearnMore,
ScreenTransition.Fade,
{itemToEdit: varRecord}
)
Issue 2: I'm using the Ratings control to get each of the Overall Rating, Methodology, Content, and Trainer average of all the reviews for that training course. This control is lacking functionality IMO because I have an Overall Rating of 2.9, but the control shows 2 Stars. I've tried using Round, then Average as seen in Methodology example, but still same output. Is there a way to add in "If" in the Ratings Default property that rounds down if the value is #.0-#.4 and rounds up if the value is #.5-#.9?
------------------------------
Beth Beck
O365 Business Analyst
Fort Myers FL
------------------------------