Why would it have to be a one-liner if it's in a script?
I get it if you are doing this interactively in the PS consolehost.
A dynamicParameter can be a dataset from whatever collection you pass to it.
… is two completely separate commands. Semi colon, does not make it a one-line, just separate command on the same line (code break). You cannot pass results from the left side of the semi colon to anything on the right.