Forum Discussion
How to extract a specific value from a list nested in a table
- 3 years ago
Hi AlbertoGP84
Try this in a new column
try List.Select([Files], each Text.Contains( Text.Lower(_) , ".zip") or Text.Contains( Text.Lower(_) , ".pdf")){0} otherwise nullI don't know if the filenames will always be in lower case, so I'm forcing that by using the Text.Lower function to make sure the filename will match against either .pdf or .zip
I also don't know if there will always be a matching filename. If there isn't an error will occur, so I've used try .. otherwise to trap that and output null in such cases.
If you are still having issues with this, please post some sample data.
Regards
Phil
Hi Phil,
your explanations are always very clear and solutions are spot on.
Thank you very much, really appreciated!!
If you have any good course suggestion or e-book reading for the M-Language will be more than welcome.
Have a good day!
Alberto
Here is the best (by far) coverage of M: