Splitting a pipe-delimited recordId parameter in a Power Apps custom page with Power Fx

Build Power Apps code apps
Answer Correct answer: A, C — Use Left(..., Find('|')-1) for the part before the pipe and Right(..., Len-Find('|')) for the part after it, splitting recordId.

You create a custom page that is used as a contextual dialog in a model-driven app. The app must be able to receive two contextual parameters by passing a concatenated string. The string must use the pipe (|) symbol with the recordId parameter. You need to compose the formulas to extract parameter information. Which two formulas should you compose? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  1. Left(Param("recordId"), Find("|", Param("recordId")) - 1) Correct Answer
  2. Left(Param("recordId"), Len(Param("recordId")) - Find("|", Param(“recordId")))
  3. Right(Param("recordId"), Len(Param("recordId")) - Find("|", Param(“recordId"))) Correct Answer
  4. Right(Param("recordId"), Find("|", Param("recordId")) - 1)

Community Votes

AC
100%

100% of anonymous learners picked answer AC. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

Left(Param('recordId'), Find('|', Param('recordId')) - 1) returns the substring from the start up to (but excluding) the pipe. Right(Param('recordId'), Len(...) - Find('|', ...)) returns the remainder after the pipe. Together they split the string into its two parameters.

A custom page receives two contextual parameters concatenated with a pipe in Param('recordId'). To extract both values you need a Left formula that grabs everything before the delimiter and a Right formula that grabs everything after it, using Find to locate the pipe position.

Mixing the Left/Right lengths — option B uses Len - Find for a Left (wrong length) and option D uses Find - 1 for a Right (wrong length). The correct pairing is Left with Find-1 and Right with Len-Find.

Community Discussion (4 comments)

PRash3566 👍 9
Should be AC
loftuscheek 👍 1 Selected: AC
Summary Correct Formulas: Option A: Correctly extracts the left part (before the pipe). Option C: Correctly extracts the right part (after the pipe). Incorrect/False Approaches: Option B: Although it might yield the correct output in some cases, it is conceptually less clear and not the best approach. Option D: Incorrect because it does not reliably calculate the correct substring length for the second parameter. Final Answer: The two formulas you should use are Option A and Option C.
rp2 👍 1 Selected: AC
The correct formulas to extract the parameter information are: A. Left(Param("recordId"), Find("|", Param("recordId")) - 1) This formula extracts the part of the string before the pipe (|) symbol. C. Right(Param("recordId"), Len(Param("recordId")) - Find("|", Param("recordId"))) This formula extracts the part of the string after the pipe (|) symbol. These two formulas together will allow you to split the concatenated string into its two contextual parameters.
DevInProgress 👍 3
A and C are correct because: A: It extracts the left part before the delimiter |, which is essential to obtain the first parameter. C: Extracts the right part after the delimiter |, which is necessary to obtain the second parameter. The formulas exactly follow the logic for splitting a delimited string.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

The concatenated string has the form 'value1|value2'. Option A, Left(Param('recordId'), Find('|', Param('recordId')) - 1), returns all characters before the pipe, capturing the first parameter. Option C, Right(Param('recordId'), Len(Param('recordId')) - Find('|', Param('recordId'))), returns the characters after the pipe, capturing the second parameter. Together A and C fully extract both contextual parameters.

Why the Other Options Are Wrong

Option B applies Len - Find as the length of a Left extraction, which yields the wrong (too-long) substring including the pipe. Option D applies Find - 1 as the length of a Right extraction, which yields almost the entire string instead of the tail. Neither B nor D correctly isolates a single side of the delimiter.

Community Comment Notes

PRash3566 (likes=9) states the correct pair is A and C. DevInProgress (likes=3) explains A extracts the left part before the delimiter and C extracts the right part after it.

Official Reference

Related Analysis

Practice All PL-400 Questions

Access 85 questions with complete answers and detailed explanations.

View Full PL-400 Practice Test →

← Back to PL-400 Study Guide