Courseiva
SPL Search ProficiencymediumMultiple ChoiceObjective-mapped

SPLK-5001 SPL Search Proficiency Practice Question

You want to use the 'eval' command to create a new field 'is_critical' that is 'yes' if 'severity' is 'high' or 'critical', and 'no' otherwise. Which syntax is correct?

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

eval is_critical = if(severity IN("high", "critical"), "yes", "no")

The 'if' function combined with 'in' or 'OR' logic is required.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • eval is_critical = if(severity=="high" || "critical", "yes", "no")

    Why it's wrong here

    The '||' operator is not used for string comparison in this way.

  • eval is_critical = case(severity="high" OR "critical", "yes", 1=1, "no")

    Why it's wrong here

    The syntax for OR requires full field comparisons.

  • eval is_critical = if(severity IN("high", "critical"), "yes", "no")

    Why this is correct

    The IN operator and if function are the cleanest way to handle multiple matches.

  • eval is_critical = switch(severity, "high", "yes", "critical", "yes")

    Why it's wrong here

    The switch command uses different syntax than the if function.

About these practice questions

This SPLK-5001 question is part of Courseiva's 203-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official Splunk exam blueprint

This SPLK-5001 practice question is part of Courseiva's free Splunk 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 SPLK-5001 exam.