hardMultiple ChoiceObjective-mapped
PL-900 Practice Question: A Power Pages site uses a custom Liquid template…
A Power Pages site uses a custom Liquid template to display a list of upcoming events. The events are stored in a Dataverse table with a date field. The template should only show events that occur in the future. Which Liquid filter or condition is most appropriate?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use an 'if' condition inside the 'for' loop to compare event date to current date.
Liquid does not have a built-in date comparison filter like 'where_exp'. Instead, you can use the `assign` tag to store the current date/time, then use an `if` condition inside a `for` loop to compare each event date to the current date. Option C is correct because this approach allows dynamic comparison within the loop. Option A is incorrect because the `where` filter does not support dynamic date comparisons; it can only compare static values. Option B is incorrect because the `date` filter is used for formatting dates, not for filtering. Option D is incorrect because `group_by` groups events by a field but does not filter based on date.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use the 'where' filter with a date comparison.
Why it's wrong here
The 'where' filter in Liquid does not support date comparisons; it only checks equality or string matching.
- ✗
Use the 'date' filter to format dates and then compare strings.
Why it's wrong here
Comparing formatted date strings is unreliable and not best practice; it's better to compare actual date values.
- ✓
Use an 'if' condition inside the 'for' loop to compare event date to current date.
Why this is correct
This allows you to filter events by comparing each event's date to the current date using Liquid operators.
- ✗
Use the 'group_by' filter to group events by date and then select future ones.
Why it's wrong here
Grouping does not filter; you would still need to iterate and filter.
Go deeper
Related to this question
About these practice questions
One of 904 original PL-900 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PL-900 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PL-900 exam.