I've created a simple script tool which should list all field names from all feature classes in a geodatabase. I struggle with the correct syntax when including inline variable in the script, which is why the script tool is not doing what it should within the model. Any links with information or suggestions would be kindly appreciated. I've looked in plenty of forums but not been able to make the script work within the modelbuilder. Also tried implementing it in the calculate value tool but it doesn't seem to work.
The script performs fine when not part of the model and only when a shapefile is specified.

