Need help in fetching data from file on machine via analysis

I’m not sure I fully understand what you are trying to achieve? Are you trying to re-order the ‘fields’ that are returned?

That said, the reason your relevance returned “Singular expression refers to non-unique object” is that in its current form, you’ll have to pluralize ‘preceding texts’ and ‘firsts’ like so:

preceding texts of firsts "," of lines of files whose ...

( see Common Relevance Error Messages for useful information on diagnosing/addressing common relevance error messages )

You can also leverage the ‘it without a whose’ form (see https://developer.bigfix.com/relevance/tutorial.html) to maintain singular inspectors (and allow for singular treatment of items in a list):

(preceding text of first "," of it) of lines of files whose ...

This form would then allow you to manipulate each line separately, such as:

(preceding text of first "," of it & "||" & following text of last "," of it) of lines of files whose ...