Hi everyone,
I am trying to display the name of the Last used Excel file from "Update Elements from CSV/Excel.." in my report. Currently i am accessing the name with
m:BOM.eAnnotations.oclAsType(ecore::EAnnotation).references.name
However this always gives me the complete path to the file but I only want to display the name. For example i get "C:\user\work\Demo-Projects\last_csv_file.xlsx" while i want to display "last_csv_file.xlsx".
I tried using
m:BOM.eAnnotations.oclAsType(ecore::EAnnotation).references.name->toString().lastIndex('\') to find the last '\' in the path, so I could cut the String there and only display what follows. However I always get these errors

Does anyone know a way around this or has a better solution for my problem in general?
Many thanks and with best regards,
Maria