Get filename and file format from display form

Hello dear support team,

i have a SharePoint online form.
How do I get the filename including file format on a display form?
It does not work with the following code:


Unfortunately, I did not find anything in your documentation as well as in the community.

Thanks for your help.

Best regards.

Hello @RMIC,

Could you please clarify the 'FileLeafRef' field type.

Hello mnikitina,

'FileLeafRef' is the internal column name of the column 'name' in a library.

How do I get the file name and file format of the name column of a document on a display form?

Best regards.


Please use the following code to get the field value:


You can also use this code to get the file path:


Hello mnikitina,

thanks, that works great.

Best regards.

1 Like