Splitting a pipe-delimited recordId parameter in a Power Apps custom page with Power Fx
Short answer
AC Use Left(..., Find('|')-1) for the part before the pipe and Right(..., Len-Find('|')) for the part after it, splitting recordId.
Question
Key Takeaways
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.
Common mistake: 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.
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
https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/page-canvas-components
This link opens the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer AC. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 4 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 4
-
DevInProgress 👍 3A 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.
-
loftuscheek 👍 1Summary 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 👍 1The 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.
-
PRash3566 👍 9Should be AC
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All PL-400 Questions
Access 85 questions with complete answers and detailed explanations.
View Full PL-400 Practice Test →