krileon, thank you for response.
But it's quite difficult to the average user. Could you please describe the procedure more detailed.
Do I understand correctly that I need to:
1. Create a Field (which type if I need to output id? Integer?).
2. Create a custom layout in /html/layouts/com_fields/field
3. Set the Layout of the new Field to the custom one.
But how should php code look like in a custom layout?